go-mcp-host

Deployment Guide

This directory contains deployment configurations for go-mcp-host.

Helm Chart Deployment

Prerequisites

Quick Start

  1. Create a values file for your environment:
cp examples/local/values.yaml my-deployment-values.yaml
  1. Edit the values file with your configuration:
APP:
  HOST: mcp-host.mycompany.com
  CORS_HOSTS: "https://myapp.mycompany.com"
  REMOTE_KEYS_URL: ""  # Optional: Add your JWT provider URL

imageTag: myregistry.io/go-mcp-host:v1.0.0
  1. Create database secrets:
kubectl create secret generic go-mcp-host-db-credentials \
  --from-literal=username=mcphost \
  --from-literal=password=<your-secure-password>

kubectl create configmap go-mcp-host-db-connection \
  --from-literal=host=postgres.default.svc.cluster.local \
  --from-literal=port=5432 \
  --from-literal=database=mcphost \
  --from-literal=sslmode=disable
  1. Create MCP configuration:
kubectl create configmap go-mcp-host-config \
  --from-file=config.yaml=../config.example.yaml

Edit the config.yaml to add your MCP servers.

  1. Install the Helm chart:
helm install go-mcp-host ./helm-chart \
  -f my-deployment-values.yaml \
  --namespace mcp-host \
  --create-namespace

Configuration

MCP Servers

Create a config.yaml file with your MCP server configurations:

mcp_servers:
  - name: weather
    type: stdio
    command: npx
    args:
      - "-y"
      - "@h1deya/mcp-server-weather"
    enabled: true
    description: "Weather information server"
  
  - name: my-api
    type: http
    url: "https://api.mycompany.com/mcp"
    headers:
      Authorization: "Bearer YOUR_TOKEN"
    forwardBearer: false  # Set to true to forward user's bearer token
    enabled: true
    description: "My company's API"

Deploy it as a ConfigMap:

kubectl create configmap go-mcp-host-config --from-file=config.yaml

Database Setup

Run migrations before first deployment:

# From the project root
export DB_HOST=your-postgres-host
export DB_PORT=5432
export DB_NAME=mcphost
export DB_USER=mcphost
export DB_PASS=your-password
export DB_SSL_MODE=disable

make run-migrations  # Or use go-migrate directly

Ollama Configuration

Ensure Ollama is accessible from your cluster:

Example Deployments

See the examples/ directory for reference configurations:

Environment-Specific Values

Create separate values files for each environment:

# Development
helm upgrade --install go-mcp-host ./helm-chart \
  -f values.yaml \
  -f examples/kubernetes/values.yaml \
  --namespace dev

# Production
helm upgrade --install go-mcp-host ./helm-chart \
  -f values.yaml \
  -f examples/production/values.yaml \
  --namespace prod

Upgrading

helm upgrade go-mcp-host ./helm-chart \
  -f my-deployment-values.yaml \
  --namespace mcp-host

Uninstalling

helm uninstall go-mcp-host --namespace mcp-host

Troubleshooting

Check pod status:

kubectl get pods -n mcp-host
kubectl describe pod <pod-name> -n mcp-host
kubectl logs <pod-name> -n mcp-host

Check database connection:

kubectl exec -it <pod-name> -n mcp-host -- sh
# Inside the pod, try connecting to postgres

Verify MCP server configuration:

kubectl get configmap go-mcp-host-config -n mcp-host -o yaml

For teams, keep deployment configurations in a separate private repository:

# In your private config repo
my-mcp-configs/
├── dev/
│   ├── values.yaml
│   └── config.yaml
├── staging/
│   ├── values.yaml
│   └── config.yaml
└── prod/
    ├── values.yaml
    └── config.yaml

# Deploy from external configs
helm upgrade --install go-mcp-host ./helm-chart \
  -f ../my-mcp-configs/prod/values.yaml \
  --namespace prod

Support

For issues and questions: