Discover Claude Code project .mcp.json configs as profiles #53

Closed
opened 2026-07-12 13:50:31 -04:00 by the_og · 0 comments
Owner

Roadmap §3.3. Claude Code reads per-project .mcp.json files, but BCC only surfaces the global ~/.claude.json — project-scope servers are invisible unless the user manually does Add config….

Design

  • Core: discover_project_configs(claude_json_path) -> list[Profile] — read the projects map keys (absolute project paths) from ~/.claude.json; for each path where <path>/.mcp.json exists, emit a Profile labeled Project: <basename> pointing at that .mcp.json. Fail-quiet on unreadable/malformed input. .mcp.json is a standalone top-level mcpServers file, i.e. already exactly BCC's format.
  • Wire into discover_profiles() after the Claude Code entry, de-duped against already-listed paths.
  • Tests: projects map with/without .mcp.json, malformed .claude.json, missing projects key, path de-dup, label format.

Acceptance: a project with .mcp.json listed in ~/.claude.json shows up in the Install dropdown automatically and is editable like any profile.

Roadmap §3.3. Claude Code reads per-project `.mcp.json` files, but BCC only surfaces the global `~/.claude.json` — project-scope servers are invisible unless the user manually does Add config…. **Design** - Core: `discover_project_configs(claude_json_path) -> list[Profile]` — read the `projects` map keys (absolute project paths) from `~/.claude.json`; for each path where `<path>/.mcp.json` exists, emit a Profile labeled `Project: <basename>` pointing at that `.mcp.json`. Fail-quiet on unreadable/malformed input. `.mcp.json` is a standalone top-level `mcpServers` file, i.e. already exactly BCC's format. - Wire into `discover_profiles()` after the Claude Code entry, de-duped against already-listed paths. - Tests: projects map with/without `.mcp.json`, malformed `.claude.json`, missing `projects` key, path de-dup, label format. **Acceptance**: a project with `.mcp.json` listed in `~/.claude.json` shows up in the Install dropdown automatically and is editable like any profile.
the_og added the P1 label 2026-07-12 13:50:31 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: the_og/better-claude-config#53