Task Manager
STDIOModel Context Protocol server for managing and executing tasks in queue-based system.
Model Context Protocol server for managing and executing tasks in queue-based system.
A Model Context Protocol (MCP) server for comprehensive task management, deployed as a Cloudflare Worker. This open-source project enables AI assistants to plan, track, and manage complex multi-step requests efficiently with persistent storage using Cloudflare KV.
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
This will open your browser to authenticate with Cloudflare.
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 deployed and 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 (development, staging, production):
[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.
# Install dependencies npm install # Build the project npm run build # Start local development server (with remote KV) npx wrangler dev # Start local development server (with local KV for testing) npx wrangler dev --local # Deploy to preview environment npx wrangler deploy --env preview
# Test the build npm run build # Test deployment (dry run - shows what would be deployed) npx wrangler deploy --dry-run # Run local tests npm test # If you add tests # Test with local KV storage npx wrangler dev --local
View real-time logs:
# Tail logs from deployed worker npx wrangler tail # Tail logs with filtering npx wrangler tail --format pretty
# List all keys in your KV namespace npx wrangler kv:key list --binding TASKMANAGER_KV # Get a specific key value npx wrangler kv:key get "tasks" --binding TASKMANAGER_KV # Delete all data (be careful!) npx wrangler kv:key delete "tasks" --binding TASKMANAGER_KV
The MCP Task Manager is built as a Cloudflare Worker with the following components:
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ AI Assistant │───▶│ Cloudflare │───▶│ Cloudflare KV │
│ (Claude, etc) │ │ Worker │ │ Storage │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────────┐
│ TaskManagerServer│
│ (Business Logic) │
└──────────────────┘
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 |
We welcome contributions! Here's how to get started:
git clone https://github.com/your-username/mcp-taskmanager.git
git checkout -b feature/amazing-feature
npm install
npx wrangler dev --local
npm run build
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This project is licensed under the MIT License - see the LICENSE file for details.
When reporting bugs, please include:
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the AI community
Deploy your own instance and start managing tasks efficiently with AI assistants!