Source build reference
A self-hosted Model Context Protocol gateway for authenticating clients, routing requests to upstream MCP servers, enforcing policy, and recording audit events and OpenTelemetry traces.
Build and run
From the source directory with Go installed:
go build -o mcpgw ./cmd/mcpgw
./mcpgw config init --help
./mcpgw config validate --config configs/example.yaml
./mcpgw --config configs/example.yaml
Before starting, edit configs/example.yaml to point to your upstream and a writable audit file. Keep the listener on loopback until authentication and transport security are configured. mcpgw doctor --help lists preflight options. Existing installations must remove the old license: configuration section. Client API keys, OAuth, rate limits and policy rules still apply normally.
Run go test -race -tags=integration -p=1 ./... for the test suite. Install Helm to exercise the chart-rendering tests. To build a container locally, run docker build -t mcpgw:oss-local .; load it into your cluster or override the chart image with your own registry and tag. This snapshot does not depend on a published image.
License
The full gateway is available under Apache License 2.0, including commercial use. No activation token or paid tier is required. Third-party dependencies retain their own licenses.