Task Manager MCP Server
A basic, locally running Model Context Protocol (MCP) server that demonstrates key MCP concepts for task management.
What This Demonstrates
1. Resources (Read-only data)
task://all- View all tasks as JSONtask://summary- Get task statistics summary
2. Tools (Interactive functions)
create_task- Add new tasksupdate_task_status- Change task statusget_task- Retrieve task detailsdelete_task- Remove tasks
3. Key MCP Patterns
- Proper TypeScript typing
- STDIO transport for local servers
- Error handling
- State management
- JSON schema definitions for tools
Setup
# Install dependencies
npm install
# Build the TypeScript
npm run build
# Test locally
npm start
Configure with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"task-manager": {
"command": "node",
"args": ["/absolute/path/to/task-mcp-server/build/index.js"]
}
}
}
Replace /absolute/path/to/ with your actual path.
Usage Examples
Once configured in Claude Desktop:
- "Show me all tasks" → Uses the
task://allresource - "Create a task to review code" → Calls
create_tasktool - "Update task 1 to in-progress" → Calls
update_task_statustool - "What's my task summary?" → Uses
task://summaryresource
Architecture
- In-memory storage: Simple Map for state (real servers would use DB)
- Type safety: Full TypeScript interfaces
- STDIO transport: Standard for local MCP servers
- Proper logging: Uses stderr to avoid corrupting JSON-RPC
- Schema validation: Tools have JSON schemas for inputs
Key Learnings from undertaking this project
- MCP separates concerns: Resources for data, Tools for actions
- Transport agnostic: STDIO for local, HTTP for remote
- Schema-driven: Tools define their inputs via JSON Schema
- Client-agnostic: Works with any MCP host (Claude Desktop, VS Code, etc.)
- Simple protocol: JSON-RPC over transport layer