claude-mpm 4.3.11__py3-none-any.whl → 4.3.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/templates/research.json +20 -8
  3. claude_mpm/agents/templates/web_qa.json +25 -10
  4. claude_mpm/cli/__init__.py +1 -0
  5. claude_mpm/cli/commands/mcp_command_router.py +11 -0
  6. claude_mpm/cli/commands/mcp_config.py +157 -0
  7. claude_mpm/cli/commands/mcp_external_commands.py +241 -0
  8. claude_mpm/cli/commands/mcp_install_commands.py +64 -23
  9. claude_mpm/cli/commands/mcp_setup_external.py +829 -0
  10. claude_mpm/cli/commands/run.py +70 -0
  11. claude_mpm/cli/commands/search.py +285 -0
  12. claude_mpm/cli/parsers/base_parser.py +13 -0
  13. claude_mpm/cli/parsers/mcp_parser.py +17 -0
  14. claude_mpm/cli/parsers/run_parser.py +5 -0
  15. claude_mpm/cli/parsers/search_parser.py +239 -0
  16. claude_mpm/constants.py +1 -0
  17. claude_mpm/core/unified_agent_registry.py +7 -0
  18. claude_mpm/services/agents/deployment/agent_deployment.py +28 -13
  19. claude_mpm/services/agents/deployment/agent_discovery_service.py +16 -6
  20. claude_mpm/services/agents/deployment/multi_source_deployment_service.py +6 -4
  21. claude_mpm/services/cli/agent_cleanup_service.py +5 -0
  22. claude_mpm/services/mcp_config_manager.py +294 -0
  23. claude_mpm/services/mcp_gateway/config/configuration.py +17 -0
  24. claude_mpm/services/mcp_gateway/main.py +38 -0
  25. claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +390 -0
  26. {claude_mpm-4.3.11.dist-info → claude_mpm-4.3.12.dist-info}/METADATA +4 -1
  27. {claude_mpm-4.3.11.dist-info → claude_mpm-4.3.12.dist-info}/RECORD +31 -24
  28. {claude_mpm-4.3.11.dist-info → claude_mpm-4.3.12.dist-info}/WHEEL +0 -0
  29. {claude_mpm-4.3.11.dist-info → claude_mpm-4.3.12.dist-info}/entry_points.txt +0 -0
  30. {claude_mpm-4.3.11.dist-info → claude_mpm-4.3.12.dist-info}/licenses/LICENSE +0 -0
  31. {claude_mpm-4.3.11.dist-info → claude_mpm-4.3.12.dist-info}/top_level.txt +0 -0
@@ -46,31 +46,54 @@ class MCPInstallCommands:
46
46
  print("\nPlease install manually with: pip install mcp")
47
47
  return 1
48
48
 
49
- # Step 2: Configure Claude Code with the new CLI command
50
- print("\n2️⃣ Configuring Claude Code (~/.claude.json)...")
49
+ # Step 2: Configure Claude Desktop with the new CLI command
50
+ print("\n2️⃣ Configuring Claude Desktop...")
51
51
  try:
52
52
  success = self._configure_claude_desktop(args.force)
53
- if success:
54
- print(" Configuration completed successfully")
55
- print("\n🎉 MCP Gateway is ready to use!")
56
- print("\nNext steps:")
57
- print("1. Restart Claude Code (if running)")
58
- print("2. Test the server: claude-mpm mcp server --test")
59
- print("3. Check status: claude-mpm mcp status")
60
- return 0
61
- print("❌ Configuration failed")
62
- return 1
53
+ if not success:
54
+ print(" Main gateway configuration failed")
55
+ return 1
56
+
57
+ # Step 3: Setup external MCP services
58
+ print("\n3️⃣ Setting up External MCP Services...")
59
+ from .mcp_setup_external import MCPExternalServicesSetup
60
+
61
+ external_setup = MCPExternalServicesSetup(self.logger)
62
+
63
+ # Check if user wants to set up external services
64
+ response = input("\nDo you want to set up external MCP services (mcp-vector-search, mcp-browser)? (Y/n): ").strip().lower()
65
+ if response in ["", "y", "yes"]:
66
+ # Install Python packages for external services
67
+ external_setup.check_and_install_pip_packages()
68
+
69
+ # Setup external services in Claude Desktop config
70
+ if external_setup.setup_external_services(force=args.force):
71
+ print("✅ External services configured successfully")
72
+ else:
73
+ print("⚠️ Some external services may not have been configured")
74
+ else:
75
+ print("⏭️ Skipping external services setup")
76
+ print(" You can set them up later with: claude-mpm mcp external setup")
77
+
78
+ print("\n✅ Configuration completed successfully")
79
+ print("\n🎉 MCP Gateway is ready to use!")
80
+ print("\nNext steps:")
81
+ print("1. Restart Claude Desktop (if running)")
82
+ print("2. Test the server: claude-mpm mcp server --test")
83
+ print("3. Check status: claude-mpm mcp status")
84
+ print("4. List external services: claude-mpm mcp external list")
85
+ return 0
63
86
 
64
87
  except Exception as e:
65
88
  print(f"❌ Error during configuration: {e}")
66
89
  return 1
67
90
 
68
91
  def _configure_claude_desktop(self, force=False):
69
- """Configure Claude Code to use the MCP gateway via CLI command.
92
+ """Configure Claude Desktop to use the MCP gateway via CLI command.
70
93
 
71
- WHY: Claude Code reads MCP server configurations from ~/.claude.json
72
- (not ~/.claude/settings.local.json). This method updates that file
73
- to include the claude-mpm-gateway server configuration.
94
+ WHY: Claude Desktop reads MCP server configurations from a platform-specific
95
+ configuration file. This method updates that file to include the claude-mpm-gateway
96
+ server configuration.
74
97
 
75
98
  Args:
76
99
  force: Whether to overwrite existing configuration
@@ -135,16 +158,34 @@ class MCPInstallCommands:
135
158
  return self._save_config(config, config_path)
136
159
 
137
160
  def _get_claude_config_path(self):
138
- """Get the Claude Code configuration file path.
161
+ """Get the Claude Desktop configuration file path.
139
162
 
140
163
  Returns:
141
- Path or None: Path to Claude Code config file
164
+ Path or None: Path to Claude Desktop config file
142
165
  """
143
-
144
- # Claude Code reads MCP server configurations from ~/.claude.json
145
- # This is the actual file that Claude Code uses for MCP servers
146
- # NOT ~/.claude/settings.local.json
147
- return Path.home() / ".claude.json"
166
+ import platform
167
+
168
+ # Try multiple possible locations for Claude Desktop config
169
+ possible_paths = [
170
+ Path.home() / "Library" / "Application Support" / "Claude" / "claude_desktop_config.json", # macOS
171
+ Path.home() / ".config" / "Claude" / "claude_desktop_config.json", # Linux
172
+ Path.home() / "AppData" / "Roaming" / "Claude" / "claude_desktop_config.json", # Windows
173
+ Path.home() / ".claude" / "claude_desktop_config.json", # Alternative
174
+ Path.home() / ".claude.json", # Legacy
175
+ ]
176
+
177
+ for path in possible_paths:
178
+ if path.exists():
179
+ return path
180
+
181
+ # If none exist, return the platform-appropriate default
182
+ system = platform.system()
183
+ if system == "Darwin": # macOS
184
+ return Path.home() / "Library" / "Application Support" / "Claude" / "claude_desktop_config.json"
185
+ elif system == "Windows":
186
+ return Path.home() / "AppData" / "Roaming" / "Claude" / "claude_desktop_config.json"
187
+ else: # Linux and others
188
+ return Path.home() / ".config" / "Claude" / "claude_desktop_config.json"
148
189
 
149
190
  def _find_claude_mpm_executable(self):
150
191
  """Find the claude-mpm executable path.