← ClaudeAtlas

mcp-per-projectlisted

Set up or fix per-project MCP isolation in Cursor and Claude Code, so concurrent agent sessions for different products (e.g. Acme vs Globex vs Initech) each get their own Railway, Postgres, Logfire, PostHog, etc. Use when the user mentions MCP bleed across projects, global mcp.json pollution, multiple Railway accounts/tokens on one machine, wants project-scoped MCP servers, or when onboarding a product repo (invoked from the onboard-repo skill).
dimeloper/second-brain-workflow · ★ 6 · AI & Automation · score 71
Install: claude install-skill dimeloper/second-brain-workflow
# Per-project MCP Also run as **step 6 of `onboard-repo`** for every product backend or sibling app — do not wait for the user to say "MCP". ## Problem Both agents have a machine-wide MCP scope that every session loads. Putting `railway` + `railway-acme` there means Globex sessions see Acme tools, and a single `railway login` fights across accounts. | | Machine-wide (keep empty of product infra) | Per-project (use this) | |---|---|---| | **Cursor** | `~/.cursor/mcp.json` | `<repo>/.cursor/mcp.json` | | **Claude Code** | user scope, `~/.claude.json` | `<repo>/.mcp.json` (project scope) | Claude Code also has a *local* scope — project-specific but private to you, stored outside the repo. Use it for a server you need but shouldn't commit; `.mcp.json` is the checked-in, team-shared one. ## Rules 1. **Machine-wide scope stays free of product infra.** Cursor: `mcpServers: {}` in `~/.cursor/mcp.json`. Claude Code: add nothing with `--scope user`. Exception: a genuinely universal, account-agnostic tool. 2. **Each product defines servers in its own repo** — `.cursor/mcp.json` for Cursor, `.mcp.json` for Claude Code. Commit `.mcp.json` and `.cursor/mcp.json.example`; gitignore `.cursor/mcp.json`. 3. **Name servers with a product suffix**: `railway-acme`, `railway-globex`, `railway-postgres-acme`, … Never a bare `railway` when several products share the machine. Note Claude Code reserves `workspace`, `claude-in-chrome`, `computer-use`, `Claude Preview`, `Clau