vikunja/pkg/modules/mcp
kolaente e423167ce1 feat(mcp): expose projects via mcp tools
Wires the projects resource into the MCP server end-to-end. The five
project tools (create, read_one, read_all, update, delete) are now
visible in tools/list and dispatch through handler.Do* like the REST
layer.

- Add ProjectCreateInput / ProjectUpdateInput in inputs.go with
  jsonschema tags covering only the writable fields the model honours
  (title, description, identifier, hex_color, parent_project_id,
  position, is_archived, is_favorite); computed fields like Owner and
  MaxPermission are intentionally absent so the SDK-reflected schema
  stays narrow.
- Add resources.go with a sync.Once-guarded RegisterResources(), and an
  installTools helper that registers tools per (resource, op) on the
  *mcp.Server via a generic addTool[In inputAdapter] helper. The
  handler maps domain failures (permission denials, missing rows,
  validation) to IsError tool results per the SDK convention.
- Add DispatchTyped in dispatcher.go so the AddTool handler can hand a
  pre-unmarshalled wrapper to the dispatcher without a JSON
  round-trip. The existing Dispatch (raw JSON path) delegates to a
  shared dispatchPrepared.
- Wire RegisterResources() + installTools() into newServer() so each
  new MCP session inherits the static tool set.
- Add fixture token 11 (mcp:access + projects:*) for the full-scope
  integration tests; bump TestAPIToken_ReadAll's expected count.
- Refresh TestMCP_ToolsListEmpty into
  TestMCP_ToolsListReturnsRegisteredResources, asserting the five
  projects_* tools are present (Task 6 will introduce scope-based
  filtering of this list).
- Add pkg/webtests/mcp_projects_test.go covering tools/list,
  create/read_one/read_all/update/delete happy paths, schema-validation
  failure on missing required title, permission denial on a forbidden
  project, and nonexistent-id lookup.
2026-05-26 23:43:59 +02:00
..
context.go feat(mcp): add streamable-http endpoint skeleton 2026-05-26 23:08:45 +02:00
dispatcher.go feat(mcp): expose projects via mcp tools 2026-05-26 23:43:59 +02:00
dispatcher_test.go feat(mcp): add resource registry and dispatcher 2026-05-26 23:20:04 +02:00
inputs.go feat(mcp): expose projects via mcp tools 2026-05-26 23:43:59 +02:00
inputs_test.go feat(mcp): add per-tool input wrappers 2026-05-26 23:27:43 +02:00
mcp.go feat(mcp): expose projects via mcp tools 2026-05-26 23:43:59 +02:00
registry.go feat(mcp): add resource registry and dispatcher 2026-05-26 23:20:04 +02:00
registry_test.go feat(mcp): add resource registry and dispatcher 2026-05-26 23:20:04 +02:00
resources.go feat(mcp): expose projects via mcp tools 2026-05-26 23:43:59 +02:00