Skip to content

Commit 6d184ad

Browse files
committed
Cleanup docs, add roadmap, update dependencies, add smoketest.py
Signed-off-by: Mihai Criveti <[email protected]>
1 parent ccdd6b7 commit 6d184ad

File tree

8 files changed

+592
-18
lines changed

8 files changed

+592
-18
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --
7878
# Run a local MCP Server (github) listening on SSE http://localhost:8000/sse
7979
pip install uvenv
8080
npx -y supergateway --stdio "uvenv run mcp-server-git"
81+
# or time: npx -y supergateway --stdio "uvenv run mcp_server_time -- --local-timezone=Europe/Dublin" --port 8002
8182

8283
#--------------------------------------------
8384
# Register the MCP Server with the gateway and test it

docs/docs/architecture/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
nav:
22
- Overview: index.md
3+
- Roadmap: roadmap.md
34
- Decision Records: adr

docs/docs/architecture/roadmap.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Roadmap
2+
3+
---
4+
5+
## 🔐 Authentication & Identity
6+
7+
### 🧭 [#87 Epic: JWT Token Catalog with Per-User Expiry and Revocation](https://github.com/IBM/mcp-context-forge/issues/87)
8+
9+
???+ "Token Lifecycle Management"
10+
**Generate Tokens:** As a platform admin, I want to generate one-time API tokens so I can issue short-lived credentials.
11+
12+
**Revoke Tokens:** As a platform admin, I want to revoke tokens so I can disable exposed or obsolete tokens.
13+
14+
**API Token Management:** As a user or automation client, I want to list, create, and revoke tokens via API so I can automate credential workflows.
15+
16+
🧭 Epic: Per-Virtual-Server API Keys
17+
18+
???+ "Scoped Server Access"
19+
**Server-Scoped Keys:** As a platform admin, I want to create API keys tied to a specific virtual server so that credentials are limited in scope.
20+
21+
**Key Rotation & Revocation:** As a platform admin, I want to rotate or revoke a virtual server's API keys so I can maintain security without affecting other servers.
22+
23+
**API Management UI & API:** As a developer, I want to list, create, rotate, and revoke server API keys via the Admin UI and REST API so I can automate credential lifecycle for each virtual server.
24+
25+
---
26+
27+
## 📈 Observability & Telemetry
28+
29+
### 🧭 Epic: OpenTelemetry Tracing & Metrics Export
30+
31+
???+ "Trace & Metric Visibility"
32+
**Distributed Tracing:** As a developer, I want traces spanning tools, prompts, and gateways so I can understand multi-step flows.
33+
34+
**Metrics Scraping:** As an SRE, I want a Prometheus-compatible `/metrics` endpoint so I can alert on latency and error rate.
35+
36+
### 🧭 Epic: Structured JSON Logging with Correlation IDs
37+
38+
???+ "Context-Rich Logging"
39+
**Correlation IDs:** As a DevOps user, I want logs with correlation and trace IDs so I can trace a request across services.
40+
41+
---
42+
43+
## ⚙️ Lifecycle & Management
44+
45+
### 🧭 Epic: Hot Configuration Reload
46+
47+
???+ "Dynamic Config Updates"
48+
**In-Place Reload:** As a system admin, I want to apply config changes (tools, servers, resources) without restarts so I maintain zero-downtime.
49+
50+
### 🧭 Epic: CLI Enhancements for Admin Operations
51+
52+
???+ "Automated Admin Commands"
53+
**Admin CLI:** As a DevOps engineer, I want CLI subcommands to register tools, flush caches, and export configs so I can integrate with CI/CD.
54+
55+
### 🧭 Epic: Config Import/Export (JSON Gateways & Virtual Servers)
56+
57+
???+ "JSON Config Portability"
58+
**Individual Entity Export/Import:** As a platform admin, I want to export or import a single gateway or virtual server's config in JSON so I can backup or migrate that one entity.
59+
60+
**Bulk Export/Import:** As a platform admin, I want to export or import the full configuration (all gateways, virtual servers, prompts, resources) at once so I can replicate environments or perform large-scale updates.
61+
62+
**Encrypted Credentials:** As a security-conscious operator, I want passwords and sensitive fields in exported JSON to be encrypted so my backups remain secure.
63+
64+
???+ "Automated Admin Commands"
65+
**Admin CLI:** As a DevOps engineer, I want CLI subcommands to register tools, flush caches, and export configs so I can integrate with CI/CD.
66+
67+
### 🧭 Epic: Cache Management API
68+
69+
???+ "Cache Control"
70+
**Cache Inspection & Flush:** As a site admin, I want endpoints to view cache stats and clear entries so I can manage data freshness.
71+
72+
---
73+
74+
## 🌐 Federation & Routing
75+
76+
### 🧭 Epic: Dynamic Federation Management
77+
78+
???+ "Peer Gateway Management"
79+
**Register/Remove Peers:** As a platform admin, I want to add or remove federated gateways at runtime so I can scale and maintain federation.
80+
81+
### 🧭 Epic: Circuit Breakers for Unstable Backends
82+
83+
???+ "Backend Isolation"
84+
**Circuit Breaker:** As the gateway, I want to trip circuits for backends after repeated failures so I prevent cascading retries.
85+
86+
### 🧭 Epic: Intelligent Load Balancing for Redundant Servers
87+
88+
???+ "Smart Request Routing"
89+
**Adaptive Balancing:** As an orchestrator, I want to route to the fastest healthy backend instance so I optimize response times.
90+
91+
---
92+
93+
## 🛠️ Developer Experience
94+
95+
### 🧭 Epic: Prompt Template Tester & Validator
96+
97+
???+ "Prompt Validation"
98+
**Template Linting:** As a prompt engineer, I want to preview and validate Jinja2 templates with sample data so I avoid runtime errors.
99+
100+
### 🧭 Epic: System Diagnostics & Self-Check Report
101+
102+
???+ "Diagnostics Bundle"
103+
**Diagnostic Export:** As an operator, I want a self-contained system report (config, health, metrics) so I can troubleshoot effectively.
104+
105+
### 🧭 Epic: Auto-Tuning of Timeout & Retry Policies
106+
107+
???+ "Adaptive Policy Tuning"
108+
**Auto-Tuning:** As the gateway, I want to adjust timeouts and retry intervals based on observed latencies so I balance reliability and speed.
109+
110+
---
111+
112+
## 📦 Resilience & Runtime
113+
114+
### 🧭 Epic: Graceful Startup and Shutdown
115+
116+
???+ "Graceful Lifecycle"
117+
**In-Flight Draining:** As the gateway, I want to complete active requests before shutdown so I prevent dropped connections.
118+
119+
### 🧭 Epic: High Availability via Stateless Clustering
120+
121+
???+ "Clustered Scaling"
122+
**Stateless Instances:** As an architect, I want multiple interchangeable gateway nodes so I can load-balance and ensure failover.
123+
124+
---
125+
126+
## 🧭 Namespaces & Catalog Integrity
127+
128+
### 🧭 Epic: Name Collision Handling in Federated Catalogs
129+
130+
???+ "Unified Naming"
131+
**Namespaced Tools:** As an operator, I want to distinguish identical tool names from different servers (e.g. `ServerA/toolX` vs `ServerB/toolX`) so I avoid conflicts.
132+
133+
---
134+
135+
## 🔐 Secrets & Sensitive Data
136+
137+
### 🧭 Epic: Secure Secrets Management & Masking
138+
139+
???+ "Externalized Secrets"
140+
**Secret Store Integration:** As an operator, I want to fetch credentials from a secrets manager so I avoid storing secrets in static configs.
141+
142+
**Log Scrubbing:** As a compliance officer, I want sensitive data masked in logs and metrics so I maintain data security.
143+
144+
---
145+
146+
### 🧭 Epic: LDAP & External Identity Integration
147+
148+
???+ "Corporate Directory Auth"
149+
**LDAP Authentication:** As a platform admin, I want to configure LDAP/Active Directory so that users authenticate with corporate credentials.
150+
151+
**Group Sync:** As a platform admin, I want to sync LDAP/AD groups into gateway roles so I can manage permissions via directory groups.
152+
153+
**SSO Integration:** As a platform admin, I want to support SAML/OIDC so that teams can use existing single sign-on.
154+
155+
---
156+
157+
### 🧭 Epic: Role-Based Access Control (User/Team/Global Scopes)
158+
159+
???+ "RBAC & Scoping"
160+
**User-Level Scopes:** As a platform admin, I want to assign permissions at the individual user level so that I can grant fine-grained access.
161+
162+
**Team-Level Scopes:** As a platform admin, I want to define teams and grant scopes to teams so that I can manage permissions for groups of users.
163+
164+
**Global Scopes:** As a platform admin, I want to set global default scopes so that baseline permissions apply to all users.

docs/requirements.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ colorama>=0.4.6
1414
csscompressor>=0.9.5
1515
cssselect2>=0.8.0
1616
defusedxml>=0.7.1
17-
EditorConfig>=0.17.0
17+
EditorConfig>=0.17.1
1818
flatten-json>=0.1.14
19-
fonttools>=4.58.0
19+
fonttools>=4.58.2
2020
funcparserlib>=1.0.1
2121
ghp-import>=2.1.0
2222
gitdb>=4.0.12
@@ -38,8 +38,8 @@ mkdocs>=1.6.1
3838
mkdocs-awesome-pages-plugin>=2.10.1
3939
mkdocs-blog-plugin>=0.25
4040
mkdocs-enumerate-headings-plugin>=0.6.2
41-
mkdocs-git-authors-plugin>=0.9.5
42-
mkdocs-git-revision-date-localized-plugin>=1.4.5
41+
mkdocs-git-authors-plugin>=0.10.0
42+
mkdocs-git-revision-date-localized-plugin>=1.4.7
4343
mkdocs-glightbox>=0.4.0
4444
mkdocs-include-markdown-plugin>=7.1.5
4545
mkdocs-material>=9.6.14
@@ -49,15 +49,15 @@ mkdocs-mermaid2-plugin>=1.2.1
4949
mkdocs-minify-plugin>=0.8.0
5050
mkdocs-pdf-export-plugin>=0.5.10
5151
mkdocs-plugin-inline-svg>=0.1.0
52-
mkdocs-rss-plugin>=1.17.1
52+
mkdocs-rss-plugin>=1.17.3
5353
mkdocs-table-reader-plugin>=3.1.0
5454
mkdocs-with-pdf>=0.9.3
5555
natsort>=8.4.0
56-
numpy>=2.2.6
56+
numpy>=2.3.0
5757
nwdiag>=3.0.0
5858
packaging>=25.0
5959
paginate>=0.5.7
60-
pandas>=2.2.3
60+
pandas>=2.3.0
6161
pathspec>=0.12.1
6262
pillow>=11.2.1
6363
platformdirs>=4.3.8
@@ -72,7 +72,7 @@ pytz>=2025.2
7272
PyYAML>=6.0.2
7373
pyyaml_env_tag>=1.1
7474
regex>=2024.11.6
75-
requests>=2.32.3
75+
requests>=2.32.4
7676
seqdiag>=3.0.0
7777
six>=1.17.0
7878
smmap>=5.0.2
@@ -86,5 +86,5 @@ wcmatch>=10.0
8686
weasyprint>=65.1
8787
webcolors>=24.11.1
8888
webencodings>=0.5.1
89-
zipp>=3.21.0
89+
zipp>=3.23.0
9090
zopfli>=0.2.3.post1

mcpgateway/services/gateway_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
try:
3939
import redis
40+
4041
REDIS_AVAILABLE = True
4142
except ImportError:
4243
REDIS_AVAILABLE = False
@@ -110,9 +111,9 @@ def __init__(self):
110111

111112
if self.redis_url and REDIS_AVAILABLE:
112113
self._redis_client = redis.from_url(self.redis_url)
113-
self._instance_id = str(uuid.uuid4()) # Unique ID for this process
114+
self._instance_id = str(uuid.uuid4()) # Unique ID for this process
114115
self._leader_key = "gateway_service_leader"
115-
self._leader_ttl = 40 # seconds
116+
self._leader_ttl = 40 # seconds
116117
elif settings.cache_type != "none":
117118
# Fallback: File-based lock
118119
self._redis_client = None

mcpgateway/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ async def version_endpoint(
395395
if partial:
396396
# Return partial HTML fragment for HTMX embedding
397397
from fastapi.templating import Jinja2Templates
398+
398399
templates = Jinja2Templates(directory="mcpgateway/templates")
399400
return templates.TemplateResponse("version_info_partial.html", {"request": request, "payload": payload})
400401
wants_html = fmt == "html" or "text/html" in request.headers.get("accept", "")

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ maintainers = [
4646
# Runtime dependencies
4747
# ----------------------------------------------------------------
4848
dependencies = [
49-
"cryptography>=45.0.3",
49+
"cryptography>=45.0.4",
5050
"fastapi>=0.115.12",
51+
"filelock>=3.18.0",
5152
"gunicorn>=23.0.0",
5253
"httpx>=0.28.1",
5354
"jinja2>=3.1.6",
5455
"jq>=1.8.0",
5556
"jsonpath-ng>=1.7.0",
5657
"jsonschema>=4.24.0",
57-
"mcp>=1.9.3",
58+
"mcp>=1.9.4",
5859
"parse>=1.20.2",
5960
"psutil>=7.0.0",
6061
"pydantic>=2.11.5",
@@ -65,7 +66,6 @@ dependencies = [
6566
"starlette>=0.46.2",
6667
"uvicorn>=0.34.3",
6768
"zeroconf>=0.147.0",
68-
"filelock>=3.18.0",
6969
]
7070

7171
# ----------------------------------------------------------------
@@ -102,7 +102,7 @@ dev = [
102102
"check-manifest>=0.50",
103103
"code2flow>=2.5.1",
104104
"cookiecutter>=2.6.0",
105-
"coverage>=7.8.2",
105+
"coverage>=7.9.0",
106106
"coverage-badge>=1.1.2",
107107
"darglint>=1.8.1",
108108
"fawltydeps>=0.20.0",
@@ -119,12 +119,12 @@ dev = [
119119
"pylint>=3.3.7",
120120
"pylint-pydantic>=0.3.5",
121121
"pyre-check>=0.9.23",
122-
"pyright>=1.1.401",
122+
"pyright>=1.1.402",
123123
"pyroma>=4.2",
124124
"pyspelling>=2.10",
125125
"pytest>=8.4.0",
126126
"pytest-asyncio>=1.0.0",
127-
"pytest-cov>=6.1.1",
127+
"pytest-cov>=6.2.1",
128128
"pytest-examples>=0.0.18",
129129
"pytest-md-report>=0.7.0",
130130
"pytest-rerunfailures>=15.1",
@@ -136,7 +136,7 @@ dev = [
136136
"snakeviz>=2.2.2",
137137
"tomlcheck>=0.2.3",
138138
"twine>=6.1.0",
139-
"ty>=0.0.1a8",
139+
"ty>=0.0.1a9",
140140
"types-tabulate>=0.9.0.20241207",
141141
]
142142

0 commit comments

Comments
 (0)