Skip to content

feat: MCP config should default to project-level, not global #192

@notdp

Description

@notdp

Problem

When running npx -y grab@latest init and selecting MCP connection for agents (e.g., Claude Code, Codex, Droid), the MCP server configuration is written to the global config files:

  • Droid → ~/.factory/mcp.json
  • Claude Code → ~/.claude.json
  • Codex → ~/.codex/config.toml

This means the react-grab-mcp server is enabled for all projects, not just the one where React Grab was installed.

Expected Behavior

The MCP config should be written to project-level config files by default. For example:

  • Droid → .factory/mcp.json (in project root)
  • Claude Code → .claude/settings.json or .mcp.json (in project root)

This keeps the MCP server scoped to the project that actually uses React Grab.

Suggestion

Either:

  1. Default to project-level MCP config (preferred), or
  2. Add a prompt during init asking users to choose between project and global scope for MCP configuration

Environment

  • React Grab: 0.1.19
  • OS: macOS
  • Agents: Claude Code, Codex, Droid

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