Lunar Gateway Integration
Once your Lunar Gateway is installed and connected to MCPX, you’ll begin to see real-time traffic from your MCP servers in the Lunar.dev Control Plane.
As MCPX routes requests to your backend tools, the UI will automatically surface:
- Discovered API endpoints
- Request performance (latency, error rate, throughput)
- Live traffic logs by endpoint and by server
- Gateway routing rules and quota usage
Connection Options
You can run MCPX alongside either a Lunar Hosted Gateway or an on-premises deployment.
To enable this, your container must be granted elevated privileges using the flag
--cap-add=NET_ADMIN
. This grants only your container ability to configure networking, for example, to add firewall rules using iptables.
Hosted Gateway
If you are using the Lunar.dev Hosted Gateway, set your API key via the LUNAR_API_KEY
environment variable:
docker run --rm --cap-add=NET_ADMIN -v ./:/lunar/packages/mcpx-server/config -p 9000:9000 -p 5173:5173 -p 9001:9001 -p 3000:3000 -e LUNAR_API_KEY="YOUR_LUNAR_API_KEY" --name mcpx us-central1-docker.pkg.dev/prj-common-442813/mcpx/mcpx:latest
Make sure to replace
YOUR_LUNAR_API_KEY
with your actual API key found in the Control Plane.
Self-Hosted
If you're running Lunar Gateway on your own infrastructure, point MCPX to it using the LUNAR_URL
environment variable:
docker run --rm --cap-add=NET_ADMIN -v ./:/lunar/packages/mcpx-server/config -p 9000:9000 -p 5173:5173 -p 9001:9001 -p 3000:3000 -e LUNAR_URL="http://localhost:8000" --name mcpx us-central1-docker.pkg.dev/prj-common-442813/mcpx/mcpx:latest
Make sure the
LUNAR_URL
matches the hostname and port used when installing the Lunar Gateway Container.