You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

75 lines
2.7 KiB

name: mcp-supergateway
# NOTE: copy this file to .env and fill in the keys for the servers you enable.
services:
# Multi-server MCP gateway (supergateway --config).
# One port, one Streamable HTTP endpoint per server: http://localhost:8000/<name>/mcp
# Servers are defined in supergateway.config.jsonc.
mcp:
build:
context: .
network: host
image: chodak166/mcp-supergateway:latest
container_name: mcp-gateway
ports:
- "8000:8000"
env_file:
- .env
volumes:
- ./supergateway.config.jsonc:/etc/supergateway/servers.jsonc:ro
command:
- --config
- /etc/supergateway/servers.jsonc
- --healthEndpoint
- /healthz
restart: unless-stopped
# open-codebase-index (https://github.com/Helweg/open-codebase-index)
# Serves ONE endpoint per registered project: http://localhost:8001/<slug>/mcp
# Projects are registered with ./add-project.sh (list kept in projects.env,
# gateway config generated into supergateway.projects.jsonc). All projects must
# live under PROJECTS_ROOT (set in .env by add-project.sh), which is mounted at
# its own host path so tool results return paths valid on the host.
# Each project's index data lives in <project>/.opencode/index/.
# The index server process is started per client session; nothing idles.
mcp-codebase-index:
build:
context: .
network: host
image: chodak166/mcp-supergateway:latest
container_name: mcp-codebase-index
# Run as the image's `node` user (uid 1000) so index data written into the
# mounted repos is owned by the host user.
user: node
ports:
- "8001:8000"
volumes:
- ${PROJECTS_ROOT:?run ./add-project.sh first}:${PROJECTS_ROOT:?run ./add-project.sh first}
- ./codebase-index.config.json:/etc/codebase-index/config.json:ro
- ./supergateway.projects.jsonc:/etc/supergateway/projects.jsonc:ro
command:
- --config
- /etc/supergateway/projects.jsonc
- --healthEndpoint
- /healthz
restart: unless-stopped
# Optional: local embeddings for semantic (hybrid) codebase indexing.
# Start with: docker compose --profile embeddings up -d
# Then switch indexing.mode to "hybrid" in codebase-index.config.json and set
# embeddingProvider "custom" with baseUrl http://ollama:11434/v1,
# model nomic-embed-text, dimensions 768, and run:
# docker compose exec mcp-codebase-index ocbi index --project $PWD --config /etc/codebase-index/config.json --force
# ollama:
# image: ollama/ollama:latest
# profiles: ["embeddings"]
# ports:
# - "11434:11434"
# volumes:
# - ollama:/root/.ollama
# restart: unless-stopped
# volumes:
# ollama: