Get Started with Docker
Set up with Dockerβ
- Create one configuration file to manage all your MCP servers:
- Create a configuration file
mcp.json
. - MCPX will use the
/lunar/mcpx/packages/mcpx-server/config/mcp.json
file for centralized configuration management.
- Copy the following configuration example into
mcp.json
:
{
"mcpServers": {
"time": {
"command": "uvx",
"args": ["mcp-server-time", "--local-timezone=America/New_York"]
}
}
}
This configuration uses a single MCP server, "time", that requires no credentials, for quick-start set up.
- In your directory, run MCPX with the following configuration, exposing ports 9000 and 3000:
docker run --rm --name mcpx -v ./:/mcpx/packages/mcpx-server/config -p 9000:9000 -p 3000:3000 us-central1-docker.pkg.dev/prj-common-442813/mcpx/mcpx:latest
Exposing port 3000 is optional and used for Prometheus metrics scraping.
Congratulations!β
You have now set up your MCPX. You should see the following lines to indicate a successful installation:
MCPX server started on port 9000
Advanced Featuresβ
To enable advanced container features, such as running Docker inside a container (Docker-in-Docker) or managing iptables
rules, your container must be granted elevated privileges.
- Use
--privileged
when running Docker inside a container (DinD). - Use
--cap-add=NET_ADMIN
to manipulate network settings likeiptables
.
These flags grant additional Linux capabilities to the container:
--privileged
gives the container full access to host devices and all capabilities. This is required for DinD since it needs access to low-level kernel features.
--cap-add=NET_ADMIN
is more restrictive and grants only the ability to configure networking, for example, to add firewall rules using iptables.
Always prefer fine-grained access like --cap-add=NET_ADMIN
over --privileged
unless absolutely necessary, as the latter significantly broadens the containerβs access to the host. For more on Docker security and capabilities, see the Docker documentation on runtime privileges and capabilities and the Linux manual pages on capabilities.
Control Planeβ
You can access the MCPX Control Plane Docker installation instructions here.
Once you have an instance running you can navigate to http://localhost:5173/ in your preferred browser.