section

Gateway

Gateway MCP Server

What is Gateway?

Gateway is the single entry point for all AI interactions with Nexus. Instead of loading 15+ MCP servers individually, only Gateway is registered with Claude CLI. Gateway then:

  1. Discovers all MCP servers in /opt/mcp-servers/
  2. Indexes their tools for search
  3. Routes tool calls to appropriate servers
  4. Batches parallel calls for efficiency

Why Gateway?

  • Single Registration: Only one MCP server to configure
  • Dynamic Discovery: New servers auto-discovered on refresh
  • Parallel Execution: Batch multiple tool calls in one request
  • Hot Reload: Add/remove servers without restarting Claude

Gateway Tools

find(query)

Search all tools across all servers.

gateway.find("create contact")

run(calls)

Execute tool calls (single or batch).

gateway.run([
  {"server": "track", "tool": "list", "args": {}},
  {"server": "voice", "tool": "speak_quick", "args": {"text": "Hello"}}
])

servers()

List all available servers and their tools.

gateway.servers(verbose=true)

index()

Get AI-friendly capability index.

Batch Calling Protocol

CRITICAL: Always batch independent tool calls in a single request.

Correct (Parallel):

mcp__gateway__run({
  "calls": [
    {"server": "context", "tool": "recall", "args": {"query": "foo"}},
    {"server": "track", "tool": "list", "args": {}},
    {"server": "voice", "tool": "speak_quick", "args": {"text": "Working"}}
  ]
})

Wrong (Sequential):

# DON'T DO THIS - wastes time
mcp__gateway__run({"calls": [{...call1...}]})
mcp__gateway__run({"calls": [{...call2...}]})
mcp__gateway__run({"calls": [{...call3...}]})

Current Server Registry (Dec 2025)

17 servers, 263 tools: - cdn (8), contact (12), context (13), delegate (49) - document (28), document-v2 (26), kb (10), links (7) - locker (9), search (29), session (17), sms (0) - temp (6), track (14), transcript (16), user (17), voice (2)

ID: fc7f7b45
Path: Nexus > Gateway
Updated: 2025-12-08T12:18:08