This project provides a centralized hosting environment for Model Context Protocol (MCP) servers using Docker, Traefik, and SuperGateway.
This setup runs a Traefik reverse proxy to route requests to various MCP servers. SuperGateway is used to convert between stdio and SSE transports, allowing the MCP servers to communicate with clients using SSE.
- Notion: Interact with Notion databases and pages
- Linear: Interact with Linear Tickets
- GitHub: Interact with GitHub repositories, issues, and pull requests
- Memory Bank: Tools for recording project notes, thought trails and learnings
- Docker and Docker Compose
- Notion API token
- Linear API token
- GitHub API token
- Clone this repository
- Copy the
.env.example
file to.env
and fill in your API tokens:cp .env.example .env # Edit .env with your API tokens
- Start the services:
docker compose up -d
The project uses a modular Docker Compose structure:
docker-compose.yml
: Main file that includes Traefik configuration and references to service-specific filesdocker-compose/github.yml
: GitHub MCP server configurationdocker-compose/notion.yml
: Notion MCP server configurationdocker-compose/memory-bank.yml
: Memory Bank MCP server configurationdocker-compose/linear.yml
: Linear MCP server configuration
This modular approach allows you to:
- Start all services:
docker compose up -d
(uses the defaultall
profile set in.env
) - Start specific services using profiles:
- GitHub only:
docker compose --profile github up -d
- Notion only:
docker compose --profile notion up -d
- Memory Bank only:
docker compose --profile memory-bank up -d
- Linear only:
docker compose --profile linear up -d
- All services explicitly:
docker compose --profile all up -d
- GitHub only:
- Add new services easily by creating a new file in the
docker-compose
directory
Note: This project follows modern Docker Compose practices by omitting the
version
key, which is no longer required in Docker Compose V2 and above.
Note: The network configuration is defined only in the main
docker-compose.yml
file to avoid conflicts. All services reference this network but don't redefine it.
Note: The default profile is set to
all
in the.env
file using theCOMPOSE_PROFILES
environment variable, allowing you to rundocker compose up
without explicitly specifying a profile.
Once running, you can access the services using each tool's respective path-based route
- Traefik Dashboard: http://$HOSTNAME/dashboard/
- Notion MCP Server:
- SSE Endpoint: http://$HOSTNAME/notion/sse
- Message Endpoint: http://$HOSTNAME/notion/message
- GitHub MCP Server:
- SSE Endpoint: http://$HOSTNAME/github/sse
- Message Endpoint: http://$HOSTNAME/github/message
- Linear MCP Server:
- SSE Endpoint: http://$HOSTNAME/linear/sse
- Message Endpoint: http://$HOSTNAME/linear/message
- Memory-bank MCP Server:
- SSE Endpoint: http://$HOSTNAME/memory-bank/sse
- Message Endpoint: http://$HOSTNAME/memory-bank/message
SuperGateway is used to convert between stdio and SSE transports:
- SuperGateway is installed in the container
- It runs the MCP server command using the
--stdio
flag - It exposes HTTP endpoints for SSE connections and message sending
Traefik is configured to:
- Route requests based on path prefix e.g. (
/notion
,/github
,/dashboard
) - Strip the path prefix before forwarding to the appropriate service
- Set appropriate make sure connections don't die
- Provide a dashboard for monitoring
To test the setup, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js
- Path routing issues: Verify the path prefixes in traefik labels, SuperGateway baseUrl option and strip middleware configuration
- MCP server errors: Check the logs of the container:
docker compose logs -f notion-gateway docker compose logs -f github-gateway
- SuperGateway issues: Ensure the MCP server command is correct and the package exists in node registry- some packages advertise under different names in mcp vs node registries.