This file provides a compact technical overview.
The server exposes MCP tools over stdio for Claude Desktop.
Tool groups:
- File tools:
read-file,write-file,list-directory - Task tools:
create-task,list-tasks,update-task-status,delete-task,search-tasks,tasks-completed-this-week - Document tools:
generate-markdown-doc,generate-readme - PDF tools:
read-pdf,index-documents,search-documents,list-indexes
- Entry source:
src/index.ts - Build output:
dist/index.js - Transport:
StdioServerTransport - Server starts in
main()and logs to stderr
Tasks are stored in a SQLite database using better-sqlite3.
Database location: ~/mcp-tasks.db (user's home directory)
Why home directory?
- Survives project folder moves or clones
- Accessible across multiple projects using the same server
- No risk of being accidentally deleted with
dist/ornode_modules/
Schema:
CREATE TABLE tasks (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
description TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'todo'
CHECK(status IN ('todo','in-progress','done')),
priority TEXT NOT NULL DEFAULT 'medium'
CHECK(priority IN ('low','medium','high')),
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
);Prepared statements are compiled once at startup for performance and SQL injection safety.
ID continuity: On startup, the server reads the highest existing task ID from the database and seeds the counter from there, so IDs never collide after a restart.
PDF indexes remain in-memory (Map) because they are large and rebuilding them from source PDFs is fast. They do not persist across restarts.
From package.json:
npm run build: compile TypeScript todist/npm run dev: run once from source (tsx src/index.ts)npm start: run compileddist/index.jsnpm run watch: run source with auto-restart (tsx watch src/index.ts)
- Local coding: use
npm run watch - Claude Desktop integration: use
npm run buildthen restart Claude Desktop
Reason: Claude config usually points to dist/index.js, not src/index.ts.
{
"mcpServers": {
"local-dev": {
"command": "node",
"args": ["C:\\Projects\\mcp-server\\dist\\index.js"]
}
}
}- Add tool schema to
TOOLSinsrc/index.ts. - Add handler branch in
CallToolRequestSchema. - Build with
npm run build. - Restart Claude Desktop.
- Test from Claude.