-
Notifications
You must be signed in to change notification settings - Fork 339
Description
🧭 Epic
Title: Generate Copyable JSON Configs for Client Integration
Goal: Enable MCP Gateway users to quickly generate standardized client configuration blocks (Stdio, SSE, and Streamable HTTP) by clicking a menu on any registered server in the Admin UI.
Why now: Users often need to configure clients (e.g., CLI wrappers or LLM agents) to point at MCP-compatible servers. Automating config generation reduces onboarding friction and ensures consistent integration formats.
🧭 Type of Feature
- Enhancement to existing functionality
- New feature or capability
- Security Related (requires review)
🙋♂️ User Story 1
As a: developer
I want: to download a prefilled JSON config block for a specific server
So that: I can copy it directly into my client’s .mcp.json
or environment
✅ Acceptance Criteria
Scenario: Generate stdio config from server row
Given I view a server in the Admin UI
When I click “⋮” > “Export Config”
Then I see a menu with options: Stdio, SSE, HTTP
And clicking “Stdio” downloads JSON config with correct server ID and placeholders
🙋♂️ User Story 2
As a: gateway user
I want: configs to include placeholder token and timeout
So that: I can easily customize for my runtime environment
📐 Design Sketch
📁 Admin UI Change
On each server row in /admin#catalog
, add:
-
⋮
menu dropdown:-
📄 Export Config
▶️ Stdio- 🌐 SSE
- 🔗 Streamable HTTP
-
Each option opens a modal or downloads a .json
file with populated values.
🧩 JSON Config Templates
▶️ Stdio (Claude or CLI tools)
{
"mcpServers": {
"mcpgateway-wrapper": {
"command": "python",
"args": ["-m", "mcpgateway.wrapper"],
"env": {
"MCP_AUTH_TOKEN": "your-token-here",
"MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6",
"MCP_TOOL_CALL_TIMEOUT": "120"
}
}
}
}
🌐 SSE (LangChain, LlamaIndex, etc.)
{
"mcpServers": {
"my-sse-server": {
"type": "sse",
"url": "http://localhost:4444/servers/a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6/sse",
"headers": {
"Authorization": "Bearer your-token-here"
}
}
}
}
🔗 Streamable HTTP (LLM agents or REST wrappers)
{
"mcpServers": {
"my-http-server": {
"type": "http",
"url": "http://localhost:4444/servers/a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6",
"headers": {
"Authorization": "Bearer your-token-here"
}
}
}
}
🔄 Workflow
- Admin UI fetches server details (UUID4 ID, name, base URL)
- Config templates are rendered with actual values:
- Server UUID4 ID (not placeholder)
- Current gateway host/port from browser URL
- User's current auth token (if available)
- Server name as config key
- Clicking export opens modal or triggers file download with populated config
- User copies or saves ready-to-use config for client apps
🧭 Tasks
Area | Task | Notes |
---|---|---|
UI | [ ] Add "Export Config" menu to each server row | Inline dropdown or 3-dot menu |
[ ] Render modal or download JSON on click | Tailwind modal or HTML <a> tag |
|
[ ] Populate configs with actual server/auth values | Use real UUID, host, token, name | |
Backend | [ ] Provide endpoint or inline logic for config gen | Optional – can be static client |
Docs | [ ] Document what each config does | Link to wrapper/agent repo |
Tests | [ ] UI snapshot test of config modal | Confirm placeholder values |
🔗 MCP Standards Check
- ✔️ Config is client-facing; does not affect protocol
- ✔️ Compatible with stdio/SSE/HTTP clients
- ✔️ Fully backward-compatible
Bonus: consider adding a "Copy to Clipboard" button for each config block and showing gateway-qualified server labels if #116 is active. Do it in a codemirror block so it's syntax highlighted.