Skip to content

Quickstart — Run the Gateway Locally

Prerequisites

Python 3.11+, curl, and optionally Docker (for Phoenix). Works on macOS, Linux, WSL2.

1) Install & Launch

python3 -m venv .venv && source .venv/bin/activate
pip install -U mcp-contextforge-gateway
mcpgateway --host 0.0.0.0 --port 4444

Verify:

curl -s http://localhost:4444/health | jq .

Expected: small JSON with a healthy status.

2) Token for Auth (JWT)

export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token   --username [email protected] --exp 10080 --secret my-test-key)

3) List Tools (MCP CLI)

mcp --server http://localhost:4444 tools list

Expected: likely empty catalog (before registering servers).

4) (Optional) Phoenix Tracing

docker run -p 6006:6006 -p 4317:4317 arizephoenix/phoenix:latest
export OTEL_ENABLE_OBSERVABILITY=true
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
mcpgateway

Tip

Keep the gateway running while you work through Labs and the Capstone.