Expand description
Generic MCP-to-NATS bridge.
McpBridge exposes any NATS service as Model Context Protocol (MCP) tools.
It runs as a stdio MCP server (JSON-RPC 2.0 over stdin/stdout), routing
tools/list and tools/call requests to the correct NATS services.
§Protocol
MCP uses JSON-RPC 2.0 over stdio. Each message is a newline-delimited JSON object.
tools/list flow:
- Client sends
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}} - Bridge sends
{service}.cmd.toolsto each configured NATS service - Returns combined tool list from all services
tools/call flow:
- Client sends
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"code_search","arguments":{...}}} - Bridge routes to
{service}.cmd.{tool_suffix}via NATS request/reply - Returns NATS response as MCP content
§Tool naming convention
NATS handler commands use underscore-separated suffixes (e.g. codegraph.cmd.search).
MCP tool names use the full code_{command} format (e.g. code_search).
The bridge maps: code_search → codegraph.cmd.search
§Binary
nusy-mcp-bridge --nats nats://192.168.8.110:4222 --services codegraphStructs§
- McpBridge
- Generic MCP-to-NATS bridge.
- Service
Config - Configuration for a single NATS service exposed via MCP.