feat: add multi-server support via GITEA_SERVERS env var

Allows connecting to multiple Gitea instances from a single MCP server.
Set GITEA_SERVERS as a JSON object mapping names to {host, token, insecure}
configs. Every tool gets an optional "server" parameter, and a new
"list_servers" tool is added to discover available connections.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 17:28:40 +00:00
parent 4b4b5ee247
commit 58d2feb54a
6 changed files with 150 additions and 49 deletions
+3 -1
View File
@@ -3,5 +3,7 @@ package context
type contextKey string
const (
TokenContextKey = contextKey("token")
TokenContextKey = contextKey("token")
HostContextKey = contextKey("host")
InsecureContextKey = contextKey("insecure")
)