Skip to content

feat(mcp): inventory MCP servers in ~/.claude.json#42

Merged
adel-pplx merged 1 commit into
mainfrom
mcp-claude-json
May 29, 2026
Merged

feat(mcp): inventory MCP servers in ~/.claude.json#42
adel-pplx merged 1 commit into
mainfrom
mcp-claude-json

Conversation

@adel-pplx
Copy link
Copy Markdown
Collaborator

Claude Code stores user-scoped MCP servers in the top-level mcpServers map of ~/.claude.json and local-scoped ones under projects.<dir>.mcpServers. The scanner missed this file because it sits beside the .claude directory (no walk root reached it) and its basename wasn't dispatched. This adds it as a baseline MCP root, dispatches it via a path-aware check, and parses both scopes while ignoring the file's unrelated settings.

Fixes #40

Claude Code stores user-scoped MCP servers in the top-level mcpServers
map of ~/.claude.json and local-scoped ones under
projects.<dir>.mcpServers. The scanner missed this file entirely: it is
a single config file beside the .claude directory, so no walk root
reached it, and its basename was not in the MCP dispatch allowlist.

Add ~/.claude.json as a baseline MCP root (so --all-users expansion
covers it), let filterExistingRoots keep regular-file roots, dispatch it
via a path-aware IsClaudeConfigJSON, and parse both scopes in a
dedicated ScanClaudeConfig that ignores the file's unrelated settings.

Fixes #40
@adel-pplx adel-pplx merged commit 7c93206 into main May 29, 2026
3 checks passed
@adel-pplx adel-pplx deleted the mcp-claude-json branch May 29, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support MCP servers defined in ~/.claude.json

2 participants