Mock APIs from Claude Code, Cursor, and Windsurf via MCP

If your AI coding agent can't reach out to a mock API, it can't help you test the integration. Here's how to wire RequestBin into Claude Code, Cursor, and Windsurf via MCP — and the 5 tools that let an agent drive the full mock-and-inspect workflow.

Mock APIs from Claude Code, Cursor, and Windsurf via MCP

An AI coding agent that can write your integration code but can't verify it works against a known-good mock endpoint is doing half the job. You write a Stripe webhook handler, the agent suggests it'll work, you run it against… nothing.

That's the gap the RequestBin MCP server (free on every plan) fills. Five mock tools, available inside Claude Code, Cursor, Windsurf, or any MCP-compatible client.

The tools

ToolWhat it does
list_mock_endpointsList your mocks with slug, URL, and rule count.
create_mock_endpointCreate a mock + get a live {slug}.rbmock.dev URL.
add_mock_ruleAppend a routing rule (match method/path → status + headers + body).
deploy_mockPublish the rule set so the live mock server picks it up.
list_mock_capturesList recent requests that hit the mock — verify your integration is actually calling it.

Setup (Claude Code)

Add this to your ~/.claude/claude_desktop_config.json (or Cursor's ~/.cursor/mcp.json):

{
  "mcpServers": {
    "requestbin": {
      "command": "npx",
      "args": ["-y", "@requestbin/mcp-server"],
      "env": {
        "REQUESTBIN_API_KEY": "rb_your_api_key_here"
      }
    }
  }
}

Get the API key from requestbin.net/api-keys — FREE plan includes 5 API keys.

What the workflow looks like

Once the MCP server is wired up, an AI agent can drive the full create-configure-deploy-verify loop. Example conversation with Claude Code:

You: "I'm building a Stripe webhook handler. Create a mock endpoint that returns a fake payment_intent.succeeded event so I can test my code."

Claude Code: Calls create_mock_endpoint → gets URL abc12.rbmock.dev. Calls add_mock_rule with the Stripe event payload. Calls deploy_mock. Reports the URL to you.

You: "Point my handler at the URL and call it."

Claude Code: Updates your code, runs curl against the mock to trigger your handler. Then calls list_mock_captures to confirm the request actually hit the mock with the right method, path, and body.

The whole loop runs without leaving the editor.

Why this matters

Most webhook-testing tools were built before AI coding agents existed. They assume a human will click around a web UI. That doesn't compose with agent-driven development.

The fix isn't "an MCP server that lets the agent see your mocks" — it's "an MCP server that lets the agent BUILD the mocks." Five tools cover the loop end-to-end:

  1. Create the mock (the agent owns the URL)
  2. Configure rules (the agent decides what responses to return)
  3. Deploy (no human in the loop)
  4. Trigger your code to hit it
  5. Verify by inspecting captures (the agent closes the loop itself)

FREE plan included

API keys and the MCP server are open on every plan, including FREE (5 keys per account). You can run the entire above workflow without paying. The paid tier kicks in at scale — more mocks, more rules per mock, custom subdomains, longer retention.

Other resources

Get your free API key →