diff --git a/AGENTS.md b/AGENTS.md index 90388fe39..14ee35423 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -62,5 +62,5 @@ MCP helpers ## Security & Configuration Tips - Copy `.env.example` β†’ `.env`; verify with `make check-env`. Never commit secrets. - Auth: set `JWT_SECRET_KEY`; export `MCPGATEWAY_BEARER_TOKEN` using the token utility for API calls. -- Wrapper: set `MCP_SERVER_CATALOG_URLS` and `MCP_AUTH_TOKEN` when using `mcpgateway.wrapper`. +- Wrapper: set `MCP_SERVER_URL` and `MCP_AUTH` when using `mcpgateway.wrapper`. - TLS: `make certs` β†’ `make serve-ssl`. Prefer environment variables for config; see `README.md`. diff --git a/CLAUDE.md b/CLAUDE.md index 897c3a941..df2697c75 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -58,8 +58,8 @@ python3 -m mcpgateway.translate \ --stdio "uvx mcp-server-git" --port 9000 # Run the stdio wrapper for MCP clients -export MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN -export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID +export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN +export MCP_SERVER_URL=http://localhost:4444/servers/UUID/mcp python3 -m mcpgateway.wrapper ``` diff --git a/DEVELOPING.md b/DEVELOPING.md index 7bc58b042..ae508fd42 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -5,8 +5,8 @@ ```bash # Gateway & auth export MCP_GATEWAY_BASE_URL=http://localhost:4444 -export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 -export MCP_AUTH_TOKEN="" +export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp +export MCP_AUTH="" ``` | Mode | Command | Notes | diff --git a/README.md b/README.md index 683cc9184..777a9ee3f 100644 --- a/README.md +++ b/README.md @@ -376,22 +376,32 @@ npx -y @modelcontextprotocol/inspector πŸ–§ Using the stdio wrapper (mcpgateway-wrapper) ```bash -export MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN -export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 +export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN +export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp python3 -m mcpgateway.wrapper # Ctrl-C to exit ``` You can also run it with `uv` or inside Docker/Podman - see the *Containers* section above. -In MCP Inspector, define `MCP_AUTH_TOKEN` and `MCP_SERVER_CATALOG_URLS` env variables, and select `python3` as the Command, and `-m mcpgateway.wrapper` as Arguments. +In MCP Inspector, define `MCP_AUTH` and `MCP_SERVER_URL` env variables, and select `python3` as the Command, and `-m mcpgateway.wrapper` as Arguments. ```bash echo $PWD/.venv/bin/python3 # Using the Python3 full path ensures you have a working venv -export MCP_SERVER_CATALOG_URLS='http://localhost:4444/servers/UUID_OF_SERVER_1' -export MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} +export MCP_SERVER_URL='http://localhost:4444/servers/UUID_OF_SERVER_1/mcp' +export MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} npx -y @modelcontextprotocol/inspector ``` +or + +Pass the url and auth as arguments (no need to set environment variables) +```bash +npx -y @modelcontextprotocol/inspector +command as `python` +Arguments as `-m mcpgateway.wrapper --url "http://localhost:4444/servers/UUID_OF_SERVER_1/mcp" --auth "Bearer "` +``` + + When using a MCP Client such as Claude with stdio: ```json @@ -401,8 +411,8 @@ When using a MCP Client such as Claude with stdio: "command": "python", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "your-token-here", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", + "MCP_AUTH": "your-token-here", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1", "MCP_TOOL_CALL_TIMEOUT": "120" } } @@ -591,14 +601,14 @@ The `mcpgateway.wrapper` lets you connect to the gateway over **stdio** while ke ```bash # Set environment variables export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 10080 --secret my-test-key) -export MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} -export MCP_SERVER_CATALOG_URLS='http://localhost:4444/servers/UUID_OF_SERVER_1' +export MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} +export MCP_SERVER_URL='http://localhost:4444/servers/UUID_OF_SERVER_1/mcp' export MCP_TOOL_CALL_TIMEOUT=120 export MCP_WRAPPER_LOG_LEVEL=DEBUG # or OFF to disable logging docker run --rm -i \ - -e MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN \ - -e MCP_SERVER_CATALOG_URLS=http://host.docker.internal:4444/servers/UUID_OF_SERVER_1 \ + -e MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN \ + -e MCP_SERVER_URL=http://host.docker.internal:4444/servers/UUID_OF_SERVER_1/mcp \ -e MCP_TOOL_CALL_TIMEOUT=120 \ -e MCP_WRAPPER_LOG_LEVEL=DEBUG \ ghcr.io/ibm/mcp-context-forge:0.5.0 \ @@ -615,8 +625,8 @@ Because the wrapper speaks JSON-RPC over stdin/stdout, you can interact with it ```bash # Start the MCP Gateway Wrapper -export MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} -export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/YOUR_SERVER_UUID +export MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} +export MCP_SERVER_URL=http://localhost:4444/servers/YOUR_SERVER_UUID python3 -m mcpgateway.wrapper ``` @@ -667,8 +677,8 @@ python3 -m mcpgateway.wrapper The `mcpgateway.wrapper` exposes everything your Gateway knows about over **stdio**, so any MCP client that *can't* (or *shouldn't*) open an authenticated SSE stream still gets full tool-calling power. -> **Remember** to substitute your real Gateway URL (and server ID) for `http://localhost:4444/servers/UUID_OF_SERVER_1`. -> When inside Docker/Podman, that often becomes `http://host.docker.internal:4444/servers/UUID_OF_SERVER_1` (macOS/Windows) or the gateway container's hostname (Linux). +> **Remember** to substitute your real Gateway URL (and server ID) for `http://localhost:4444/servers/UUID_OF_SERVER_1/mcp`. +> When inside Docker/Podman, that often becomes `http://host.docker.internal:4444/servers/UUID_OF_SERVER_1/mcp` (macOS/Windows) or the gateway container's hostname (Linux). --- @@ -678,8 +688,8 @@ The `mcpgateway.wrapper` exposes everything your Gateway knows about over **stdi ```bash docker run -i --rm \ --network=host \ - -e MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 \ - -e MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} \ + -e MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp \ + -e MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} \ -e MCP_TOOL_CALL_TIMEOUT=120 \ ghcr.io/ibm/mcp-context-forge:0.5.0 \ python3 -m mcpgateway.wrapper @@ -697,8 +707,8 @@ docker run -i --rm \ pipx install --include-deps mcp-contextforge-gateway # Run the stdio wrapper -MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} \ -MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 \ +MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} \ +MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp \ python3 -m mcpgateway.wrapper # Alternatively with uv uv run --directory . -m mcpgateway.wrapper @@ -713,8 +723,8 @@ uv run --directory . -m mcpgateway.wrapper "command": "python3", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", + "MCP_AUTH": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1/mcp", "MCP_TOOL_CALL_TIMEOUT": "120" } } @@ -750,8 +760,8 @@ source ~/.venv/mcpgateway/bin/activate uv pip install mcp-contextforge-gateway # Launch wrapper -MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} \ -MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 \ +MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} \ +MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp \ uv run --directory . -m mcpgateway.wrapper # Use this just for testing, as the Client will run the uv command ``` @@ -770,8 +780,8 @@ uv run --directory . -m mcpgateway.wrapper # Use this just for testing, as the C "mcpgateway.wrapper" ], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1" + "MCP_AUTH": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1/mcp" } } } diff --git a/docs/docs/overview/quick_start.md b/docs/docs/overview/quick_start.md index f87b2bc6a..6e64474a9 100644 --- a/docs/docs/overview/quick_start.md +++ b/docs/docs/overview/quick_start.md @@ -207,8 +207,8 @@ npx -y @modelcontextprotocol/inspector ## Connect via `mcpgateway-wrapper` (stdio) ```bash -export MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN -export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 +export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN +export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp python3 -m mcpgateway.wrapper # behaves as a local MCP stdio server - run from MCP client ``` @@ -221,8 +221,8 @@ Use this in GUI clients (Claude Desktop, Continue, etc.) that prefer stdio. Exam "command": "python3", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", - "MCP_AUTH_TOKEN": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1/mcp", + "MCP_AUTH": "", "MCP_TOOL_CALL_TIMEOUT": "120" } } diff --git a/docs/docs/testing/acceptance.md b/docs/docs/testing/acceptance.md index de40ff651..8895d6b32 100644 --- a/docs/docs/testing/acceptance.md +++ b/docs/docs/testing/acceptance.md @@ -165,7 +165,7 @@ graph TB | Feature | URL | Commands | Expected Result | Status | Notes | |---------|-----|----------|-----------------|--------|-------| | Install Package | `pip install mcp-contextforge-gateway` | Install for wrapper | Package installed | ☐ | If not already done | -| Set Environment | `export MCP_SERVER_CATALOG_URLS="$GW_URL/servers/$TIME_SERVER_UUID" && export MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN` | Configure wrapper | Environment set | ☐ | Point to virtual server | +| Set Environment | `export MCP_SERVER_URL="$GW_URL/servers/$TIME_SERVER_UUID" && export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN` | Configure wrapper | Environment set | ☐ | Point to virtual server | | Test Wrapper Init | `echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \| python3 -m mcpgateway.wrapper 2>/dev/null \| jq` | Initialize via stdio | Returns capabilities with tools | ☐ | Stdio to HTTP bridge | | List Tools via Wrapper | `echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \| python3 -m mcpgateway.wrapper 2>/dev/null \| jq` | List tools via stdio | Returns tool list | ☐ | Wrapper functionality | @@ -183,8 +183,8 @@ graph TB "command": "python", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_SERVER_CATALOG_URLS": "$GW_URL/servers/$TIME_SERVER_UUID", - "MCP_AUTH_TOKEN": "$MCPGATEWAY_BEARER_TOKEN" + "MCP_SERVER_URL": "$GW_URL/servers/$TIME_SERVER_UUID", + "MCP_AUTH": "$MCPGATEWAY_BEARER_TOKEN" } } } diff --git a/docs/docs/tutorials/argocd-helm-deployment-ibm-cloud-iks.md b/docs/docs/tutorials/argocd-helm-deployment-ibm-cloud-iks.md index 772f63355..498eaeac0 100644 --- a/docs/docs/tutorials/argocd-helm-deployment-ibm-cloud-iks.md +++ b/docs/docs/tutorials/argocd-helm-deployment-ibm-cloud-iks.md @@ -694,8 +694,8 @@ Add to your Claude Desktop configuration: "command": "python", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "https://mcp-gateway./servers/UUID_OF_SERVER_1" + "MCP_AUTH": "", + "MCP_SERVER_URL": "https://mcp-gateway./servers/UUID_OF_SERVER_1/mcp" } } } diff --git a/docs/docs/using/agents/bee.md b/docs/docs/using/agents/bee.md index e6d3e09fe..7f5a6d5be 100644 --- a/docs/docs/using/agents/bee.md +++ b/docs/docs/using/agents/bee.md @@ -36,7 +36,7 @@ To use MCP tools in the Bee Agent Framework, follow these steps: ```bash export MCP_GATEWAY_BASE_URL=http://localhost:4444 - export MCP_AUTH_TOKEN="your_bearer_token" + export MCP_AUTH="your_bearer_token" ``` --- diff --git a/docs/docs/using/clients/claude-desktop.md b/docs/docs/using/clients/claude-desktop.md index 28bc2c7e6..2f0fcb336 100644 --- a/docs/docs/using/clients/claude-desktop.md +++ b/docs/docs/using/clients/claude-desktop.md @@ -26,8 +26,8 @@ prompt and resource registered in your Gateway. "command": "python3", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", - "MCP_AUTH_TOKEN": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1", + "MCP_AUTH": "", "MCP_TOOL_CALL_TIMEOUT": "120" } } @@ -46,8 +46,8 @@ prompt and resource registered in your Gateway. "command": "docker", "args": [ "run", "--rm", "--network=host", "-i", - "-e", "MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1", - "-e", "MCP_AUTH_TOKEN=", + "-e", "MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1", + "-e", "MCP_AUTH=", "ghcr.io/ibm/mcp-context-forge:0.5.0", "python3", "-m", "mcpgateway.wrapper" ] @@ -67,8 +67,8 @@ If you installed the package globally: "command": "pipx", "args": ["run", "python3", "-m", "mcpgateway.wrapper"], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", - "MCP_AUTH_TOKEN": "" + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1", + "MCP_AUTH": "" } } ``` @@ -94,8 +94,8 @@ If tools don't appear, open *File β–Έ Settings β–Έ Developer β–Έ View Logs* to s | Var | Purpose | | ------------------------- | ------------------------------------------------- | -| `MCP_SERVER_CATALOG_URLS` | One or more `/servers/{id}` endpoints (comma-sep) | -| `MCP_AUTH_TOKEN` | JWT bearer for Gateway auth | +| `MCP_SERVER_URL` | One or more `/servers/{id}` endpoints (comma-sep) | +| `MCP_AUTH` | JWT bearer for Gateway auth | | `MCP_TOOL_CALL_TIMEOUT` | Per-tool timeout (seconds, optional) | | `MCP_WRAPPER_LOG_LEVEL` | `DEBUG`, `INFO`, `OFF` (optional) | diff --git a/docs/docs/using/clients/cline.md b/docs/docs/using/clients/cline.md index 5bacd9db4..e96e2c54f 100644 --- a/docs/docs/using/clients/cline.md +++ b/docs/docs/using/clients/cline.md @@ -51,8 +51,8 @@ To integrate Cline with your MCP Gateway: "mcpgateway.wrapper" ], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444", - "MCP_AUTH_TOKEN": "REPLACE_WITH_MCPGATEWAY_BEARER_TOKEN", + "MCP_SERVER_URL": "http://localhost:4444", + "MCP_AUTH": "Bearer REPLACE_WITH_MCPGATEWAY_BEARER_TOKEN", "MCP_WRAPPER_LOG_LEVEL": "OFF" } } diff --git a/docs/docs/using/clients/continue.md b/docs/docs/using/clients/continue.md index e1fdd2f1f..c5a66957b 100644 --- a/docs/docs/using/clients/continue.md +++ b/docs/docs/using/clients/continue.md @@ -46,7 +46,7 @@ There are **two ways** to attach Continue to a gateway: "type": "sse", "url": "http://localhost:4444/servers/UUID_OF_SERVER_1/sse", "headers": { - "Authorization": "Bearer ${env:MCP_AUTH_TOKEN}" + "Authorization": "Bearer ${env:MCP_AUTH}" } } } @@ -57,7 +57,7 @@ There are **two ways** to attach Continue to a gateway: *Generate a token*: ```bash -export MCP_AUTH_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key) +export MCP_AUTH=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key) ``` ### Option B - Local stdio bridge (`mcpgateway.wrapper`) @@ -79,8 +79,8 @@ pipx install --include-deps mcp-contextforge-gateway "command": "python3", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", - "MCP_AUTH_TOKEN": "${env:MCP_AUTH_TOKEN}", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1", + "MCP_AUTH": "${env:MCP_AUTH}", "MCP_TOOL_CALL_TIMEOUT": "120" } } diff --git a/docs/docs/using/clients/copilot.md b/docs/docs/using/clients/copilot.md index 46ae677d8..bc732b827 100644 --- a/docs/docs/using/clients/copilot.md +++ b/docs/docs/using/clients/copilot.md @@ -92,8 +92,8 @@ uv pip install mcp-contextforge-gateway # inside any uv/ve "command": "python3", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", - "MCP_AUTH_TOKEN": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1/mcp", + "MCP_AUTH": "Bearer ", "MCP_TOOL_CALL_TIMEOUT": "120" } } @@ -111,8 +111,8 @@ That's it - VS Code spawns the stdio process, pipes JSON-RPC, and you're ready t "command": "docker", "args": [ "run", "--rm", "--network=host", "-i", - "-e", "MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1", - "-e", "MCP_AUTH_TOKEN=", + "-e", "MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1", + "-e", "MCP_AUTH=", "ghcr.io/ibm/mcp-context-forge:0.5.0", "python3", "-m", "mcpgateway.wrapper" ] @@ -142,7 +142,7 @@ Copilot routes the call β†’ Gateway β†’ tool, and prints the reply. * **Use SSE for production**, stdio for local/offline. * You can manage servers, tools and prompts from the Gateway **Admin UI** (`/admin`). * Need a bearer quickly? - `export MCP_AUTH_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key)` + `export MCP_AUTH=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key)` --- diff --git a/docs/docs/using/clients/mcp-cli.md b/docs/docs/using/clients/mcp-cli.md index 553d7af90..f790a013e 100644 --- a/docs/docs/using/clients/mcp-cli.md +++ b/docs/docs/using/clients/mcp-cli.md @@ -80,8 +80,8 @@ Create a `server_config.json` file to define your MCP Context Forge Gateway conn "command": "/path/to/mcp-context-forge/.venv/bin/python", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444", + "MCP_AUTH": "", + "MCP_SERVER_URL": "http://localhost:4444", "MCP_TOOL_CALL_TIMEOUT": "120" } } @@ -101,9 +101,9 @@ Create a `server_config.json` file to define your MCP Context Forge Gateway conn "--rm", "-i", "-e", - "MCP_SERVER_CATALOG_URLS=http://host.docker.internal:4444", + "MCP_SERVER_URL=http://host.docker.internal:4444", "-e", - "MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN}", + "MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN}", "--entrypoint", "uv", "ghcr.io/ibm/mcp-context-forge:0.5.0", @@ -130,7 +130,7 @@ python3 -m mcpgateway.utils.create_jwt_token -u admin --exp 10080 --secret my-te > **⚠️ Important Notes** > - Use the **full path** to your virtual environment's Python to avoid import errors > - Make sure your MCP Context Forge Gateway is running on the correct port (default: 4444) -> - The wrapper requires `MCP_SERVER_CATALOG_URLS` environment variable +> - The wrapper requires `MCP_SERVER_URL` environment variable --- @@ -320,8 +320,8 @@ In interactive mode, use these commands: ```bash # MCP Context Forge Gateway connection -export MCP_AUTH_TOKEN="your-jwt-token" -export MCP_SERVER_CATALOG_URLS="http://localhost:4444" +export MCP_AUTH="your-jwt-token" +export MCP_SERVER_URL="http://localhost:4444" # LLM Provider API keys export OPENAI_API_KEY="sk-your-openai-key" @@ -350,7 +350,7 @@ export LLM_MODEL="mistral-nemo:latest" } ``` -#### "MCP_SERVER_CATALOG_URLS environment variable is required" +#### "MCP_SERVER_URL environment variable is required" **Solution:** Ensure your `server_config.json` includes the required environment variables in the `env` section. @@ -461,8 +461,8 @@ The mcp-cli integrates with MCP Context Forge Gateway through multiple connectio "command": "/path/to/mcp-context-forge/.venv/bin/python", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "your-jwt-token", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444" + "MCP_AUTH": "your-jwt-token", + "MCP_SERVER_URL": "http://localhost:4444" } } } diff --git a/docs/docs/using/clients/mcp-inspector.md b/docs/docs/using/clients/mcp-inspector.md index e99680a40..729b6c9a9 100644 --- a/docs/docs/using/clients/mcp-inspector.md +++ b/docs/docs/using/clients/mcp-inspector.md @@ -22,7 +22,7 @@ Point it at any MCP-compliant endpoint — a live Gateway **SSE** stream or |----------|-----------|--------------| | **1. Connect to Gateway (SSE)** |
```bash
npx @modelcontextprotocol/inspector \\
--url http://localhost:4444/servers/UUID_OF_SERVER_1/sse \\
--header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN"
``` | Inspector opens `http://localhost:5173` and attaches **directly** to the gateway stream. | | **2. Connect to Gateway (Streamable HTTP)** |
```bash
npx @modelcontextprotocol/inspector \\
--url http://localhost:4444/servers/UUID_OF_SERVER_1/mcp/ \\
--header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN"
``` | Inspector opens `http://localhost:5173` and attaches **directly** to the gateway stream. | -| **3 - Spin up the stdio wrapper in-process** |
```bash
export MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN
export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1

npx @modelcontextprotocol/inspector \\
python3 -m mcpgateway.wrapper
``` | Inspector forks `python3 -m mcpgateway.wrapper`, then connects to its stdio port automatically. | +| **3 - Spin up the stdio wrapper in-process** |
```bash
export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN
export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp

npx @modelcontextprotocol/inspector \\
python3 -m mcpgateway.wrapper
``` | Inspector forks `python3 -m mcpgateway.wrapper`, then connects to its stdio port automatically. | | **4 - Same, but via uv / uvx** |
```bash
npx @modelcontextprotocol/inspector \\
uvx python3 -m mcpgateway.wrapper
``` | Uses the super-fast **uv** virtual-env if you prefer. | | **5 - Wrapper already running** | Launch the wrapper in another shell, then:
```bash
npx @modelcontextprotocol/inspector --stdio
``` | Inspector only opens the GUI and binds to the running stdio server on stdin/stdout. | @@ -33,14 +33,14 @@ Point it at any MCP-compliant endpoint — a live Gateway **SSE** stream or Most wrappers / servers will need at least: ```bash -export MCP_SERVER_CATALOG_URLS=http://localhost:4444/servers/UUID_OF_SERVER_1 # one or many -export MCP_AUTH_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key) +export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1 # one or many +export MCP_AUTH=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key) ``` If you point Inspector **directly** at a Gateway SSE stream, pass the header: ```bash ---header "Authorization: Bearer $MCP_AUTH_TOKEN" +--header "Authorization: Bearer $MCP_AUTH" ``` --- diff --git a/docs/docs/using/mcpgateway-wrapper.md b/docs/docs/using/mcpgateway-wrapper.md index 4b9144043..e58d8f4e4 100644 --- a/docs/docs/using/mcpgateway-wrapper.md +++ b/docs/docs/using/mcpgateway-wrapper.md @@ -30,8 +30,8 @@ export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token \ Configure the wrapper via ENV variables: ```bash -export MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN} -export MCP_SERVER_CATALOG_URLS='http://localhost:4444/servers/UUID_OF_SERVER_1' # select a virtual server +export MCP_AUTH=${MCPGATEWAY_BEARER_TOKEN} +export MCP_SERVER_URL='http://localhost:4444/servers/UUID_OF_SERVER_1/mcp' # select a virtual server export MCP_TOOL_CALL_TIMEOUT=120 # tool call timeout in seconds (optional - default 90) export MCP_WRAPPER_LOG_LEVEL=INFO # DEBUG | INFO | OFF ``` @@ -51,8 +51,8 @@ Launching it in your terminal (ex: `python3 -m mcpgateway.wrapper`) is useful fo ```bash docker run -i --rm --network=host \ - -e MCP_SERVER_CATALOG_URLS=$MCP_SERVER_CATALOG_URLS \ - -e MCP_AUTH_TOKEN=$MCP_AUTH_TOKEN \ + -e MCP_SERVER_URL=$MCP_SERVER_URL \ + -e MCP_AUTH=$MCP_AUTH \ ghcr.io/ibm/mcp-context-forge:0.5.0 \ python3 -m mcpgateway.wrapper ``` @@ -61,8 +61,8 @@ Launching it in your terminal (ex: `python3 -m mcpgateway.wrapper`) is useful fo ```bash pipx install --include-deps mcp-contextforge-gateway - MCP_AUTH_TOKEN=$MCP_AUTH_TOKEN \ - MCP_SERVER_CATALOG_URLS=$MCP_SERVER_CATALOG_URLS \ + MCP_AUTH=$MCP_AUTH \ + MCP_SERVER_URL=$MCP_SERVER_URL \ python3 -m mcpgateway.wrapper ``` @@ -83,8 +83,8 @@ The wrapper now waits for JSON-RPC on **stdin** and emits replies on **stdout**. | Variable | Purpose | Default | | ------------------------- | -------------------------------------------- | ------- | -| `MCP_SERVER_CATALOG_URLS` | Comma-sep list of `/servers/{id}` endpoints | - | -| `MCP_AUTH_TOKEN` | Bearer token the wrapper forwards to Gateway | - | +| `MCP_SERVER_URL` | Comma-sep list of `/servers/{id}` endpoints | - | +| `MCP_AUTH` | Bearer token the wrapper forwards to Gateway | - | | `MCP_TOOL_CALL_TIMEOUT` | Per-tool timeout (seconds) | `90` | | `MCP_WRAPPER_LOG_LEVEL` | `OFF`, `INFO`, `DEBUG`, ... | `INFO` | @@ -94,7 +94,7 @@ The wrapper now waits for JSON-RPC on **stdin** and emits replies on **stdout**. You can run `mcpgateway.wrapper` from any MCP client, using either `python3`, `uv`, `uvx`, `uvx`, `pipx`, `docker`, or `podman` entrypoints. -The MCP Client calls the entrypoint, which needs to have the `mcp-contextforge-gateway` module installed, able to call `mcpgateway.wrapper` and the right `env` settings exported (`MCP_SERVER_CATALOG_URLS` and `MCP_AUTH_TOKEN` at a minimum). +The MCP Client calls the entrypoint, which needs to have the `mcp-contextforge-gateway` module installed, able to call `mcpgateway.wrapper` and the right `env` settings exported (`MCP_SERVER_URL` and `MCP_AUTH` at a minimum). === "Claude Desktop (venv)" @@ -105,8 +105,8 @@ The MCP Client calls the entrypoint, which needs to have the `mcp-contextforge-g "command": "python3", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1" + "MCP_AUTH": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1" } } } @@ -132,8 +132,8 @@ The MCP Client calls the entrypoint, which needs to have the `mcp-contextforge-g "mcpgateway.wrapper" ], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1" + "MCP_AUTH": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1" } } } @@ -150,8 +150,8 @@ The MCP Client calls the entrypoint, which needs to have the `mcp-contextforge-g "command": "/path/to/python", "args": ["-m", "mcpgateway.wrapper"], "env": { - "MCP_AUTH_TOKEN": "", - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1" + "MCP_AUTH": "", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1" } } } @@ -177,8 +177,8 @@ The MCP Client calls the entrypoint, which needs to have the `mcp-contextforge-g "mcpgateway.wrapper" ], "env": { - "MCP_SERVER_CATALOG_URLS": "http://localhost:4444/servers/UUID_OF_SERVER_1", - "MCP_AUTH_TOKEN": "REPLACE_WITH_MCPGATEWAY_BEARER_TOKEN", + "MCP_SERVER_URL": "http://localhost:4444/servers/UUID_OF_SERVER_1", + "MCP_AUTH": "REPLACE_WITH_MCPGATEWAY_BEARER_TOKEN", "MCP_WRAPPER_LOG_LEVEL": "OFF" } } diff --git a/docs/docs/using/servers/index.md b/docs/docs/using/servers/index.md index e48fae734..b4856a934 100644 --- a/docs/docs/using/servers/index.md +++ b/docs/docs/using/servers/index.md @@ -101,8 +101,8 @@ python3 -m mcpgateway.translate \ ### **Testing with Wrapper** ```bash # Test through mcpgateway.wrapper -export MCP_AUTH_TOKEN=$MCPGATEWAY_BEARER_TOKEN -export MCP_SERVER_CATALOG_URLS='http://localhost:4444/servers/UUID_OF_SERVER_1' +export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN +export MCP_SERVER_URL='http://localhost:4444/servers/UUID_OF_SERVER_1' python3 -m mcpgateway.wrapper ``` diff --git a/mcpgateway/admin.py b/mcpgateway/admin.py index 946fa104c..80a3c0978 100644 --- a/mcpgateway/admin.py +++ b/mcpgateway/admin.py @@ -5399,8 +5399,8 @@ async def admin_list_a2a_agents(
-

{agent['name']}

-

{agent['description']}

+

{agent["name"]}

+

{agent["description"]}

{active_text} @@ -5409,23 +5409,23 @@ async def admin_list_a2a_agents( {reachable_text} - {agent['agent_type']} + {agent["agent_type"]} - Auth: {agent['auth_type']} + Auth: {agent["auth_type"]}
-
Endpoint: {agent['endpoint_url']}
-
Executions: {agent['execution_count']} | Success Rate: {agent['success_rate']}
-
Created: {agent['created_at'][:19]}
+
Endpoint: {agent["endpoint_url"]}
+
Executions: {agent["execution_count"]} | Success Rate: {agent["success_rate"]}
+
Created: {agent["created_at"][:19]}
{last_interaction_html}
{tags_html}