Skip to content

Feature: global/user-level MCP config (e.g. ~/.graff/mcp.json) merged with project .mcp.json — home-level configs currently silently ignored #345

Description

@justrach

Summary

graff only loads MCP servers from the workspace-local .mcp.json (mcp_config_path = ".mcp.json" in src/main.zig). There is no user-scoped/global MCP config, so:

  1. Globally useful remote servers (e.g. DeepWiki https://mcp.deepwiki.com/mcp, context7) must be re-added to every project via graff mcp add / /mcp add.
  2. If a user puts server entries in a home-level config such as ~/.mcpconfig.json (the path several other MCP clients on macOS use, e.g. Claude-style configs), graff silently ignores them — no error, no warning, the tools just never appear. This looks like a broken server and is hard to debug from inside a session.

Repro

  1. Write ~/.mcpconfig.json:
    { "mcpServers": { "deepwiki": { "url": "https://mcp.deepwiki.com/mcp" } } }
  2. cd into a project with no .mcp.json and run graff (tested with graff --yolo, v0.0.227).
  3. Ask the agent which MCP tools exist: no mcp__deepwiki__* tools, nothing in the trace except the MCP registry startup phase.

Expected

  • A user-level MCP config (e.g. ~/.graff/mcp.json, or additionally reading ~/.mcpconfig.json) that is merged with the project .mcp.json (project entries win on name conflicts).
  • The same consent model applies: stdio servers from any config need trust; remote URL-only servers could use a one-time trust prompt (/mcp trust already handles the live-connect flow).
  • Ideally, when a home-level config exists but is intentionally unsupported, log one line at startup (ignoring ~/.mcpconfig.json: unsupported path, use .mcp.json) instead of failing silently.

Actual

Only <cwd>/.mcp.json is read. Confirmed in the v0.0.227 installed binary (strings shows only .mcp.json references) and in source: Registry.init takes a single config_path; the home parameter in src/mcp.zig is used only for OAuth token storage. No GRAFF_MCP_CONFIG-style env override exists either.

Workaround (verified)

Per-project: create .mcp.json with the server entry, then /mcp trust in-session (connects live, no restart), or /mcp add deepwiki --url https://mcp.deepwiki.com/mcp which connects + persists in one step.

Environment

  • graff 0.0.227 (installed at ~/bin/graff), macOS (darwin), launched as graff --yolo from zsh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions