Local outbound bridge agent for MCP capability forwarding
Project description
mcpassistant-gateway
Async local bridge that connects outbound to the remote MCP bridge over WSS and forwards invoke requests to local MCP servers using the MCP Python client library.
Run
pip install -e .
mcpassistant-gateway
mcpassistant-gateway initializes MCP client sessions for configured mcpServers (stdio) and opens the outbound bridge connection to the remote server.
Startup token behavior:
- If
AGENT_JWTis already configured (env orconfig.json), startup continues without prompting. - If
AGENT_JWTis missing, the CLI shows a styled prompt and asks you to paste the token. - If WebSocket auth fails with
HTTP 403, the CLI asks for a freshAGENT_JWTand retries immediately. AGENT_IDis auto-derived from JWT claims (or token fingerprint fallback), so no manualAGENT_IDprompt.- Prompted values are saved into resolved
config.json, so next runs do not ask again.
Set START_MCP_SERVERS=false if you only want the bridge process.
Configuration can be provided through .env and/or config.json.
Minimal dynamic .env:
REMOTE_SERVER_BASE_URL=https://your-remote-domain
AGENT_JWT=your_agent_jwt
With this mode:
REMOTE_WEBSOCKET_URLis derived aswss://.../connectAGENT_IDandCAPABILITIESare derived from JWT claims (sub,capabilities) if not explicitly set- Local MCP calls are handled via MCP client sessions for
mcpServers
mcpServers + mcpassistant-gateway-bridge
You can run MCP servers from config (supergateway-style) and derive local HTTP endpoints:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "supergateway", "--stdio", "npx", "-y", "@modelcontextprotocol/server-filesystem", "--port", "3004"],
"port": 3004
}
}
}
Run one server:
mcpassistant-gateway-bridge --config ./config.json --name filesystem
Run all servers in config:
mcpassistant-gateway-bridge --config ./config.json
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcpassistant_gateway-0.1.0.tar.gz.
File metadata
- Download URL: mcpassistant_gateway-0.1.0.tar.gz
- Upload date:
- Size: 53.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7de06e6868aca2f79865e46e0997d449144a192493e5f81509f0c221f91ba1cf
|
|
| MD5 |
a2dcaa5eed0b2776f89c31c8688af8fb
|
|
| BLAKE2b-256 |
e8a0d807467114b3164e23f91feca664da908a7bd7d1c67a9fe891be2a388581
|
File details
Details for the file mcpassistant_gateway-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcpassistant_gateway-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c8854aee18e4cbef8b84b0951d401b5cc0c2f3c25f134610853a6495d607ca7
|
|
| MD5 |
67a45745f292d677cf2ce48047819681
|
|
| BLAKE2b-256 |
e3f1c5c26f8b887086535b290198201c940a03f98f7c8bffb7fa4248df90a620
|