Skip to content

docs: correct multi-instance MCP guidance to lead with per-project scoping#144

Merged
markshust merged 1 commit into
developfrom
feature/claude-multi-instance-doc-correction
Jun 26, 2026
Merged

docs: correct multi-instance MCP guidance to lead with per-project scoping#144
markshust merged 1 commit into
developfrom
feature/claude-multi-instance-doc-correction

Conversation

@markshust

Copy link
Copy Markdown
Collaborator

Why

Follow-up to #143. That PR's troubleshooting section recommended a CLAUDE_CONFIG_DIR per-project wrapper as the fix for MCP servers disconnecting under concurrent Claude Code instances. Testing surfaced a significant downside that wasn't documented: Claude Code ties its login to the default config directory — the macOS Keychain credential is not shared across CLAUDE_CONFIG_DIR values, so every isolated config requires its own /login, with no clean way to share a session. That makes the wrapper poor primary advice.

What

Rewrite the section to lead with the correct practice and demote the wrapper:

  • Scope every MCP server to the project that needs it. marko-mcp/marko-lsp/marko-skills are enabled per-project by devai:install (project .claude/settings.json); enabling them globally makes marko-mcp launch and fail in every non-Marko project. Other project-specific servers belong in a project-root .mcp.json (n8n example included).
  • Reduce contention: fewer concurrent instances, CLAUDE_CODE_SKIP_PROMPT_HISTORY=1.
  • Demote CLAUDE_CONFIG_DIR isolation to an "advanced, rarely worth it" note that discloses the per-project /login requirement.

The section heading (and its anchor) is unchanged, so the devai:install tip link still resolves.

Verification

  • pest packages/devai InstallCommandTest — 12 passed (tip text/URL unchanged)
  • pest packages/docs-markdown — 17 passed

…oping

The troubleshooting section previously recommended a CLAUDE_CONFIG_DIR
per-project wrapper as the fix for MCP servers disconnecting under
concurrent Claude Code instances. That wrapper has a significant
undocumented downside: Claude Code ties its login to the default config
directory (the macOS Keychain credential is not shared across
CLAUDE_CONFIG_DIR values), so every isolated config requires its own
/login with no clean way to share a session.

Rewrite the section to lead with the actually-correct practice:

- Scope every MCP server to the project that needs it. marko-mcp/lsp/skills
  are enabled per project by devai:install via the project's
  .claude/settings.json; do not also enable them globally (that launches
  and fails marko-mcp in every non-Marko project). Other project-specific
  servers belong in a project-root .mcp.json.
- Reduce write churn: fewer concurrent instances, CLAUDE_CODE_SKIP_PROMPT_HISTORY=1.
- Demote CLAUDE_CONFIG_DIR isolation to an "advanced, rarely worth it"
  note that discloses the per-project /login requirement.

Heading (and its anchor) is unchanged, so the devai:install tip link
still resolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@markshust markshust merged commit 36c40f0 into develop Jun 26, 2026
1 check passed
@markshust markshust deleted the feature/claude-multi-instance-doc-correction branch June 26, 2026 17:08
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant