MCP Interface Overview
TaskFlow exposes a Model Context Protocol (MCP) endpoint per project, allowing AI agents to call TaskFlow's task execution, status management, and knowledge-base capabilities directly.
Endpoint
POST /api/projects/{project_id}/mcpSupports GET (availability probe), HEAD (health check), POST (message), DELETE.
Authentication
Use a project API key (created in Project Settings → API Keys):
Authorization: Bearer tf_b1af5033_<secret>Key format: tf_{first-8-hex-of-project-id}_{32-char-secret}
Integrating with Claude Code
Add to .claude/mcp.json:
json
{
"mcpServers": {
"taskflow": {
"type": "http",
"url": "http://localhost:8000/api/projects/YOUR_PROJECT_ID/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Dynamic task tools
When a task type has Allow MCP enabled, it becomes an MCP tool named after its identifier. Calling it creates a task instance and returns immediately; poll with get_task.