Deployment Guide¶
This page summarizes the main ways to deploy the MGP reference gateway.
Deployment Shapes¶
Local Source Path¶
Best for:
- protocol development
- adapter authoring
- debugging reference behavior
Command:
make install
make serve
Installed Package Path¶
Best for:
- lightweight internal deployments
- environments where you want a CLI entrypoint without cloning the whole repo workflow
Command:
python3 -m pip install ./reference
mgp-gateway --host 127.0.0.1 --port 8080
Container Path¶
Best for:
- demos
- local integration environments
- simple CI smoke deployments
Command:
docker compose up --build
Adapter Selection¶
Key environment variables:
MGP_ADAPTERMGP_FILE_STORAGE_DIRMGP_GRAPH_DB_PATHMGP_POSTGRES_DSN
Recommended starting points:
memoryfor local debuggingfilefor simple persistence demospostgresfor a production-oriented self-managed baselinemem0orzepwhen the deployment already depends on those providers
Security And Access¶
Key gateway options:
MGP_GATEWAY_AUTH_MODEMGP_GATEWAY_API_KEYMGP_GATEWAY_BEARER_TOKENMGP_GATEWAY_TENANT_HEADERMGP_GATEWAY_REQUIRE_TENANT_HEADER
See Security Baseline for deployment expectations.
Readiness Checks¶
Operational endpoints:
GET /healthzGET /readyzGET /version
Use them for:
- startup checks
- orchestration readiness probes
- operator inspection of the running gateway version and adapter
Suggested Production Topology¶
flowchart LR
runtime[AgentRuntime] --> gateway[MgpGateway]
gateway --> adapter[AdapterRouter]
adapter --> backend[PostgresOrProvider]
gateway --> audit[AuditSink]
Upgrade Guidance¶
Before upgrading:
- Review the latest tagged release notes or deployment handoff notes.
- Run
make lint. - Run
make test-all. - Re-run any adapter-specific or runtime-specific tests relevant to your deployment.