Skip to main content
Glama

MockMCP

托管的 MCP 端点,为原型设计代理提供真实的模拟数据。粘贴一个 URL,零配置。

在线访问 mockmcp.iohttps://mockmcp.io/mcp

专为那些希望在不连接后端、编写测试夹具或搭建本地 MCP 服务器的情况下原型化代理工作流的开发人员而设计。包含 12 个预构建工具,涵盖大多数代理教程中的场景。

尝试一下

# Initialize a session and get back a session id
curl -i -X POST https://mockmcp.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0.1"}}}'

# Use the Mcp-Session-Id header in subsequent calls:
curl -X POST https://mockmcp.io/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: <paste-id-here>" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_users","arguments":{"limit":3}}}'

Related MCP server: APIbase

连接您的客户端

Claude Code

claude mcp add --transport http mockmcp https://mockmcp.io/mcp

Cursor — 添加到 ~/.cursor/mcp.json

{
  "mcpServers": {
    "mockmcp": {
      "url": "https://mockmcp.io/mcp"
    }
  }
}

Claude Desktop — 设置 → 连接器 → 添加自定义连接器 → 将 https://mockmcp.io/mcp 粘贴为 URL。

无需 mcp-remote 代理。所有三个客户端均原生支持 Streamable HTTP。

工具

工具

功能

list_users

分页列出模拟用户

get_user

通过 ID 或种子获取单个模拟用户

create_user

创建模拟用户(无持久化)

list_products

分页列出模拟产品

get_product

获取单个模拟产品

list_orders

带有可选状态过滤器的模拟订单

get_order

获取单个模拟订单

create_order

创建模拟订单(无持久化)

list_events

模拟分析事件

create_event

记录模拟事件

send_email

返回虚假的成功信息,不发送任何内容

search_knowledge_base

带有排名结果的模拟知识库搜索

所有数据均根据您的输入生成——相同的输入,相同的输出。

限制

免费层级,按哈希后的 IP + User-Agent 指纹计算:

  • 每分钟 30 次请求

  • 每天 500 次请求

达到限制了?请在 mockmcp.io/waitlist 留下您的电子邮件,以便在付费层级推出时获得访问权限。

429 响应包含带有 upgrade_urlretry_after_seconds 的结构化 JSON-RPC 错误。每个成功的响应都包含 X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-ResetX-RateLimit-Scope 标头。

本地运行

npm install
npm run dev

服务器监听 http://localhost:3000。MCP 端点位于 /mcp。如果没有 Upstash 环境变量,速率限制将回退到内存存储(每个进程,适合开发)。

技术栈

部署(针对分支)

目标 Node 20+。构建和启动通过 nixpacks.toml 固定;健康检查和重启策略通过 railway.json 设置。

  1. Fork 此仓库,推送到 GitHub。

  2. Railway → 新项目 → 从 GitHub 部署 → 选择您的分支。

  3. 在 Railway → 变量中添加环境变量:

变量

说明

UPSTASH_REDIS_REST_URL

来自 upstash.com 免费层级

UPSTASH_REDIS_REST_TOKEN

与上述 URL 配对

PORT

Railway 会自动设置此项

  1. Railway 服务 → 设置 → 网络 → 自定义域名 → 粘贴您的域名 → 按照 DNS 说明操作。

健康检查

GET /health 返回 {"ok":true}。Railway 在部署期间会 ping 此接口。

等待名单注册

POST /api/waitlist 为每次注册记录一行结构化 JSON:

{"event":"waitlist_signup","email":"alice@example.com","at":"2026-04-24T19:33:06.396Z"}

使用 railway logs | grep waitlist_signup 进行搜索。设计上无需存储 — 当付费层级上线时,可替换为 Resend、Tally 转发或数据库。

许可证

MIT — 参见 LICENSE

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Unified MCP gateway for AI agents with 56+ tools and growing. Travel (Amadeus, Sabre GDS), e-commerce, local services, financial markets (Polymarket), and marketing APIs — all through a single endpoint. Pay-per-call via x402 micropayments in USDC.
    100
    4 npm
    10
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Turn any OpenAPI spec into MCP tools for Claude — instantly. Point mcp-openapi at any OpenAPI 3.x spec and Claude can call every endpoint through natural language. No custom integration code. No manual tool definitions. One line of config.
    2
    38 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides AI agents with 220+ tools for building websites, sending email, managing contacts, invoicing, databases, automation, and more through a single secure connection. Features hardware-bound authentication and works with Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients.
    -