MCP Configuration

Environment Variables

The MCP bridge uses gateway-specific variables:
# Upstreams
ORCH_BASE_URL=http://127.0.0.1:8090/api/v1
MANAGER_BASE_URL=http://127.0.0.1:8000/v1

# Auth and security
SYNAPSEX_JWT_SECRET=...
GATEWAY_JWT_SECRET=...
PLATFORM_SERVICE_KEY=...

# Runtime
GATEWAY_TIMEOUT_SECONDS=30
GATEWAY_MAX_RETRIES=2
GATEWAY_MAX_PAYLOAD_BYTES=1048576
GATEWAY_RATE_LIMIT_RPM=120
GATEWAY_CORS_ORIGINS=*
The REST catalog and remote MCP clients authenticate with bearer tokens or API keys:
export SYNAPSEX_API_KEY=sk_...

Run The Bridge Locally

cd apps/agents-synapsex/mcp-bridge
pip install -e ".[dev]"
uvicorn app:app --reload --host 0.0.0.0 --port 8080
Health check:
curl http://localhost:8080/health
REST catalog:
curl http://localhost:8080/v1/mcp/tools \
  -H "Authorization: Bearer sk_..."
MCP JSON-RPC endpoint in the current in-repo mount:
curl http://localhost:8080/mcp/mcp/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_..." \
  -d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'

Claude Desktop / MCP Clients

The current repository does not implement a synapsex mcp serve stdio command. Use a remote HTTP-capable MCP client or add a small stdio proxy that forwards JSON-RPC to the gateway. Remote-capable clients can use:
{
  "name": "SynapseX",
  "url": "https://api.synapsex.ai/mcp/mcp/",
  "headers": {
    "Authorization": "Bearer sk_..."
  }
}
If your deployment rewrites /mcp/mcp/ to /mcp/, use the rewritten public URL.

VM Agent Tool Dispatch

VM toolkit calls require a connected VM agent. The bridge receives VM-agent WebSocket connections at:
ws://<bridge-host>/agents/{agent_id}/ws?vmId=<vm-id>&tenantId=<tenant-id>
Tool execution endpoint used by internal services:
POST /tools/execute
Content-Type: application/json

{
  "tool_name": "get_metrics",
  "input": {},
  "vm_id": "vm-123",
  "timeout": 30
}