Wechat Devtools MCP
Provides tools for automating WeChat Mini Programs through WeChat Developer Tools, including launching/connecting, page navigation, element interaction, screenshots, and log retrieval.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Wechat Devtools MCPstart the mini program and take a screenshot of the home page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@purea/wechat-devtools-mcp
基于微信官方 miniprogram-automator SDK 封装的 MCP 服务器, 将微信小程序自动化能力暴露为 MCP 工具,供 AI 助手通过 stdio 调用,控制微信开发者工具中运行的小程序。
使用前提
微信开发者工具开启「设置 -> 安全设置 -> 服务端口」(CLI/HTTP 调用)
小程序已编译(uni-app 项目请先执行
uni build,projectPath指向unpackage/dist/build/mp-weixin;原生小程序指向含project.config.json的目录)
Related MCP server: weapp-agent-mcp
MCP 客户端配置示例
已发布至 npmjs,直接通过 npx 拉起:
{
"mcpServers": {
"Wechat Devtools Mcp": {
"command": "npx",
"args": ["-y", "@purea/wechat-devtools-mcp@latest"],
"env": {},
"disabled": false
}
}
}可通过 args 追加默认参数,作为 launch / connect 工具参数的默认值(工具参数传入时优先):
参数 | 说明 |
| 小程序项目路径(缺省自动探测当前工作区) |
| 微信开发者工具 CLI 路径(缺省自动探测默认安装位置) |
| 启动最长等待时间(ms),默认 30000 |
| 自动化 WebSocket 端口 |
| 用户 openid(多账号调试) |
| 开发者工具登录票据 |
| 自动信任项目 |
{
"mcpServers": {
"Wechat Devtools Mcp": {
"command": "npx",
"args": [
"-y",
"@purea/wechat-devtools-mcp@latest",
"--projectPath=E:/MyProgram/demo/unpackage/dist/build/mp-weixin",
"--cliPath=C:/Program Files (x86)/Tencent/微信web开发者工具/cli.bat",
"--trust-project"
],
"env": {},
"disabled": false
}
}
}提供的能力
连接 / 生命周期:
launch/connect/status/disconnect/close/release_handles小程序级操作:
page_stack/navigate_to/redirect_to/navigate_back/re_launch/switch_tab/current_page/system_info/evaluate/page_scroll_to/screenshot/ 票据(get_ticket/set_ticket/refresh_ticket)/ wx 方法(call_wx_method/mock_wx_method/restore_wx_method)页面级操作:
page_query/page_query_all/page_query_xpath/page_query_xpath_all/page_call_method/page_wait_for/page_data/page_set_data/page_size/page_scroll_top元素级操作:
element_query/element_tap/element_input/element_text/element_trigger等 25 个运行日志:
console_messages/exception_messages/clear_event_logs
说明
句柄数量有上限(页面 500 / 元素 1000),超出后按 FIFO 淘汰最旧句柄;也可随时用
release_handles手动清理。status在连接失效时返回connected: false并附带原因,而不是直接报错。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to automate WeChat Developer Tools for mini programs, allowing navigation, inspection, and manipulation of pages and components through the miniprogram-automator API.Last updated27146172MIT
- AlicenseAqualityAmaintenanceMCP server for WeChat Mini Program debugging and automation, enabling agents to perform UI operations, screenshots, and regression testing through natural language commands.Last updated4412214MIT
- Alicense-qualityCmaintenanceEnables automated testing of WeChat mini-programs via Model Context Protocol, providing tools for connecting to WeChat Developer Tools, querying and interacting with page elements, making assertions, navigating, and debugging.Last updated5170MIT
- Flicense-qualityCmaintenanceEnables AI agents to control WeChat through MCP protocol, including sending messages, managing contacts, and searching messages.Last updated
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pureia/wechat-devtools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server