The MCP Task Manager is a serverless application deployed on Cloudflare Workers that enables AI assistants to plan, track, and manage complex multi-step requests efficiently. It provides persistent storage through Cloudflare KV and offers tools for request planning, task management, and progress tracking.
Clone and setup the repository
git clone https://github.com/Rudra-ravi/mcp-taskmanager.git
cd mcp-taskmanager
npm install
Login to Cloudflare
npx wrangler login
Create KV namespace
npx wrangler kv namespace create "TASKMANAGER_KV"
Copy the namespace ID from the output.
Update configuration
Edit wrangler.toml
and replace the KV namespace ID:
[[kv_namespaces]]
binding = "TASKMANAGER_KV"
id = "your-new-kv-namespace-id-here"
Build and deploy
npm run build
npx wrangler deploy
Your MCP Task Manager will be accessible at:
https://mcp-taskmanager.your-subdomain.workers.dev
To deploy with a custom name, update wrangler.toml
:
name = "my-custom-taskmanager" # Change this to your preferred name
main = "worker.ts"
compatibility_date = "2024-03-12"
[build]
command = "npm run build"
[[kv_namespaces]]
binding = "TASKMANAGER_KV"
id = "your-kv-namespace-id-here"
For different environments:
[env.staging]
name = "mcp-taskmanager-staging"
[[env.staging.kv_namespaces]]
binding = "TASKMANAGER_KV"
id = "staging-kv-namespace-id"
[env.production]
name = "mcp-taskmanager-prod"
[[env.production.kv_namespaces]]
binding = "TASKMANAGER_KV"
id = "production-kv-namespace-id"
Deploy to specific environments:
npx wrangler deploy --env staging
npx wrangler deploy --env production
The deployed worker provides two main endpoints:
POST /list-tools
- Get available MCP toolsPOST /call-tool
- Execute MCP tool functionsAfter deployment, test your worker with curl:
# Replace with your actual worker URL
WORKER_URL="https://mcp-taskmanager.your-subdomain.workers.dev"
# Test list tools
curl -X POST $WORKER_URL/list-tools \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
# Test creating a request
curl -X POST $WORKER_URL/call-tool \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "request_planning",
"arguments": {
"originalRequest": "Test deployment",
"tasks": [{"title": "Test task", "description": "Verify deployment works"}]
}
}
}'
request_planning
- Register a new user request and plan its associated tasksget_next_task
- Get the next pending task for a requestmark_task_done
- Mark a task as completed with optional detailsapprove_task_completion
- Approve a completed taskapprove_request_completion
- Approve the completion of an entire requestadd_tasks_to_request
- Add new tasks to an existing requestupdate_task
- Update task title or description (only for pending tasks)delete_task
- Remove a task from a requestopen_task_details
- Get detailed information about a specific tasklist_requests
- List all requests with their current status and progresscurl -X POST https://your-worker.your-subdomain.workers.dev/list-tools \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
curl -X POST https://your-worker.your-subdomain.workers.dev/call-tool \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "request_planning",
"arguments": {
"originalRequest": "Build a web application for task management",
"splitDetails": "Breaking down into frontend, backend, and deployment tasks",
"tasks": [
{
"title": "Setup React frontend",
"description": "Initialize React app with TypeScript and essential dependencies"
},
{
"title": "Create backend API",
"description": "Build REST API with Node.js and Express"
},
{
"title": "Deploy application",
"description": "Deploy to cloud platform with CI/CD pipeline"
}
]
}
}
}'
interface Task {
id: string; // Unique task identifier (e.g., "task-1")
title: string; // Task title
description: string; // Detailed task description
done: boolean; // Whether task is marked as done
approved: boolean; // Whether task completion is approved
completedDetails: string; // Details provided when marking task as done
}
interface RequestEntry {
requestId: string; // Unique request identifier (e.g., "req-1")
originalRequest: string; // Original user request description
splitDetails: string; // Details about how request was split into tasks
tasks: Task[]; // Array of tasks for this request
completed: boolean; // Whether entire request is completed
}
❌ Pending → ⏳ Done (awaiting approval) → ✅ Approved
Tasks can only be updated when in "Pending" status. Once marked as done or approved, they become read-only.
View logs and metrics in the Cloudflare Dashboard:
mcp-taskmanager
worker# View live logs
npx wrangler tail
# View formatted logs
npx wrangler tail --format pretty
# Filter logs by status
npx wrangler tail --status error
Issue | Cause | Solution |
---|---|---|
500 Internal Server Error | KV namespace not found | Check KV namespace ID in wrangler.toml |
CORS errors | Missing headers | Verify CORS headers in worker.ts |
Task not found | Invalid task/request ID | Check ID format and existence |
Build failures | TypeScript errors | Run npm run build locally first |
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-taskmanager" '{"command":"npx","args":["wrangler","dev","--local"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-taskmanager": {
"command": "npx",
"args": [
"wrangler",
"dev",
"--local"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-taskmanager": {
"command": "npx",
"args": [
"wrangler",
"dev",
"--local"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect