McGravity is a tool that connects multiple MCP (Model Context Protocol) servers into one unified service. This document explains how to use McGravity with Docker.
docker pull tigranbs/mcgravityBasic usage:
docker run -p 3001:3001 tigranbs/mcgravity http://mcp1.example.com http://mcp2.example.comWith custom host and port:
docker run -p 4000:4000 tigranbs/mcgravity --host 0.0.0.0 --port 4000 http://mcp1.example.com- Create a config.yaml file locally
- Mount it to the container:
docker run -p 3001:3001 -v $(pwd)/config.yaml:/app/config.yaml tigranbs/mcgravity --config /app/config.yaml- Clone the repository:
git clone https://github.com/tigranbs/mcgravity.git
cd mcgravity- Build the Docker image:
docker build -t mcgravity .- Run your local build:
docker run -p 3001:3001 mcgravityservices:
mcgravity:
image: tigranbs/mcgravity:latest
ports:
- '3001:3001'
volumes:
- ./config.yaml:/app/config.yaml
command: --config /app/config.yaml
restart: unless-stopped- The McGravity Docker image is based on Alpine Linux for minimal size
- The application is compiled to a single binary for optimal performance
- Default port exposed: 3001
- Default command:
--help
None currently supported. All configuration is done via command-line arguments or the config file.
If you encounter issues:
- Ensure ports are correctly mapped
- Check that your config file is correctly mounted
- Verify MCP server URLs are accessible from the container
For more details about McGravity itself, see the main README.md.