Files
Django_TasksApp/docs/mcp/overview.md
T

1.4 KiB

MCP server

main/mcp_server/server.py builds a separate MCPServer and exposes stateless streamable HTTP at /mcp through Uvicorn. The deployment unit is main/deploy/systemd/tasknest-mcp.service; it listens on a Tailscale address and calls the Django /api/v1/ service on loopback. ApiTokenVerifier calls auth/whoami/. Each tool uses api_request() for bearer forwarding, idempotency and errors. The MCP transport advertises OAuth protected-resource metadata; endpoint scopes and ownership are enforced by Django.

The tool inventory is extracted from actual @server.tool registrations: 93 tools in the working tree on 2026-11-04. There are no @server.resource or @server.prompt registrations in server.py; no MCP resources or prompts are implemented there. main/mcp_server/test_tool_catalog.py checks catalog discovery; main/mcp_server/tests.py exercises HTTP transport and selected tool flows. A catalog entry is not proof that every endpoint contract is fully tested.

Names and descriptions are model-facing API guidance. They distinguish search/preview from writes, ask for user confirmation for destructive actions, and call for idempotency keys on retried creates. Typed Pydantic inputs live above create_server() in server.py. Outputs are structured when supported, with ToolError on API failures. See API authentication.