docs(mcp): gateway README with client snippets; add to CLAUDE.md layout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f433e40670
commit
977199b591
2 files changed
+57
-1
No files matched your search
@@ -26,7 +26,8 @@ Deployment configuration for a **live, single-host Docker homelab** running on a
|
|||||||
│ ├── monitoring/ # uptime-kuma, homarr
|
│ ├── monitoring/ # uptime-kuma, homarr
|
||||||
│ ├── remote/ # rustdesk hbbr + hbbs
|
│ ├── remote/ # rustdesk hbbr + hbbs
|
||||||
│ ├── dev/ # code-server, bookstack, dbx
|
│ ├── dev/ # code-server, bookstack, dbx
|
||||||
│ └── cameras/ # neolink (Reolink E1 Baichuan→RTSP), frigate, frigate-notify
|
│ ├── cameras/ # neolink (Reolink E1 Baichuan→RTSP), frigate, frigate-notify
|
||||||
|
│ └── mcp/ # mcp-gateway: all homelab MCP servers at mcp.ginnoir.com/servers/<name>/mcp (see its README)
|
||||||
├── portainer-compose.yml # management plane (raw compose, not a Portainer stack)
|
├── portainer-compose.yml # management plane (raw compose, not a Portainer stack)
|
||||||
├── vault.hcl # vault config (deployed alongside portainer-compose.yml)
|
├── vault.hcl # vault config (deployed alongside portainer-compose.yml)
|
||||||
├── Caddyfile # caddy config (deployed via Gitea Actions or -Caddy)
|
├── Caddyfile # caddy config (deployed via Gitea Actions or -Caddy)
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# mcp — shared MCP gateway
|
||||||
|
|
||||||
|
One [mcp-proxy](https://github.com/sparfenyuk/mcp-proxy) container runs the homelab MCP
|
||||||
|
servers once on valhalla. Every agent on every machine connects by URL:
|
||||||
|
|
||||||
|
```
|
||||||
|
https://mcp.ginnoir.com/servers/<name>/mcp # streamable HTTP
|
||||||
|
https://mcp.ginnoir.com/servers/<name>/sse # legacy SSE
|
||||||
|
```
|
||||||
|
|
||||||
|
`<name>` ∈ `arr bookstack ntfy uptime-kuma portainer gitea authentik freshrss vault`.
|
||||||
|
Every request needs `Authorization: Bearer <MCP_PROXY_AUTH_TOKEN>` (value in `stack.env`).
|
||||||
|
Reachable from LAN + tailnet only (Caddy `internal_only`).
|
||||||
|
|
||||||
|
Obsidian is **not** here; its MCP is the Local REST API plugin inside the Obsidian app
|
||||||
|
(`http://127.0.0.1:27123/mcp/` on whichever machine has Obsidian open).
|
||||||
|
|
||||||
|
## Setting up a new machine / agent
|
||||||
|
|
||||||
|
Replace `TOKEN` with `MCP_PROXY_AUTH_TOKEN` from `stack.env`. Repeat the entry per server name.
|
||||||
|
|
||||||
|
**Claude Code** (`~/.claude.json` → `mcpServers`):
|
||||||
|
```json
|
||||||
|
"gitea": { "type": "http", "url": "https://mcp.ginnoir.com/servers/gitea/mcp",
|
||||||
|
"headers": { "Authorization": "Bearer TOKEN" } }
|
||||||
|
```
|
||||||
|
or `claude mcp add --scope user --transport http gitea https://mcp.ginnoir.com/servers/gitea/mcp --header "Authorization: Bearer TOKEN"`
|
||||||
|
|
||||||
|
**Codex** (`~/.codex/config.toml`):
|
||||||
|
```toml
|
||||||
|
[mcp_servers.gitea]
|
||||||
|
url = "https://mcp.ginnoir.com/servers/gitea/mcp"
|
||||||
|
http_headers = { Authorization = "Bearer TOKEN" }
|
||||||
|
```
|
||||||
|
|
||||||
|
**Antigravity** (`~/.gemini/config/mcp_config.json` → `mcpServers`):
|
||||||
|
```json
|
||||||
|
"gitea": { "serverUrl": "https://mcp.ginnoir.com/servers/gitea/mcp",
|
||||||
|
"headers": { "Authorization": "Bearer TOKEN" } }
|
||||||
|
```
|
||||||
|
|
||||||
|
**Gemini CLI** (`~/.gemini/settings.json` → `mcpServers`): same as Antigravity but `httpUrl`
|
||||||
|
instead of `serverUrl`.
|
||||||
|
|
||||||
|
## Ops
|
||||||
|
|
||||||
|
- Add / bump a server: edit `gateway/Dockerfile` (install + pin) and `gateway/servers.json`,
|
||||||
|
push. `.gitea/workflows/build-mcp-gateway.yml` builds `registry.ginnoir.com/ginnoir/mcp-gateway`,
|
||||||
|
then Portainer (stack id 39) redeploys on its next poll. Any new secrets go in `stack.env`.
|
||||||
|
Every var reaches every server (`--pass-environment`).
|
||||||
|
- Status: `curl -H "Authorization: Bearer TOKEN" https://mcp.ginnoir.com/status`
|
||||||
|
- Logs: `docker logs mcp-gateway` (servers start one after another, ~60s total)
|
||||||
|
- Rotate the token: change `MCP_PROXY_AUTH_TOKEN` in `stack.env`, push, update the clients.
|
||||||
|
- freshrss-mcp needs Python ≥3.14, so it gets a uv-managed interpreter. The base image
|
||||||
|
has no `git`, so git-pinned packages install from a GitHub `archive/<sha>.tar.gz` URL.
|
||||||
Reference in new issue
Block a user