Feedback

Wechat Dev Mcp

@jiawei686 Claim

Basic information

Runtime
node
Category
License
MIT
Transports
stdio
Author
jiawei686
Submitted by
Community
Quality
25
Stars
7

About Wechat Dev Mcp Server

mcp server for wechat dev tools

Wechat Dev Mcp is a MCP server in the AI & Agents category listed in the AddMCP.net directory, published by jiawei686. It exposes 9 tools, including launch, connect, check_health, navigate_to and more. Supported transport: stdio. Runtime: node. License: MIT. The repository has 7 GitHub stars. Source code is hosted on github.com. Related topics: ai-agent, automation, cli, debugging, dev.

Setup

{
    "mcpServers": {
        "wechat-devtools": {
            "command": "npx",
            "args": [
                "-y",
                "wechat-dev-mcp"
            ]
        }
    }
}

Wechat Dev Mcp config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "wechat-devtools": {
            "command": "npx",
            "args": [
                "-y",
                "wechat-dev-mcp"
            ]
        }
    }
}

Wechat Dev Mcp tools

  • launch — Launch and connect to WeChat Developer Tools. [REQUIRED INITIAL STEP] Use this tool first to start controlling a mini-program. Requires the absolute project path.
    projectPath:string*, cliPath:string, port:number
  • connect — Connect to an already running WeChat Developer Tools instance via WebSocket. Use this if 'launch' fails or you want to attach to an existing session.
    wsEndpoint:string
  • check_health — [CRITICAL] Use this tool to verify if the mini-program is running correctly after ANY code changes. It returns the current page path, network status, and recent console errors.
    (no parameters)
  • navigate_to — Navigate to a specific page in the mini-program.
    url:string*
  • get_page_data — Get the data of the current page. Useful for verifying state changes after interactions or API calls.
    path:string
  • set_page_data — Set data on the current page. Use this to mock state or trigger UI updates for testing.
    data:object*
  • get_element — Get information about an element (text, wxml, attributes, computed style) or interact with it (tap, input, trigger). Use this to inspect UI or perform actions.
    selector:string*, action:string, attributeName:string, styleName:string, value:string, eventName:string, detail:object
  • call_method — Call a method on the current page.
    method:string*, args:array
  • disconnect — Disconnect from the mini-program.
    (no parameters)

Overview

What is Wechat Dev Mcp?

It controls WeChat Developer Tools and mini‑programs/mini‑games via the Model Context Protocol (MCP). It works with Claude Desktop, Cursor, Windsurf, and any MCP-compatible AI agent.

How to use Wechat Dev Mcp?

Install Node.js v18+ and enable the Service Port in WeChat DevTools (设置 → 安全设置 → 服务端口). Add the server configuration (using npx -y wechat-dev-mcp or a globally installed wechat-dev-mcp command) to your MCP client’s settings. Then use the provided tools to launch, connect, and automate DevTools.

Key features of Wechat Dev Mcp

  • 36 tools covering connection, navigation, and interaction
  • Automated launch and WebSocket connection to DevTools
  • Element interaction: tap, long-press, input text
  • Code execution: evaluate JavaScript and call wx.* APIs
  • Mini‑game specific tools (info, user info, cloud storage)
  • Debugging: console logs, screenshots, health checks

Use cases of Wechat Dev Mcp

  • Debug and test mini‑program pages (state, UI, navigation)
  • Automate repetitive DevTools operations (build npm, deploy cloud functions)
  • Interact with mini‑games: run scripts, call APIs, check logs
  • Integrate WeChat DevTools into CI/CD or AI‑assisted workflows
  • Verify code changes with health checks after each modification

Frequently asked questions

1 What prerequisites are needed?

Node.js v18+, WeChat DevTools installed with the Service Port enabled, and an open mini‑program or mini‑game project.

2 How do I connect to a running DevTools instance?

Use the launch tool (opens DevTools and a project) or the connect tool (connects via WebSocket, default ws://localhost:9420).

3 What should I do if I get a "Connection refused" error?

Ensure DevTools is running and the Service Port is enabled in the settings. Then retry the connection.

4 Can I use page tools (e.g., `get_element`) on a mini‑game?

No. Page tools return clear errors if used on a game project. Use evaluate, call_wx_method, or the game_* tools instead.

5 How can I verify everything works after making code changes?

Run the check_health tool. It checks connection, page path, network, console errors, and project type.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬