Skip to content

Commit 6727b43

Browse files
authored
docs: add sidecar pattern example and update .gitignore (#93)
* docs: add sidecar pattern example and update .gitignore * fix: documentation linting
1 parent 8cc318c commit 6727b43

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ go.work.sum
3535
.env
3636

3737
# Editor/IDE
38-
# .idea/
38+
.idea/
3939
# .vscode/

docs/docs/examples.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,55 @@ spec:
129129
port:
130130
number: 80
131131
```
132+
133+
#### Sidecar Pattern
134+
135+
The sidecar pattern allows you to add authentication to any SSE-based MCP server. The auth proxy runs as a sidecar container in the same pod, authenticating requests before forwarding them to your MCP server.
136+
137+
```yaml
138+
apiVersion: apps/v1
139+
kind: Deployment
140+
metadata:
141+
name: mcp-server
142+
spec:
143+
replicas: 1
144+
selector:
145+
matchLabels:
146+
app: mcp-server
147+
template:
148+
metadata:
149+
labels:
150+
app: mcp-server
151+
spec:
152+
containers:
153+
# Auth proxy sidecar
154+
- name: mcp-auth-proxy
155+
image: ghcr.io/sigbit/mcp-auth-proxy:latest
156+
args:
157+
- --external-url=https://mcp.example.com
158+
- --no-auto-tls
159+
- "http://localhost:8000" # Your MCP server port
160+
ports:
161+
- containerPort: 80
162+
env:
163+
- name: PASSWORD
164+
valueFrom:
165+
secretKeyRef:
166+
name: mcp-auth-proxy-secrets
167+
key: password
168+
volumeMounts:
169+
- name: data
170+
mountPath: /data
171+
172+
# Your MCP server
173+
- name: mcp-server
174+
image: your-mcp-server:latest
175+
ports:
176+
- containerPort: 8000
177+
# Your MCP server configuration here
178+
# ...
179+
180+
volumes:
181+
- name: data
182+
emptyDir: {}
183+
```

0 commit comments

Comments
 (0)