Gitea MCP connector: MCP OAuth mode on bikoret.ch
The claude.ai connector ran the OAuth flow against a server in static-token mode, which has no OAuth endpoints: the login ended on a 404. The proper form is gitea-mcp's -oauth mode, where each user authorizes with their own Gitea account; it needs both origins public over HTTPS and Gitea's ROOT_URL to be that origin. - gitea-ingress.yaml: git.bikoret.ch → temple-council/gitea, TLS - gitea-public-patch.yaml: ROOT_URL/DOMAIN/SSH_DOMAIN = git.bikoret.ch (were a name that never resolved and a released NLB IP) - gitea-mcp-deployment.yaml: -oauth -oauth-public-url https://mcp.bikoret.ch -H https://git.bikoret.ch, no static token, probes on /healthz - gitea-mcp-ingress.yaml: host mcp.bikoret.ch (mcp.shorashim.ch retired) - gitea-public-apply.sh / gitea-public-verify.sh: the operator's DNS-gated apply and read-only verification (also in ~/.local/bin) - KOHEN.md, deploy/ARCHITECTURE.md: the new doors and the Gitea OAuth2 app ("Claude", PKCE, claude.ai + Claude Code redirect URIs) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
861cd4e64e
commit
53778f372e
9 files changed
+186
-31
No files matched your search
@@ -1,13 +1,28 @@
|
||||
# Gitea MCP Server — public connector for claude.ai
|
||||
# Gitea MCP Server — public connector for claude.ai and Claude Code
|
||||
#
|
||||
# Deploys the official Gitea MCP server (gitea.com/gitea/gitea-mcp)
|
||||
# in HTTP mode, exposing /mcp endpoint for Streamable HTTP transport.
|
||||
# in HTTP mode with MCP OAuth (-oauth): every client authorizes against
|
||||
# Gitea with its OWN account (PKCE, no client secret), and the server
|
||||
# forwards that bearer token to Gitea per request. No shared static
|
||||
# token is used any more (gitea-mcp-secrets is kept only for a rollback
|
||||
# to the pre-2026-10-19 static-token mode).
|
||||
#
|
||||
# The MCP server connects to the Gitea backend over the cluster network
|
||||
# (gitea.temple-council.svc.cluster.local) using a Personal Access Token
|
||||
# stored in gitea-mcp-secrets. Until 2026-10-06 it went out to Gitea's
|
||||
# own NLB (185.19.29.94) and back in; that NLB is gone — Gitea is behind
|
||||
# the shared ingress now (ingress-tcp-services.yaml).
|
||||
# The server serves /.well-known/oauth-protected-resource naming Gitea
|
||||
# as the authorization server, so BOTH origins must be public HTTPS:
|
||||
# -oauth-public-url https://mcp.bikoret.ch (gitea-mcp-ingress.yaml)
|
||||
# -H https://git.bikoret.ch (gitea-ingress.yaml;
|
||||
# Gitea ROOT_URL must be the same, gitea-public-patch.yaml)
|
||||
# /mcp accepts only the Host from -oauth-public-url, and reverse proxies
|
||||
# must pass Mcp-Protocol-Version, Mcp-Method and Mcp-Name through
|
||||
# (ingress-nginx does).
|
||||
#
|
||||
# One-time in Gitea (Settings → Applications → Manage OAuth2 Applications):
|
||||
# name Claude
|
||||
# redirect URIs https://claude.ai/api/mcp/auth_callback
|
||||
# http://127.0.0.1/callback (Claude Code; any port)
|
||||
# confidential UNCHECKED (PKCE)
|
||||
# The client ID goes into the claude.ai connector's Advanced settings,
|
||||
# with the connector URL https://mcp.bikoret.ch/mcp.
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -33,18 +48,13 @@ spec:
|
||||
args:
|
||||
- "-t"
|
||||
- "http"
|
||||
- "-oauth"
|
||||
- "-oauth-public-url"
|
||||
- "https://mcp.bikoret.ch"
|
||||
- "--host"
|
||||
- "http://gitea.temple-council.svc.cluster.local"
|
||||
- "https://git.bikoret.ch"
|
||||
- "--port"
|
||||
- "8080"
|
||||
env:
|
||||
- name: GITEA_ACCESS_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-mcp-secrets
|
||||
key: GITEA_TOKEN
|
||||
- name: GITEA_HOST
|
||||
value: "http://gitea.temple-council.svc.cluster.local"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
@@ -56,12 +66,14 @@ spec:
|
||||
memory: "256Mi"
|
||||
cpu: "250m"
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
|
||||
Reference in new issue
Block a user