Skip to content

Connecting an MCP client

denfry edited this page Oct 5, 2026 · 1 revision

Connecting an MCP client

The MCP server is a small Node program. Most clients launch it for you; you only tell them the path and give it the bridge URL and token.

Environment variables

Variable Default Meaning
MCPFABRIC_URL http://127.0.0.1:25599 address of the mod's bridge
MCPFABRIC_TOKEN none bearer token from mcpfabric.config.json (required unless requireAuth is false)
MCPFABRIC_TIMEOUT_MS 15000 per-call timeout to the bridge
MCPFABRIC_TRANSPORT stdio stdio or http
MCPFABRIC_HTTP_PORT 25600 port of the http transport (/mcp)

Agent runtime variables (MCPFABRIC_AGENT, MCPFABRIC_DATA_DIR, MCPFABRIC_WORLD) are on the Agent runtime page.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mcpfabric": {
      "command": "node",
      "args": ["/absolute/path/to/mcpfabric/mcp-server/dist/index.js"],
      "env": {
        "MCPFABRIC_URL": "http://127.0.0.1:25599",
        "MCPFABRIC_TOKEN": "paste-the-token-from-the-mod-config"
      }
    }
  }
}

Claude Code

claude mcp add mcpfabric \
  -e MCPFABRIC_URL=http://127.0.0.1:25599 \
  -e MCPFABRIC_TOKEN=<token> \
  -- node /absolute/path/to/mcpfabric/mcp-server/dist/index.js

or use the .mcp.json from examples/.

Other clients and HTTP transport

Any MCP client that can start a stdio server works with the same command and environment. For clients that connect over HTTP, run the server with MCPFABRIC_TRANSPORT=http and point the client at http://127.0.0.1:25600/mcp.

Check that it works

Ask the model to call get_status. It reports which side you are on (client or server), the game version and which capability groups are available. If it fails, see Troubleshooting.

Clone this wiki locally