Establish Git-first TasksNest documentation and audit baseline

This commit is contained in:
Joren de Graaf
2026-11-06 14:12:29 +01:00
parent 01133370e6
commit 1a63241fb6
17 changed files with 527 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
# 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](tools.md) 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](../api/authentication.md).