4
4
5
5
A 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.
6
6
7
- ![ MCP Gateway] ( docs/docs /images/mcpgateway.gif)
7
+ ![ MCP Gateway] ( https://ibm.github.io/mcp-context-forge /images/mcpgateway.gif)
8
8
---
9
9
10
10
## Overview & Goals
@@ -17,51 +17,7 @@ MCP Gateway builds on the MCP spec by sitting **in front of** MCP Server or REST
17
17
* ** Adapt** arbitrary REST/HTTP APIs into MCP tools with JSON-Schema input validation, retry/rate-limit policies and transparent JSON-RPC invocation
18
18
* ** Simplify** deployments with a full admin UI, rich transports, pre-built DX pipelines and production-grade observability
19
19
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 )
65
21
66
22
---
67
23
@@ -999,6 +955,7 @@ venv - Create a fresh virtual environment with uv & friends
999
955
activate - Activate the virtual environment in the current shell
1000
956
install - Install project into the venv
1001
957
install-dev - Install project (incl. dev deps) into the venv
958
+ install-db - Install project (incl. postgres and redis) into venv
1002
959
update - Update all installed deps inside the venv
1003
960
check-env - Verify all required env vars in .env are present
1004
961
▶️ SERVE & TESTING
@@ -1026,6 +983,7 @@ autoflake - Remove unused imports / variables with autoflake
1026
983
isort - Organise & sort imports with isort
1027
984
flake8 - PEP-8 style & logical errors
1028
985
pylint - Pylint static analysis
986
+ markdownlint - Lint Markdown files with markdownlint (requires markdownlint-cli)
1029
987
mypy - Static type-checking with mypy
1030
988
bandit - Security scan with bandit
1031
989
pydocstyle - Docstring style checker
@@ -1049,10 +1007,17 @@ tox - Run tox across multi-Python versions
1049
1007
sbom - Produce a CycloneDX SBOM and vulnerability scan
1050
1008
pytype - Flow-sensitive type checker
1051
1009
check-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
1052
1013
🕸️ WEBPAGE LINTERS & STATIC ANALYSIS (HTML/CSS/JS lint + security scans + formatting)
1053
1014
install-web-linters - Install HTMLHint, Stylelint, ESLint, Retire.js & Prettier via npm
1054
1015
lint-web - Run HTMLHint, Stylelint, ESLint, Retire.js and npm audit
1055
1016
format-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)
1056
1021
📡 SONARQUBE ANALYSIS
1057
1022
sonar-deps-podman - Install podman-compose + supporting tools
1058
1023
sonar-deps-docker - Install docker-compose + supporting tools
@@ -1070,12 +1035,20 @@ pip-audit - Audit Python dependencies for published CVEs
1070
1035
📦 DEPENDENCY MANAGEMENT
1071
1036
deps-update - Run update-deps.py to update all dependencies in pyproject.toml and docs/requirements.txt
1072
1037
containerfile-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)
1073
1044
🦭 PODMAN CONTAINER BUILD & RUN
1074
1045
podman-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.
1076
1048
podman-run - Run the container on HTTP (port 4444)
1077
1049
podman-run-shell - Run the container on HTTP (port 4444) and start a shell
1078
1050
podman-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)
1079
1052
podman-stop - Stop & remove the container
1080
1053
podman-test - Quick curl smoke-test against the container
1081
1054
podman-logs - Follow container logs (⌃C to quit)
@@ -1085,6 +1058,7 @@ podman-shell - Open an interactive shell inside the Podman container
1085
1058
🐋 DOCKER BUILD & RUN
1086
1059
docker-dev - Build development Docker image
1087
1060
docker - Build production Docker image
1061
+ docker-prod - Build production container image (using ubi-micro → scratch). Not supported on macOS.
1088
1062
docker-run - Run the container on HTTP (port 4444)
1089
1063
docker-run-ssl - Run the container on HTTPS (port 4444, self-signed)
1090
1064
docker-stop - Stop & remove the container
@@ -1093,6 +1067,18 @@ docker-logs - Follow container logs (⌃C to quit)
1093
1067
docker-stats - Show container resource usage stats (non-streaming)
1094
1068
docker-top - Show top-level process info in Docker container
1095
1069
docker-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 ⚠)
1096
1082
☁️ IBM CLOUD CODE ENGINE
1097
1083
ibmcloud-check-env - Verify all required IBM Cloud env vars are set
1098
1084
ibmcloud-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
1105
1091
ibmcloud-ce-logs - Stream logs for the deployed application
1106
1092
ibmcloud-ce-status - Get deployment status
1107
1093
ibmcloud-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
1108
1128
```
1109
1129
1110
1130
## Contributing
0 commit comments