MCP server intelligence profile

WeChat Mini Program Dev MCP Server

Enables AI assistants to automate WeChat Developer Tools for mini programs, allowing navigation, inspection, and manipulation of pages and components through the miniprogram-automator API

Local Onlyyfmeii
Awaiting current scanNpm · 0.2.5

The selected current version does not yet have completed public verification. Unknown does not mean clean or vulnerable.

1Distribution channel
30Independently observed tools
0Linked remote endpoints
AvailableVersion intelligence

Detailed security scan evidence is not public for this MCP yet. Public identity, registry metadata, and independently observed protocol inventory remain available.

Install and connect

Installation and connection instructions are shown only when supported by retained package, repository, or endpoint evidence.

Install @yfme/weapp-dev-mcp from npm

Version 0.2.5 declares 1 executable entrypoint.

npm install --save-exact @yfme/weapp-dev-mcp@0.2.5
npx -y -p @yfme/weapp-dev-mcp@0.2.5 weapp-dev-mcp
MCP client configuration example
{
  "mcpServers": {
    "@yfme/weapp-dev-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@yfme/weapp-dev-mcp@0.2.5",
        "weapp-dev-mcp"
      ]
    }
  }
}

Identity

Canonical slugwechat-mini-program-dev-mcp-4b3859f0DeploymentLocal Only
Canonical packagenpm:@yfme/weapp-dev-mcpRepositoryyfmeii/weapp-dev-mcp
First publishedLatest release
Last security verificationClassification confidence90%
PublicationDraftOfficial distributionNot verified

Distributions

ChannelIdentifierCurrent versionVersionsSource
npm@yfme/weapp-dev-mcp0.2.514Repository

Current release

PackageVersionPublished / observedInventorySecurity scan
npm@yfme/weapp-dev-mcp0.2.5CurrentSep 5, 202630 toolsSucceeded · 0 resources · 3 promptsEvidence restricted
Enterprise protection

Continuously monitor this MCP for security risk

Independently scan the exact version your agents use, receive alerts when its risk changes, and investigate every finding with retained version evidence.

  • Independent exact-version security scans
  • Continuous release and vulnerability monitoring
  • Risk-change alerts with capability context
  • Historical evidence and API exports
Custom pricingContact salesTailored to your organization, integrations, data needs, and support requirements.

Current version evidence

No public current-version evidence is available yet.

Current protocol inventory

2025-06-18Negotiated protocol
weapp-dev-mcpServer-reported name
4Capability groups
Aug 14, 2026Observed

Tools 30

ToolCategoryAnnotationsRisk
element_callMethod调用组件实例指定方法,仅自定义组件可以使用。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "method": {
      "type": "string",
      "minLength": 1
    },
    "args": {
      "type": "array",
      "items": {}
    }
  },
  "required": [
    "selector",
    "method"
  ]
}
element_getAttributes获取元素的特性值。names 为特性名数组(如 ['class', 'id', 'data-index'])。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "names": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "selector",
    "names"
  ]
}
element_getBoundingClientRect获取元素相对于视口的边界矩形信息(left、top、width、height、right、bottom)。此方法返回的是考虑 CSS transform 变换后的实际渲染尺寸和位置。仅支持 ID 选择器、类选择器。若目标元素位于自定义组件内部,selector 必须指向当前页面 WXML 源码中直接引用的那一层自定义组件,而不是渲染后的组件树;innerSelector 可在 selector 所指组件的整个子树内匹配。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "selector"
  ]
}
element_getData获取组件实例渲染数据,仅自定义组件可以使用。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "path": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "selector"
  ]
}
element_getInnerElement在元素范围内获取元素,相当于 element.$(selector)。设置 withWxml 为 true 可额外返回每个元素的完整 outerWxml。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "targetSelector": {
      "type": "string",
      "minLength": 1
    },
    "withWxml": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "selector",
    "targetSelector"
  ]
}
element_getInnerElements在元素范围内获取元素数组,相当于 element.$$(selector)。设置 withWxml 为 true 可额外返回每个元素的完整 outerWxml。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "targetSelector": {
      "type": "string",
      "minLength": 1
    },
    "withWxml": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "selector",
    "targetSelector"
  ]
}
element_getStyles获取元素的样式值。names 为样式名数组(如 ['color', 'fontSize', 'backgroundColor'])。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "names": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "selector",
    "names"
  ]
}
element_getWxml获取元素 WXML。默认获取内部 WXML(element.wxml()),设置 outer 为 true 可获取包含元素本身的 WXML(element.outerWxml())。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "outer": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "selector"
  ]
}
element_input向指定元素输入文本。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "value": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ]
    }
  },
  "required": [
    "selector",
    "value"
  ]
}
element_scrollTo滚动 scroll-view 组件到指定位置。仅适用于 scroll-view 组件。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "x": {
      "type": "number"
    },
    "y": {
      "type": "number"
    }
  },
  "required": [
    "selector",
    "x",
    "y"
  ]
}
element_setData设置组件实例渲染数据,仅自定义组件可以使用。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "selector",
    "data"
  ]
}
element_tap通过 CSS 选择器模拟点击 WXML 元素。支持 [index=N] 语法选择第 N 个元素。如需点击自定义组件内部的元素,请使用 innerSelector 参数:selector 设为组件 ID 选择器(如 #my-component)或标签选择器,innerSelector 设为组件内部元素的选择器。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "waitMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "selector"
  ]
}
mp_callWx调用微信小程序 API 方法,(如 `wx.pageScrollTo`)。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "method": {
      "type": "string",
      "minLength": 1
    },
    "args": {
      "type": "array",
      "items": {}
    }
  },
  "required": [
    "method"
  ]
}
mp_currentPage获取当前页面的信息,包括路径、查询参数、尺寸、滚动位置、当前页面真实渲染器 renderer,以及 wx.getSkylineInfoSync() 的 Skyline 诊断信息 skylineInfo。通常在 mp_ensureConnection 成功后立即调用,用于确认当前页面;可通过 renderer 区分 webview/skyline,skylineInfo 仅用于判断运行环境能力。withData 为 true 时额外返回页面数据。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "withData": {
      "default": false,
      "type": "boolean"
    }
  }
}
mp_ensureConnection检查小程序自动化会话是否就绪。先调用这个工具,再调用 mp_screenshot、page_* 或 element_* 工具。若失败,优先用 reconnect=true 重试一次;若返回项目选择提示,则传 projectSelection。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "reconnect": {
      "default": false,
      "type": "boolean"
    },
    "projectSelection": {
      "type": "string"
    }
  }
}
mp_getLogs获取小程序控制台日志。可选择在获取后清空日志。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "clear": {
      "default": false,
      "type": "boolean"
    }
  }
}
mp_listProjects列出微信开发者工具中的最近项目,方便在 mp_ensureConnection 返回项目选择提示后继续选择项目。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {}
}
mp_mockWxMethod有限 mock wx 方法能力。当前仅支持 method=request:action=mock 时按 requestRules mock wx.request 成功响应;action=restore 时恢复 wx.request。未匹配请求默认透传原始 wx.request。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "action": {
      "default": "mock",
      "type": "string",
      "enum": [
        "mock",
        "restore"
      ]
    },
    "method": {
      "default": "request",
      "type": "string",
      "enum": [
        "request"
      ]
    },
    "requestRules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1
          },
          "match": {
            "default": "contains",
            "type": "string",
            "enum": [
              "contains",
              "exact",
              "regex"
            ]
          },
          "method": {
            "type": "string",
            "minLength": 1
          },
          "statusCode": {
            "default": 200,
            "type": "integer",
            "minimum": 100,
            "maximum": 599
          },
          "data": {},
          "header": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "cookies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "delayMs": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "url"
        ]
      }
    }
  }
}
mp_navigate在小程序内导航,支持 navigateTo、redirectTo、reLaunch、switchTab 和 navigateBack。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "path": {
      "type": "string",
      "minLength": 1
    },
    "query": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "transition": {
      "default": "navigateTo",
      "type": "string",
      "enum": [
        "navigateTo",
        "redirectTo",
        "reLaunch",
        "switchTab",
        "navigateBack"
      ]
    },
    "waitMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}
mp_screenshot截取当前小程序视口的截图。需要已有活动会话;若提示没有活动会话,请先调用 mp_ensureConnection。默认返回内联图片,或保存到文件路径。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "path": {
      "type": "string",
      "minLength": 1
    }
  }
}
mp_setDefaultProject设置默认的小程序项目路径,设置后下次连接会优先使用该项目。通常用于修复项目选择失败后的后续重试。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "projectPath": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "projectPath"
  ]
}
page_callMethod调用当前页面实例上暴露的方法。参数可以作为数组提供。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "method": {
      "type": "string",
      "minLength": 1
    },
    "args": {
      "type": "array",
      "items": {}
    }
  },
  "required": [
    "method"
  ]
}
page_getData获取当前页面的数据对象,可选择指定子数据路径。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "path": {
      "type": "string",
      "minLength": 1
    }
  }
}
page_getElement通过选择器获取页面元素,相当于 page.$(selector)。返回每个元素的摘要信息(tagName、text、value、size、offset);设置 withWxml 为 true 可额外返回元素的完整 outerWxml。支持 [index=N] 语法选择第 N 个元素。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "innerSelector": {
      "type": "string",
      "minLength": 1
    },
    "withWxml": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "selector"
  ]
}
page_getElementByXpath通过 XPath 获取页面第一个匹配元素,相当于 page.getElementByXpath(xpath) / page.xpath(xpath)。适合按文本、层级关系、ancestor/following 等 XPath 表达式定位元素;设置 withWxml 为 true 可额外返回完整 outerWxml。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "xpath": {
      "type": "string",
      "minLength": 1
    },
    "withWxml": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "xpath"
  ]
}
page_getElements通过选择器获取页面元素数组,相当于 page.$$(selector)。返回每个元素的摘要信息(tagName、text、value、size、offset);设置 withWxml 为 true 可额外返回每个元素的完整 outerWxml。支持 [index=N] 语法选择第 N 个元素。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "withWxml": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "selector"
  ]
}
page_getElementsByXpath通过 XPath 获取页面匹配元素数组,相当于 page.getElementsByXpath(xpath)。适合按文本、属性、层级关系、位置函数等 XPath 表达式批量定位元素;设置 withWxml 为 true 可额外返回每个元素的完整 outerWxml。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "xpath": {
      "type": "string",
      "minLength": 1
    },
    "withWxml": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "xpath"
  ]
}
page_setData使用 setData 更新当前页面的数据。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "data"
  ]
}
page_waitElement等待指定选择器的元素出现在页面上。支持 [index=N] 语法选择第 N 个元素。增强版:增加了超时和重试间隔参数。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "selector": {
      "type": "string",
      "minLength": 1
    },
    "timeout": {
      "default": 5000,
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "retryInterval": {
      "default": 200,
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "selector"
  ]
}
page_waitTimeout等待指定的毫秒数。
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "launch",
            "connect"
          ]
        },
        "cliPath": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        },
        "wsEndpoint": {
          "type": "string",
          "minLength": 1
        },
        "timeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "port": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "account": {
          "type": "string",
          "minLength": 1
        },
        "ticket": {
          "type": "string",
          "minLength": 1
        },
        "trustProject": {
          "type": "boolean"
        },
        "args": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "cwd": {
          "type": "string",
          "minLength": 1
        },
        "autoClose": {
          "type": "boolean"
        },
        "autoLaunch": {
          "type": "boolean"
        },
        "launchTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "connectTimeout": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "milliseconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "milliseconds"
  ]
}

Resources 0

  • None observed.

Resource templates 0

  • None observed.

Prompts 3

  • connect-and-inspect-homeconnect-and-inspect-home

    Connect to the mini program, confirm the current page, then inspect the home page UI.

  • connect-and-screenshotconnect-and-screenshot

    Connect first, then capture a screenshot from the active mini program page.

  • recover-connectionrecover-connection

    Recover a failed mini program connection using the MCP's expected retry order.

Remote endpoints

EndpointTransportAuthenticationHealthObserved
No verified remote endpoint is linked.

WeChat Mini Program Dev MCP Server questions

How do I install WeChat Mini Program Dev MCP Server?

Install the selected package version with: npm install --save-exact @yfme/weapp-dev-mcp@0.2.5

What tools does WeChat Mini Program Dev MCP Server provide?

WeChat Mini Program Dev MCP Server exposed 30 tools during independent protocol observation, including element_callMethod, element_getAttributes, element_getBoundingClientRect, element_getData, element_getInnerElement, element_getInnerElements, element_getStyles, element_getWxml, and others.

Is WeChat Mini Program Dev MCP Server secure?

The selected current version does not yet have completed public verification. Unknown does not mean clean or vulnerable.

Explore related MCP server guides

Curated product and capability guides containing this catalog record.

Developer Tool MCP ServersOfficial vs Community MCP Servers

Let’s talk about MCP security.

Share your details and our security team will contact you.