44
55A flexible feature-rich FastAPI-based gateway for the Model Context Protocol (MCP) that unifies and federates tools, resources, prompts, servers and peer gateways, wraps any REST API as MCP-compliant tools or virtual servers, and exposes everything over HTTP/JSON-RPC, WebSocket, Server-Sent Events (SSE) and stdio transports—all manageable via a rich, interactive Admin UI and packaged as a container with support for any SQLAlchemy supported database.
66
7- ![ MCP Gateway] ( docs/docs /images/mcpgateway.gif)
7+ ![ MCP Gateway] ( https://ibm.github.io/mcp-context-forge /images/mcpgateway.gif)
88---
99
1010## Overview & Goals
@@ -17,51 +17,7 @@ MCP Gateway builds on the MCP spec by sitting **in front of** MCP Server or REST
1717* ** Adapt** arbitrary REST/HTTP APIs into MCP tools with JSON-Schema input validation, retry/rate-limit policies and transparent JSON-RPC invocation
1818* ** Simplify** deployments with a full admin UI, rich transports, pre-built DX pipelines and production-grade observability
1919
20- ``` mermaid
21- graph TD
22- subgraph UI_and_Auth
23- UI[🖥️ Admin UI]
24- Auth[🔐 Auth - JWT and Basic]
25- UI --> Core
26- Auth --> Core
27- end
28-
29- subgraph Gateway_Core
30- Core[🚪 MCP Gateway Core]
31- Protocol[📡 Protocol - Init Ping Completion]
32- Federation[🌐 Federation Manager]
33- Transports[🔀 Transports - HTTP WS SSE Stdio]
34-
35- Core --> Protocol
36- Core --> Federation
37- Core --> Transports
38- end
39-
40- subgraph Services
41- Tools[🧰 Tool Service]
42- Resources[📁 Resource Service]
43- Prompts[📝 Prompt Service]
44- Servers[🧩 Server Service]
45-
46- Core --> Tools
47- Core --> Resources
48- Core --> Prompts
49- Core --> Servers
50- end
51-
52- subgraph Persistence
53- DB[💾 Database - SQLAlchemy]
54- Tools --> DB
55- Resources --> DB
56- Prompts --> DB
57- Servers --> DB
58- end
59-
60- subgraph Caching
61- Cache[⚡ Cache - Redis or Memory]
62- Core --> Cache
63- end
64- ```
20+ ![ mcpgateway] ( https://ibm.github.io/mcp-context-forge/images/mcpgateway.svg )
6521
6622---
6723
@@ -999,6 +955,7 @@ venv - Create a fresh virtual environment with uv & friends
999955activate - Activate the virtual environment in the current shell
1000956install - Install project into the venv
1001957install-dev - Install project (incl. dev deps) into the venv
958+ install-db - Install project (incl. postgres and redis) into venv
1002959update - Update all installed deps inside the venv
1003960check-env - Verify all required env vars in .env are present
1004961▶️ SERVE & TESTING
@@ -1026,6 +983,7 @@ autoflake - Remove unused imports / variables with autoflake
1026983isort - Organise & sort imports with isort
1027984flake8 - PEP-8 style & logical errors
1028985pylint - Pylint static analysis
986+ markdownlint - Lint Markdown files with markdownlint (requires markdownlint-cli)
1029987mypy - Static type-checking with mypy
1030988bandit - Security scan with bandit
1031989pydocstyle - Docstring style checker
@@ -1049,10 +1007,17 @@ tox - Run tox across multi-Python versions
10491007sbom - Produce a CycloneDX SBOM and vulnerability scan
10501008pytype - Flow-sensitive type checker
10511009check-manifest - Verify sdist/wheel completeness
1010+ yamllint - Lint YAML files (uses .yamllint)
1011+ jsonlint - Validate every *.json file with jq (‐‐exit-status)
1012+ tomllint - Validate *.toml files with tomlcheck
10521013🕸️ WEBPAGE LINTERS & STATIC ANALYSIS (HTML/CSS/JS lint + security scans + formatting)
10531014install-web-linters - Install HTMLHint, Stylelint, ESLint, Retire.js & Prettier via npm
10541015lint-web - Run HTMLHint, Stylelint, ESLint, Retire.js and npm audit
10551016format-web - Format HTML, CSS & JS files with Prettier
1017+ osv-install - Install/upgrade osv-scanner (Go)
1018+ osv-scan-source - Scan source & lockfiles for CVEs
1019+ osv-scan-image - Scan the built container image for CVEs
1020+ osv-scan - Run all osv-scanner checks (source, image, licence)
10561021📡 SONARQUBE ANALYSIS
10571022sonar-deps-podman - Install podman-compose + supporting tools
10581023sonar-deps-docker - Install docker-compose + supporting tools
@@ -1070,12 +1035,20 @@ pip-audit - Audit Python dependencies for published CVEs
10701035📦 DEPENDENCY MANAGEMENT
10711036deps-update - Run update-deps.py to update all dependencies in pyproject.toml and docs/requirements.txt
10721037containerfile-update - Update base image in Containerfile to latest tag
1038+ 📦 PACKAGING & PUBLISHING
1039+ dist - Clean-build wheel *and* sdist into ./dist
1040+ wheel - Build wheel only
1041+ sdist - Build source distribution only
1042+ verify - Build + twine + check-manifest + pyroma (no upload)
1043+ publish - Verify, then upload to PyPI (needs TWINE_* creds)
10731044🦭 PODMAN CONTAINER BUILD & RUN
10741045podman-dev - Build development container image
1075- podman - Build production container image
1046+ podman - Build container image
1047+ podman-prod - Build production container image (using ubi-micro → scratch). Not supported on macOS.
10761048podman-run - Run the container on HTTP (port 4444)
10771049podman-run-shell - Run the container on HTTP (port 4444) and start a shell
10781050podman-run-ssl - Run the container on HTTPS (port 4444, self-signed)
1051+ podman-run-ssl-host - Run the container on HTTPS with --network-host (port 4444, self-signed)
10791052podman-stop - Stop & remove the container
10801053podman-test - Quick curl smoke-test against the container
10811054podman-logs - Follow container logs (⌃C to quit)
@@ -1085,6 +1058,7 @@ podman-shell - Open an interactive shell inside the Podman container
10851058🐋 DOCKER BUILD & RUN
10861059docker-dev - Build development Docker image
10871060docker - Build production Docker image
1061+ docker-prod - Build production container image (using ubi-micro → scratch). Not supported on macOS.
10881062docker-run - Run the container on HTTP (port 4444)
10891063docker-run-ssl - Run the container on HTTPS (port 4444, self-signed)
10901064docker-stop - Stop & remove the container
@@ -1093,6 +1067,18 @@ docker-logs - Follow container logs (⌃C to quit)
10931067docker-stats - Show container resource usage stats (non-streaming)
10941068docker-top - Show top-level process info in Docker container
10951069docker-shell - Open an interactive shell inside the Docker container
1070+ 🛠️ COMPOSE STACK - Build / start / stop the multi-service stack
1071+ compose-up - Bring the whole stack up (detached)
1072+ compose-restart - Recreate changed containers, pulling / building as needed
1073+ compose-build - Build (or rebuild) images defined in the compose file
1074+ compose-pull - Pull the latest images only
1075+ compose-logs - Tail logs from all services (Ctrl-C to exit)
1076+ compose-ps - Show container status table
1077+ compose-shell - Open an interactive shell in the "gateway" container
1078+ compose-stop - Gracefully stop the stack (keep containers)
1079+ compose-down - Stop & remove containers (keep named volumes)
1080+ compose-rm - Remove *stopped* containers
1081+ compose-clean - ✨ Down **and** delete named volumes (data-loss ⚠)
10961082☁️ IBM CLOUD CODE ENGINE
10971083ibmcloud-check-env - Verify all required IBM Cloud env vars are set
10981084ibmcloud-cli-install - Auto-install IBM Cloud CLI + required plugins (OS auto-detected)
@@ -1105,6 +1091,40 @@ ibmcloud-deploy - Deploy (or update) container image in Code Engine
11051091ibmcloud-ce-logs - Stream logs for the deployed application
11061092ibmcloud-ce-status - Get deployment status
11071093ibmcloud-ce-rm - Delete the Code Engine application
1094+ 🧪 MINIKUBE LOCAL CLUSTER
1095+ minikube-install - Install Minikube (macOS, Linux, or Windows via choco)
1096+ helm-install - Install Helm CLI (macOS, Linux, or Windows)
1097+ minikube-start - Start local Minikube cluster with Ingress + DNS + metrics-server
1098+ minikube-stop - Stop the Minikube cluster
1099+ minikube-delete - Delete the Minikube cluster
1100+ minikube-image-load - Build and load ghcr.io/ibm/mcp-context-forge:latest into Minikube
1101+ minikube-k8s-apply - Apply Kubernetes manifests from k8s/
1102+ minikube-status - Show status of Minikube and ingress pods
1103+ 🛠️ HELM CHART TASKS
1104+ helm-lint - Lint the Helm chart (static analysis)
1105+ helm-package - Package the chart into dist/ as mcp-stack-<ver>.tgz
1106+ helm-deploy - Upgrade/Install chart into Minikube (profile mcpgw)
1107+ helm-delete - Uninstall the chart release from Minikube
1108+ 🏠 LOCAL PYPI SERVER
1109+ local-pypi-install - Install pypiserver for local testing
1110+ local-pypi-start - Start local PyPI server on :8084 (no auth)
1111+ local-pypi-start-auth - Start local PyPI server with basic auth (admin/admin)
1112+ local-pypi-stop - Stop local PyPI server
1113+ local-pypi-upload - Upload existing package to local PyPI (no auth)
1114+ local-pypi-upload-auth - Upload existing package to local PyPI (with auth)
1115+ local-pypi-test - Install package from local PyPI
1116+ local-pypi-clean - Full cycle: build → upload → install locally
1117+ 🏠 LOCAL DEVPI SERVER
1118+ devpi-install - Install devpi server and client
1119+ devpi-init - Initialize devpi server (first time only)
1120+ devpi-start - Start devpi server
1121+ devpi-stop - Stop devpi server
1122+ devpi-setup-user - Create user and dev index
1123+ devpi-upload - Upload existing package to devpi
1124+ devpi-test - Install package from devpi
1125+ devpi-clean - Full cycle: build → upload → install locally
1126+ devpi-status - Show devpi server status
1127+ devpi-web - Open devpi web interface
11081128```
11091129
11101130## Contributing
0 commit comments