# api-testing-mcp

MCP server for API testing through conversation. HTTP requests with assertions, multi-step flows, OpenAPI import, load testing, and response comparison.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: cocaxcode
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cocaxcode/api-testing-mcp
- Updated: 2026-05-02
- HTML: https://affpapa.org/en/nevibecode/mcp/api-testing-mcp

## What it does

The server provides tools for HTTP requests (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) with headers, query params, body, Bearer/API Key/Basic auth, and variable interpolation. You can set assertions on status and body, chain requests with data extraction, import an OpenAPI spec and generate schema-aware requests, run load tests with percentile metrics, compare responses between environments, build test collections, and run them as a suite. Environments, groups, and collections are stored as local JSON.

Response compression (since version 0.13) cuts context size by 70–95 %: the `verbosity` parameter with values `minimal`, `normal`, and `full` controls detail level, `only_fields` returns only specified body paths, `max_body_bytes` truncates the body. For loops or health checks, `minimal` saves 95 % of tokens. Full responses can be retrieved later by `call_id`. Requires Node.js 20 or later.

## Requirements
- Needs: Node.js (commands run via npx)
- A remote (HTTP) option exists: the address is in the README

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "api-testing-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@cocaxcode/api-testing-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "api-testing-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@cocaxcode/api-testing-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add api-testing-mcp npx -y @cocaxcode/api-testing-mcp
```

## When to use it
- send an HTTP request with status and body assertions
- run a multi-step flow extracting tokens between calls
- import an OpenAPI spec and generate requests from the schema
- run a load test and get response time percentiles
- compare the same endpoint between two environments

## Example prompts
- Create a dev environment with BASE_URL `http://localhost:3000`
- Import my API spec from `/api-docs-json`
- GET `/users` and verify status is 200

## Similar
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13169
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 9946
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11912
- [mockserver](https://affpapa.org/en/nevibecode/mcp/mockserver.md) — MCP server · ★ 4996

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
