# api-testing MCP server

> An API testing workbench that enables AI clients to perform HTTP requests, run multi-step flows, import OpenAPI specs, and conduct load testing.

- Repository: https://github.com/cocaxcode/api-testing-mcp
- Page: https://hostedmcp.org/servers/cocaxcode/api-testing-mcp
- Transport: stdio
- Stars: 13
- License: MIT
- Latest version: 0.11.12

## Install

### Claude Code

```sh
claude mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "api-testing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cocaxcode/api-testing-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "api-testing-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cocaxcode/api-testing-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"api-testing-mcp","type":"stdio","command":"npx","args":["-y","@cocaxcode/api-testing-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "api-testing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cocaxcode/api-testing-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.api-testing-mcp]
command = "npx"
args = ["-y", "@cocaxcode/api-testing-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user api-testing-mcp npx -- -y @cocaxcode/api-testing-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "api-testing-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@cocaxcode/api-testing-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `API_TESTING_DIR` | no | no |  |

## FAQ

### How does it handle large API responses?

The server uses compression modes (minimal, normal, full) to reduce token usage, and you can recover the full body using the call_id with the inspect_last_response tool.

### Can I import existing API documentation?

Yes, you can import OpenAPI specifications from a URL or a local JSON/YAML file, allowing the AI to understand all endpoints and schemas.

### Does it support complex authentication flows?

Yes, you can use Request Flows to chain multiple requests together, such as logging in to extract a token and then using that token for subsequent calls.
