Commit Graph

68 Commits

Author SHA1 Message Date
Mathias Bergqvist
4ebb1eef6d feat(allowlist): owner allowlist enforcement 2026-05-04 21:26:50 +02:00
Mathias Bergqvist
d564cdcae3 feat(gitea): typed error mapping from http status 2026-05-04 21:26:29 +02:00
Mathias Bergqvist
2ecffd1b7a feat(gitea): base http client with token auth 2026-05-04 21:26:03 +02:00
Mathias Bergqvist
4dba4ca192 feat(main): wire caller middleware into /mcp 2026-05-04 21:20:37 +02:00
Mathias Bergqvist
3613c36afb feat(identity): created-content footer 2026-05-04 21:05:42 +02:00
Mathias Bergqvist
0b5daca198 feat(auth): X-Auth-Request-User context middleware 2026-05-04 21:05:16 +02:00
Mathias Bergqvist
c6c328e517 fix(mcp): map tool-not-found to CodeNotFound via registry sentinel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:59:15 +02:00
Mathias Bergqvist
93c5a6934b feat(mcp): cap inbound request body at 1 MiB
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:58:36 +02:00
Mathias Bergqvist
ba5068648b refactor(mcp): compose origin allowlist as middleware, remove duplication
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:58:08 +02:00
Mathias Bergqvist
36765b8360 feat(mcp): streamable HTTP transport with session, init, and dispatch
Implements the Streamable HTTP transport: POST routing handles initialize
(issues session ID), tools/list, tools/call, and unknown methods; GET SSE
emits a keepalive comment then blocks on context cancellation. A minimal
registry stub is introduced so the server compiles and tools/list returns
an empty array until Phase 6+ registers real tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:49:54 +02:00
Mathias Bergqvist
50a3b27825 test(mcp): pin session concurrency, document error codes, assert id round-trip
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:46:07 +02:00
Mathias Bergqvist
ea19516109 feat(mcp): origin allowlist middleware 2026-05-04 20:41:21 +02:00
Mathias Bergqvist
cf2017e687 feat(mcp): session id store 2026-05-04 20:40:53 +02:00
Mathias Bergqvist
abaf5e8b1d feat(mcp): jsonrpc envelope types and error codes 2026-05-04 20:40:29 +02:00
Mathias Bergqvist
87cbce27a1 test(config): pin splitCSV whitespace and empty-entry handling 2026-05-04 20:25:28 +02:00
Mathias Bergqvist
d399a216c1 feat(config): env-var loading
Add internal/config package with Config struct and Load() function.
Reads GITEA_BASE_URL, GITEA_API_TOKEN, GITEA_MCP_ALLOWED_OWNERS,
GITEA_MCP_ORIGIN_ALLOWLIST, GITEA_MCP_PORT with sensible defaults.
Wire cfg.Port into main.go. TDD: tests written first, then impl.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:19:31 +02:00
Mathias Bergqvist
a77fa7506b feat: initial scaffold with /healthz
Go module gitea.d-ma.be/mathias/gitea-mcp, minimal HTTP server with a
/healthz probe, Taskfile build targets, and .gitignore/README updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 20:13:41 +02:00
1eabd5982f Initial commit 2026-05-04 17:17:17 +00:00