fastmcp-server
by HelmForge
FastMCP server with dynamic tool, resource, prompt, and knowledge base loading from inline, S3, and Git sources
About this chart
FastMCP Server
A Helm chart for deploying FastMCP Server on Kubernetes using the
official docker.io/helmforge/fastmcp-server image. Dynamically loads
MCP tools, resources, prompts, and knowledge bases from inline ConfigMaps, S3-compatible storage, or Git repositories.
Features
- Multi-source loading with merge precedence: Inline > S3 > Git
- Bearer token and JWT authentication via FastMCP
- Knowledge base files served as MCP resources
- Extra pip packages installed at startup
- Built-in Web UI dashboard at
/ui - Prometheus metrics with ServiceMonitor support
- Structured JSON logging for log aggregation
- Dedicated health endpoints (
/healthz,/readyz,/startupz) with readiness using/healthzby default - Diagnostic endpoint at
/debug/info - Init container pattern for source pre-sync
- Strict loading mode for fail-fast on errors
- Gateway API HTTPRoute support for modern Kubernetes ingress
- Dual-stack Service options for IPv4/IPv6 clusters
- Restricted pod defaults with service account token automount disabled
Security Scan: fastmcp-server
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 90.90909% |
Security posture: acceptable for the scanned controls. Operators remain responsible for authenticating public endpoints and reviewing executable source content.
Quick Start
helm install fastmcp-server oci://ghcr.io/helmforgedev/helm/fastmcp-server
With inline tools:
helm install fastmcp-server oci://ghcr.io/helmforgedev/helm/fastmcp-server \
--set-file sources.inline.tools.greet\.py=examples/tools/greet.py
With bearer authentication:
helm install fastmcp-server oci://ghcr.io/helmforgedev/helm/fastmcp-server \
--set auth.type=bearer \
--set auth.bearer.token=my-secret-token
Configuration
Inline Tools
Define Python tool files directly in values.yaml:
sources:
inline:
tools:
greet.py: |
def greet(name: str) -> str:
"""Greet someone by name."""
return f"Hello, {name}!"
math_ops.py: |
def add(a: float, b: float) -> float:
"""Add two numbers."""
return a + b
resources:
status.py: |
import json
RESOURCE_URI = "status://server"
def get_status() -> str:
"""Server status."""
return json.dumps({"status": "healthy"}, indent=2)
prompts:
summarize.py: |
def summarize(text: str) -> str:
"""Summarize text."""
return f"Please summarize:\n\n{text}"
knowledge:
overview.md: |
# Product Overview
Context document for the AI assistant.
S3 Source
Load tools from an S3-compatible bucket (AWS S3, MinIO, Cloudflare R2):
sources:
s3:
enabled: true
endpoint: "https://minio.example.com"
bucket: mcp-tools
region: us-east-1
prefix: production
accessKey: minioadmin
secretKey: minioadmin
Or with an existing secret:
sources:
s3:
enabled: true
bucket: mcp-tools
existingSecret: my-s3-credentials
existingSecretAccessKeyKey: access-key
existingSecretSecretKeyKey: secret-key
Git Source
Clone tools from a Git repository at startup:
sources:
git:
enabled: true
repository: "https://github.com/your-org/mcp-tools.git"
branch: main
path: ""
token: ghp_xxx # for private repos
Authentication
Bearer token:
auth:
type: bearer
bearer:
token: my-secret-token
JWT:
auth:
type: jwt
jwt:
issuer: "https://auth.example.com"
audience: "mcp-server"
jwksUri: "https://auth.example.com/.well-known/jwks.json"
Observability
Enable Prometheus metrics and ServiceMonitor:
metrics:
enabled: true
serviceMonitor:
enabled: true
interval: 30s
Structured JSON logging:
server:
logFormat: json
Gateway API
Expose only the MCP endpoint through a Gateway API HTTPRoute:
gatewayAPI:
enabled: true
parentRefs:
- name: public-gateway
namespace: gateway-system
sectionName: https
hostnames:
- mcp.example.com
paths:
- type: PathPrefix
value: /mcp
For long-lived streamable HTTP clients behind NGINX-style proxies, keep proxy buffering and caching disabled and use read/send timeouts long enough for MCP sessions.
Dual-Stack Service
On dual-stack clusters, request both IP families for the Service:
service:
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
Init Container Pattern
Pre-sync sources before the server starts:
initSync:
enabled: true
Production Example
server:
name: production-mcp
logLevel: WARNING
logFormat: json
strictLoading: true
auth:
type: bearer
bearer:
existingSecret: mcp-auth
sources:
s3:
enabled: true
bucket: mcp-production
existingSecret: mcp-s3-credentials
inline:
knowledge:
runbook.md: |
# Operations Runbook
Emergency procedures for the production environment.
extraPipPackages:
- requests
- pandas
metrics:
enabled: true
serviceMonitor:
enabled: true
initSync:
enabled: true
ingress:
enabled: true
ingressClassName: nginx
hosts:
- host: mcp.example.com
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- mcp.example.com
secretName: mcp-tls
gatewayAPI:
enabled: true
parentRefs:
- name: public-gateway
namespace: gateway-system
sectionName: https
hostnames:
- mcp.example.com
paths:
- type: PathPrefix
value: /mcp
persistence:
enabled: true
size: 5Gi
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
podSecurityContext:
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
Default Values
| Key | Default | Description |
|---|---|---|
namespaceOverride | "" | Override namespace for chart-managed namespaced resources |
image.repository | docker.io/helmforge/fastmcp-server | Container image |
image.tag | 0.11.2 | Image tag |
server.name | fastmcp-server | Server name in MCP responses |
server.port | 8000 | HTTP port |
server.path | /mcp | MCP endpoint path |
server.logLevel | INFO | Log level |
server.logFormat | text | Log format: text or json |
server.strictLoading | false | Fail on boot if any component has errors |
ui.enabled | true | Enable Web UI at /ui |
metrics.enabled | false | Enable Prometheus metrics at /metrics |
metrics.serviceMonitor.enabled | false | Create ServiceMonitor CRD |
auth.type | none | Authentication: none, bearer, jwt |
sources.inline.tools | {} | Inline Python tool files |
sources.inline.resources | {} | Inline Python resource files |
sources.inline.prompts | {} | Inline Python prompt files |
sources.inline.knowledge | {} | Inline knowledge base files |
sources.s3.enabled | false | Enable S3 source |
sources.s3.bucket | "" | S3 bucket name |
sources.git.enabled | false | Enable Git source |
sources.git.repository | "" | Git repository HTTPS URL |
extraPipPackages | [] | Extra pip packages at startup |
initSync.enabled | false | Run source sync as init container |
persistence.enabled | false | Enable persistent workspace |
ingress.enabled | false | Enable ingress |
gatewayAPI.enabled | false | Create Gateway API HTTPRoute |
service.ipFamilyPolicy | "" | Optional Service IP family policy |
service.ipFamilies | [] | Optional Service IP families |
serviceAccount.automountServiceAccountToken | false | Mount Kubernetes API token into pods |
networkPolicy.enabled | false | Enable NetworkPolicy |
See values.yaml for the full configuration reference.
Architecture and Operations
- Architecture
- Sources and secrets
- Operations and security
Connecting MCP Clients
After deploying the chart, connect AI assistants to the MCP endpoint.
Claude Code
Add to your Claude Code settings (~/.claude/settings.json or project .claude/settings.json):
{
"mcpServers": {
"my-mcp-server": {
"type": "streamable-http",
"url": "https://mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
The URL is your ingress host + the server.path value (default /mcp).
Codex (VS Code Extension)
Add to your Codex configuration (~/.codex/config.toml):
[mcp_servers.my-mcp-server]
enabled = true
url = "https://mcp.example.com/mcp"
[mcp_servers.my-mcp-server.http_headers]
Authorization = "Bearer <your-token>"
Port-Forward (Development)
For local testing without ingress:
kubectl port-forward svc/fastmcp-server 8000:8000
Then use http://localhost:8000/mcp as the URL (no auth if auth.type=none).
Examples
- Basic inline tools
- S3 source with MinIO
- Production setup
Troubleshooting
Check rollout status and application logs first:
RELEASE=fastmcp-server
NAMESPACE=default
DEPLOYMENT=$(kubectl get deployment -n "$NAMESPACE" \
-l "app.kubernetes.io/instance=$RELEASE,app.kubernetes.io/name=fastmcp-server" \
-o jsonpath='{.items[0].metadata.name}')
kubectl rollout status deployment/"$DEPLOYMENT" -n "$NAMESPACE"
kubectl logs deployment/"$DEPLOYMENT" -n "$NAMESPACE"
When initSync.enabled=true, inspect the source synchronization container:
kubectl logs deployment/"$DEPLOYMENT" -c source-sync -n "$NAMESPACE"
If the pod is healthy but clients cannot connect, port-forward the Service and test the configured MCP path directly:
SERVICE=$(kubectl get service -n "$NAMESPACE" \
-l "app.kubernetes.io/instance=$RELEASE,app.kubernetes.io/name=fastmcp-server" \
-o jsonpath='{.items[0].metadata.name}')
SERVICE_PORT="${SERVICE_PORT:-8000}" # Match service.port.
MCP_PATH="${MCP_PATH:-/mcp}" # Match server.path.
kubectl port-forward service/"$SERVICE" \
"$SERVICE_PORT:$SERVICE_PORT" -n "$NAMESPACE"
curl "http://127.0.0.1:$SERVICE_PORT/healthz"
# A bare GET is expected to return HTTP 406 without an Accept:
# text/event-stream header; that response confirms the route is reachable.
curl -i "http://127.0.0.1:$SERVICE_PORT$MCP_PATH"
Authentication failures usually indicate that the client header, referenced
Secret name, or configured Secret key does not match the selected auth mode.
Source-loading failures are reported in the application or source-sync logs;
also verify network egress and the Git, S3, or JWKS endpoint independently.
Deploy fastmcp-server with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fastmcp-server on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartfastmcp-server is pinned at v1.7.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply