fix(mcp): auto-register tools on startup and support cross-platform setup for all major AI IDEs
- Fix missing mcp_server.tools import on server initialization so mobile_run_task, mobile_manage_task, mobile_get_device_state, and mobile_inspect_trace are automatically registered. - Inject PYTHONPATH in generated and installed MCP configurations to guarantee Python module resolution across Windows, macOS, and Linux regardless of IDE CWD. - Expand artemis mcp --install and --generate-config to support VS Code, Cline, Roo Code, Claude Code CLI (~/.claude.json), Cursor, Windsurf, Antigravity, and OpenClaw. - Enhance config file merging with robust exception handling and fallback initialization.
This commit is contained in:
1 parent
fc6ddad655
commit
9e5aee85c8
12 files changed
+202
-67
No files matched your search
@@ -16,6 +16,13 @@
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
try:
|
||||
from mcp.server.fastmcp.server import Settings as FastMCPSettings
|
||||
|
||||
FastMCPSettings.model_rebuild()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Define the shared FastMCP instance for external IDE and agent clients.
|
||||
mcp = FastMCP(
|
||||
"artemis",
|
||||
@@ -27,3 +34,6 @@ mcp = FastMCP(
|
||||
"and mobile_inspect_trace to inspect detailed execution steps and visual action overlays."
|
||||
),
|
||||
)
|
||||
|
||||
# Import tools so they are registered with the mcp instance upon module load
|
||||
import mcp_server.tools # noqa: E402, F401
|
||||
Reference in new issue
Block a user