AI Skill Hub 推荐使用:Mockwave 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
Mockwave 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Mockwave 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/lfdubiela/mockwave
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mockwave": {
"command": "npx",
"args": ["-y", "mockwave"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Mockwave 执行以下任务... Claude: [自动调用 Mockwave MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mockwave": {
"command": "npx",
"args": ["-y", "mockwave"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Mockwave is an open-source, multi-protocol mock server. Define rules and simulations in JSON, manage them through the browser UI, or let an AI assistant do it — Mockwave responds to HTTP, GraphQL, SOAP, and gRPC requests with weighted traffic splitting, dynamic JavaScript responses, real-time metrics, and a built-in MCP server for Claude Code integration.
---
localhost:9090 for rule/simulation CRUD, live metrics, and unmatched request capturemockwave mcp exposes a Model Context Protocol server so Claude Code can create rules, manage simulations, and auto-generate mocks from any OpenAPI 2.0/3.0 specstore.DataStore, observability.Logger/Tracer/MetricsRecorder interfaces; bring your own backends---
mockwave version
bash
docker run -p 8080:8080 -p 9090:9090 \
-v $(pwd)/config.json:/config.json \
ghcr.io/lfdubiela/mockwave:v0.1.0 \
start -f /config.json
---
protoc --descriptor_set_out=service.pb --include_imports service.proto
Create two tables (substitute region/table names as needed):
aws dynamodb create-table --table-name mockwave-rules \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--billing-mode PAY_PER_REQUEST
aws dynamodb create-table --table-name mockwave-simulations \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--billing-mode PAY_PER_REQUEST
---
Ensure mockwave is on your $PATH (e.g. via brew install mockwave), then add to ~/.claude/mcp.json:
{
"mcpServers": {
"mockwave-local": {
"command": "mockwave",
"args": ["mcp", "--admin-url", "http://localhost:9090"]
}
}
}
Multiple instances are supported — Claude Code namespaces the tools automatically:
{
"mcpServers": {
"mockwave-local": {
"command": "mockwave",
"args": ["mcp", "--admin-url", "http://localhost:9090"]
},
"mockwave-sandbox": {
"command": "mockwave",
"args": ["mcp", "--admin-url", "https://mockwave.sandbox.example.com"]
}
}
}
Security: The Mockwave admin API has no authentication. When pointing --admin-url at a remote instance, ensure the admin port is protected by a firewall or reverse proxy.
```bash
docker build -t mockwave:local .
docker run -p 8080:8080 -p 9090:9090 \
-v $(pwd)/config.json:/config.json \
mockwave:local start -f /config.json
---
Requirements: Go 1.21+
```bash git clone https://github.com/lfdubiela/mockwave.git cd mockwave
make build # outputs ./mockwave
```bash
Create a rule from a natural language description:
You: "Create a mock for GET /orders that returns 200 with an empty orders array"
Claude calls create_simulation → POST /api/simulations
Claude calls create_rule → POST /api/rules
Claude: "Done. GET http://localhost:8080/orders now returns {"orders":[]}"
Generate mocks from an existing OpenAPI spec:
You: "Generate mocks from https://petstore3.swagger.io/api/v3/openapi.json"
Claude calls generate_from_openapi with the URL
Claude: "Created 18 rules and 18 simulations covering all Petstore endpoints.
GET /pet/{petId} → 200 {"id":1,"name":"doggie","status":"available"}
POST /pet → 201 {"id":1,"name":"doggie"}
DELETE /pet/{petId} → 200
..."
Inspect what's being hit and fix gaps:
You: "What requests are hitting mockwave but not matching any rule?"
Claude calls list_unmatched
Claude: "3 unmatched requests found:
POST /api/v2/checkout ← no rule
GET /api/v2/cart/99 ← no rule
Want me to create mocks for these?"
Dynamic script mock via MCP:
You: "Create a mock for GET /users/:id that echoes the ID back in the response"
Claude calls create_simulation with script:
const id = request.path.split('/').pop();
return { body: { id: id, name: "User " + id } };
Claude calls create_rule → POST /api/rules
Claude: "Done. GET /users/42 now returns {"id":"42","name":"User 42"}"
cat > config.json <<'EOF' { "rules": [ { "id": "hello", "name": "Hello World", "match": { "method": "GET", "path": "/hello" }, "buckets": [{ "weight": 100, "action": "simulate", "simulation_id": "hello-sim" }] } ], "simulations": [ { "id": "hello-sim", "protocol": "http", "response": { "status": 200, "body": { "message": "Hello from Mockwave!" } } } ] } EOF
mockwave validate config.json ```
---
The JSON config file has two top-level arrays: rules and simulations.
{
"rules": [ ...Rule... ],
"simulations": [ ...Simulation... ]
}
docker run -p 8080:8080 -p 9090:9090 \ -v $(pwd)/config.json:/config.json \ ghcr.io/lfdubiela/mockwave:v0.1.0 \ start -f /config.json
docker run -p 8080:8080 -p 9090:9090 \ -e AWS_ACCESS_KEY_ID=... \ -e AWS_SECRET_ACCESS_KEY=... \ -e AWS_REGION=us-east-1 \ ghcr.io/lfdubiela/mockwave:v0.1.0 \ start --store dynamodb ```
mockwave [command]
Commands:
start Start the mock server
validate Validate a config file without starting the server
version Print version
mcp Start MCP server for AI assistant integration (Claude Code, etc.)
Flags (start):
-f, --config string Path to JSON config file (required for --store=json)
--port int Mock server port (default 8080)
--admin-port int Admin UI/API port (default 9090)
--protocols string Comma-separated: http,graphql,soap,grpc (default "http")
--grpc-port int gRPC server port (default 50051)
--grpc-proto string Path to compiled .pb descriptor for gRPC proto conversion
# Store backend
--store string Storage backend: json|dynamodb|mongo|cosmos (default "json")
# DynamoDB
--dynamo-rules-table string DynamoDB table for rules (default "mockwave-rules")
--dynamo-sims-table string DynamoDB table for simulations (default "mockwave-simulations")
--dynamo-region string AWS region (default "us-east-1")
--dynamo-endpoint string Custom endpoint, e.g. http://localhost:8000
# MongoDB
--mongo-uri string MongoDB connection URI (default "mongodb://localhost:27017")
--mongo-db string MongoDB database name (default "mockwave")
# Cosmos DB
--cosmos-uri string Cosmos DB connection string (MongoDB API)
--cosmos-db string Cosmos DB database name (default "mockwave")
All endpoints are on the admin port (default :9090).
| Method | Path | Description |
|---|---|---|
GET | /api/rules | List all rules |
POST | /api/rules | Create a rule |
GET | /api/rules/:id | Get a rule |
PUT | /api/rules/:id | Update a rule |
DELETE | /api/rules/:id | Delete a rule |
GET | /api/simulations | List all simulations |
POST | /api/simulations | Create a simulation |
GET | /api/simulations/:id | Get a simulation |
PUT | /api/simulations/:id | Update a simulation |
DELETE | /api/simulations/:id | Delete a simulation |
GET | /api/openapi.json | OpenAPI 3.0 spec (JSON) |
GET | /api/metrics | Current metrics snapshot (JSON) |
GET | /api/metrics/stream | SSE stream — one event per second |
GET | /api/unmatched | List captured unmatched requests |
DELETE | /api/unmatched | Clear unmatched request buffer |
POST | /api/reload | Trigger hot-reload from store |
GET | /api/health | {"status":"ok"} |
With Mockwave running, add to ~/.claude/mcp.json (create if it doesn't exist):
{
"mcpServers": {
"mockwave-local": {
"command": "mockwave",
"args": ["mcp", "--admin-url", "http://localhost:9090"]
}
}
}
Then ask Claude Code to do the work:
"Generate mocks from https://petstore3.swagger.io/api/v3/openapi.json"
"Create a mock for POST /checkout that returns 201 with an order ID"
"What requests are hitting mockwave but not matching any rule?"
mockwave mcp exposes a Model Context Protocol server that lets Claude Code (and other MCP-compatible AI assistants) create, inspect, and delete rules and simulations on any Mockwave instance — local or remote.
Mockwave 是一个开源的多协议 mock 服务器。通过 JSON 定义规则和模拟,通过浏览器 UI 管理它们,或者让 AI 助手来做它 — Mockwave 会响应 HTTP、GraphQL、SOAP 和 gRPC 请求,并将流量分割为权重桶(例如,90% mock / 10% 转发到真实服务)。
Mockwave 的功能包括:多协议支持(HTTP REST、GraphQL、SOAP、gRPC),流量分割,动态脚本支持(每个模拟的 JavaScript),以及实时管理 UI。
安装 Mockwave 可以使用 Docker,方法是运行 `docker run -p 8080:8080 -p 9090:9090 -v $(pwd)/config.json:/config.json ghcr.io/lfdubiela/mockwave:v0.1.0 start -f /config.json`。
使用 Mockwave 的快速入门包括:创建一个规则从自然语言描述中创建一个 mock,生成 mock 从现有的 OpenAPI spec 中生成 mock 等。
配置 Mockwave 的 JSON 文件有两个顶级数组:`rules` 和 `simulations`。配置文件的格式如下: `{ "rules": [ ...Rule... ], "simulations": [ ...Simulation... ] }`。
Mockwave 的 CLI 参考包括 `start`、`validate`、`version` 和 `mcp` 等命令。Admin REST API 的所有端点都在管理端口(默认 `:9090`)上。
MCP(Claude Code 集成)允许 Mockwave 运行时添加到 `~/.claude/mcp.json` 中: `{ "mcpServers": { "mockwave-local": { "command": "mockwave", "args": ["mcp", "--admin-url", "http://localhost:9090"] } } }`。
高质量的MCP工具,支持Goja脚本
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,Mockwave 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | mockwave |
| 原始描述 | 开源MCP工具:HTTP mock server with Goja scripting, MCP integration for AI-assisted rule gener。⭐6 · Go |
| Topics | mcpapi-testingdeveloper-toolsgojagolanghttp |
| GitHub | https://github.com/lfdubiela/mockwave |
| License | MIT |
| 语言 | Go |
收录时间:2026-06-01 · 更新时间:2026-06-02 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端