feat: add local stdio adapter and uv-installable package with extras

Add aegis_gitea_mcp.stdio_app: a single-user, local MCP server over stdio
(official mcp SDK) that serves the same tools from the shared registry,
resolves the PAT owner via GET /user and pins request context to it, and runs
policy + WRITE_MODE + secret sanitization + audit while skipping the per-user
repo probe (the operator is the trusted token owner). Audit log falls back to a
per-user state path when the container default is unwritable.

Packaging: split deps into core (httpx/pydantic/mcp/...) and a [server] extra
(fastapi/uvicorn/PyJWT/python-multipart); add console scripts aegis-gitea-mcp
(stdio) and aegis-gitea-mcp-server (guarded HTTP entry); bump to 0.2.0 and fix
repo URLs. mcp added to requirements for CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-27 10:56:16 +02:00
parent 7da0c46de8
commit 8902c4f642
4 changed files with 290 additions and 10 deletions
+1
View File
@@ -8,3 +8,4 @@ python-dotenv>=1.0.0
python-multipart>=0.0.9
structlog>=24.1.0
PyJWT[crypto]>=2.9.0
mcp>=1.2.0