Files
Neo-ZQYY/_DEL/weixin-devtools-mcp.md
2026-03-15 10:15:02 +08:00

883 B

inclusion
inclusion
manual

微信开发者工具 MCP 连接规范

使用 weixin-devtools-mcp 操作小程序时,必须遵循以下规则:

连接方式

  1. 启动自动化端口:

    & "C:\dev\WechatDevtools\cli.bat" auto --project "C:\NeoZQYY\apps\miniprogram" --auto-port 9420
    
  2. AI 使用 connect_devtools 时,只能用 wsEndpoint 策略:

    • strategy: wsEndpoint
    • wsEndpoint: ws://127.0.0.1:9420
    • projectPath: C:\NeoZQYY\apps\miniprogram

禁止事项

  • 禁止使用 connectdiscoverautolaunch 策略(会导致开发者工具重启)
  • 禁止在未确认自动化端口已启动的情况下调用 connect_devtools
  • 如果连接失败,提示用户检查终端中自动化端口是否在运行,不要自行重试其他策略

详细文档

参见 docs/mcp/WEIXIN-DEVTOOLS-MCP.md