Skip to content

Conversation

@dima-m711
Copy link
Contributor

Added support for claude code as a client

Copilot AI review requested due to automatic review settings June 18, 2025 20:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for Anthropic’s Claude Code CLI as a new MCP client manager.

  • Introduces ClaudeCodeManager to handle installation checks, default configuration, and client metadata.
  • Exports the new manager in __init__.py and registers it in client_registry.py for discovery.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/mcpm/clients/managers/claude_code.py New manager for Claude Code CLI integration
src/mcpm/clients/managers/init.py Added ClaudeCodeManager to module exports
src/mcpm/clients/client_registry.py Registered "claude-code" key with manager
Comments suppressed due to low confidence (2)

src/mcpm/clients/managers/claude_code.py:1

  • [nitpick] Consider adding a concise one-line summary at the start of the module docstring to improve clarity and follow PEP-257 conventions.
"""

src/mcpm/clients/managers/claude_code.py:39

  • Add unit tests for ClaudeCodeManager (e.g., _get_empty_config, is_client_installed, get_client_info) to verify expected behaviors and ensure future changes are covered.
    def _get_empty_config(self) -> Dict[str, Any]:

# Claude Code uses .mcp.json in the current working directory for project scope
# For user scope, it uses the home directory
# We'll default to user scope configuration
self.config_path = os.path.expanduser("~/.claude.json")
Copy link

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Extract the default config filename (~/.claude.json) into a class-level constant to avoid magic strings and make updates easier.

Suggested change
self.config_path = os.path.expanduser("~/.claude.json")
self.config_path = self.DEFAULT_CONFIG_PATH

Copilot uses AI. Check for mistakes.
@dima-m711 dima-m711 closed this Jun 18, 2025
@dima-m711 dima-m711 deleted the support-claude-code branch June 18, 2025 20:36
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.

2 participants