EZAlgo Knowledge Base Trading Platform Documentation & Plans

MCP Gateway — Reference (Setup 2026-06-02)


MCP Gateway — Reference (Setup 2026-06-02)

Status: LIVE — https://mcp.ezalgotrader.com Use this doc as the canonical reference for the MCP gateway endpoint and auth token.

Endpoint

Resource URL
Health check (public) https://mcp.ezalgotrader.com/health
MCP endpoint (auth required) https://mcp.ezalgotrader.com/mcp

Auth

  • Type: Bearer token
  • Header: Authorization: Bearer c23aeb0c0e8a4db58a765fdfba4771c3
  • Token scope: All MCP clients (Claude Code, OpenCode, Codex, Hermes)
  • Rotation: TBD — token has not been rotated since initial issuance

Architecture

MCP client (Claude Code / OpenCode / Codex / Hermes)
        ↓ HTTPS + Bearer token
https://mcp.ezalgotrader.com/mcp
        ↓ Caddy reverse proxy (Hyper-V Ubuntu, port 8811)
MCP Gateway container (Docker, profile=default, transport=streaming)
        ↓
MCP servers (context7, sequential-thinking, etc.)

Components

Component Port Status
MCP Gateway (Docker) 8811 Running on Hyper-V Ubuntu
Caddy reverse proxy 8811 Active block in /etc/caddy/Caddyfile
Endpoint mcp.ezalgotrader.com/mcp Live (DNS A record → Hyper-V Ubuntu public IP)

Verifying the Endpoint

Public health check (no auth):

curl -i https://mcp.ezalgotrader.com/health

MCP initialize with auth:

curl -i -X POST \
  -H "Authorization: Bearer c23aeb0c0e8a4db58a765fdfba4771c3" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"verify","version":"1.0"}}}' \
  https://mcp.ezalgotrader.com/mcp

Expected: HTTP 200 + JSON-RPC response with serverInfo.

Caddy Block

mcp.ezalgotrader.com {
    reverse_proxy localhost:8811
}

Located in /etc/caddy/Caddyfile on Hyper-V Ubuntu. Caddy auto-provisions TLS via Let’s Encrypt for mcp.ezalgotrader.com (DNS A record must point to the Hyper-V Ubuntu public IP).

What Comes Next (out of scope for this doc)

  • Wire mcp.ezalgotrader.com/mcp + bearer token into Claude Code, OpenCode, Codex, Hermes client configs DONE 2026-06-02
  • Define which MCP servers are exposed through the gateway (context7, sequential-thinking, etc.)
  • Token rotation policy
  • Per-client scoping (each harness gets its own token if needed)

Harness Configs (Wired 2026-06-02)

All three harnesses (Codex, OpenCode, Claude Code) are now wired to the gateway via mcp-remote (the same pattern already used for Docmost).

Codex — ~/.codex/config.toml

[mcp_servers.mcp_gateway]
command = "npx"
args = ["-y", "mcp-remote", "https://mcp.ezalgotrader.com/mcp", "--header", "Authorization: Bearer c23aeb0c0e8a4db58a765fdfba4771c3"]

OpenCode — ~/.config/opencode/opencode.json

{
  "mcp": {
    "mcp_gateway": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "mcp-remote",
        "https://mcp.ezalgotrader.com/mcp",
        "--header",
        "Authorization: Bearer c23aeb0c0e8a4db58a765fdfba4771c3"
      ]
    }
  }
}

Claude Code — ~/.claude/settings.json

{
  "mcpServers": {
    "mcp_gateway": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.ezalgotrader.com/mcp",
        "--header",
        "Authorization: Bearer c23aeb0c0e8a4db58a765fdfba4771c3"
      ]
    }
  }
}

Verification (2026-06-02)

GET  https://mcp.ezalgotrader.com/health                  → 200
POST https://mcp.ezalgotrader.com/mcp (initialize, bearer) → 200 + JSON-RPC result
npx mcp-remote https://mcp.ezalgotrader.com/mcp (with bearer) → proxy established, StreamableHTTPClientTransport

Gateway serverInfo returned: {"name":"Docker AI MCP Gateway","version":"2.0.1"}, protocolVersion=2024-11-05.

Friction This Solves

Agents on the app server (Hyper-V Ubuntu) and on Windows MT5 host both need access to MCP servers without each client running its own gateway instance. A single gateway behind a public Caddy endpoint with bearer-token auth gives every harness one URL + one token. No local port forwarding, no per-host MCP server setup.

Version History

Date Author Change
2026-06-02 OpenCode Initial setup, gateway live at mcp.ezalgotrader.com:8811, Caddy proxy added, bearer token issued
2026-06-02 OpenCode Wired mcp_gateway into Codex, OpenCode, Claude Code configs (all use mcp-remote); verified endpoint, JSON-RPC initialize, and mcp-remote proxy establish

Similar Posts

Comments