compare-html
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"compare-html": {
"args": [
"@compare-html/cli@latest",
"--mcp"
],
"command": "npx"
}
}
}
服务介绍
Start the MCP Server
npx @compare-html/cli --mcp
Online Playground
Try it out at https://comparehtml.com
Available Tools
compare_html
Compare two HTML values and return their structural differences.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
baseHTML |
string |
No | Base HTML string |
baseHTMLFilePath |
string |
No | Base HTML file path |
contrastHTML |
string |
No | Contrast HTML string |
contrastHTMLFilePath |
string |
No | Contrast HTML file path |
At least one base and one contrast input must be provided.
Output:
Returns an array of HTMLValueDifference objects:
{
"differences": [
{
"pathSegments": ["0", "@class"],
"pathString": "0.@class",
"contrastPathString": "0.@class",
"displayPath": "div > @class",
"pathBelongsTo": "both",
"diffType": "valueChanged"
}
]
}