MCP

Connect Codex, Claude, and VS Code

Use the correct local stdio configuration shape for each Agent host.

Connect Codex, Claude, and VS Code

Always copy the configuration generated by Weave under “AI integrations (MCP).” Paths and secrets below only demonstrate structure and cannot be used as-is.

Codex

Merge the generated TOML into ~/.codex/config.toml:

[mcp_servers.weave]
command = "/Applications/Weave.app/Contents/MacOS/zhixi-mcp"
startup_timeout_sec = 10
tool_timeout_sec = 60
default_tools_approval_mode = "writes"

[mcp_servers.weave.env]
ZX_RUNTIME_DATA_ROOT = "/Users/example/Library/Application Support/cloud.longde.zhixi.desktop"
ZX_MCP_CLIENT_FINGERPRINT = "codex-local"
ZX_MCP_BRIDGE_SECRET = "paired-secret-shown-once"

Fully restart Codex and run /mcp to confirm that weave is connected.

Claude Desktop or Claude Code

Claude uses an mcpServers object. On macOS, Claude Desktop usually reads:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "weave": {
      "type": "stdio",
      "command": "/Applications/Weave.app/Contents/MacOS/zhixi-mcp",
      "args": [],
      "env": {
        "ZX_RUNTIME_DATA_ROOT": "/Users/example/Library/Application Support/cloud.longde.zhixi.desktop",
        "ZX_MCP_CLIENT_FINGERPRINT": "claude-local",
        "ZX_MCP_BRIDGE_SECRET": "paired-secret-shown-once"
      }
    }
  }
}

Claude Code can also read a project .mcp.json. If it contains a real secret, add it to .gitignore; user-level configuration is safer.

VS Code and GitHub Copilot

Prefer MCP: Open User Configuration so a secret does not enter the repository. VS Code uses a servers object:

{
  "servers": {
    "weave": {
      "type": "stdio",
      "command": "/Applications/Weave.app/Contents/MacOS/zhixi-mcp",
      "args": [],
      "env": {
        "ZX_RUNTIME_DATA_ROOT": "/Users/example/Library/Application Support/cloud.longde.zhixi.desktop",
        "ZX_MCP_CLIENT_FINGERPRINT": "vscode-local",
        "ZX_MCP_BRIDGE_SECRET": "paired-secret-shown-once"
      }
    }
  }
}

Save the configuration, run MCP: List Servers, and start weave.

Other Agents

The Agent must support a local stdio MCP Server and allow command, argument, and environment configuration. Do not assume complete Claude, Codex, and VS Code configuration files are interchangeable.