AI 클라이언트가 HTTP 요청을 수행하고, 다단계 플로우를 실행하며, OpenAPI 스펙을 가져오고, 부하 테스트를 진행할 수 있도록 지원하는 API 테스트 워크벤치입니다.
다른 이름 cocaxcode/api-testing-mcp, @cocaxcode/api-testing-mcp
- 스타
- 13
- Tools
- —
- 다운로드, 30일
- 970
- 최신 버전
- 0.11.12
- 마지막 커밋
- 2026년 11월 10일
- 라이선스
- MIT
api-testing MCP란?
api-testing은(는) MCP server입니다. AI 클라이언트가 HTTP 요청을 수행하고, 다단계 플로우를 실행하며, OpenAPI 스펙을 가져오고, 부하 테스트를 진행할 수 있도록 지원하는 API 테스트 워크벤치입니다.
프로젝트 README에서 생성된 요약
api-testing MCP server 정보
개발자는 AI 클라이언트를 통해 직접 종합적인 API 테스트와 성능 모니터링을 수행할 수 있습니다. 이 워크벤치는 HTTP 요청 실행, 변수 추출을 포함한 다단계 요청 플로우 관리, 지연 시간 백분위 측정을 위한 부하 테스트 등 42개의 특화된 도구를 제공합니다. Claude Desktop, Cursor, Windsurf와 같은 클라이언트와 함께 사용하도록 설계되었으며, 모든 데이터가 로컬에서 실행되고 plain JSON으로 저장되므로 외부 계정이나 클라우드 서비스가 필요하지 않습니다.
사용자는 OpenAPI 스펙을 가져와 AI에게 전체 스키마 인지 능력을 부여할 수 있으며, 이를 통해 수동으로 파라미터를 입력하지 않고도 현실적인 모크 데이터를 생성하거나 유효한 요청을 구성할 수 있습니다. 서버에는 환경 비교를 위한 response diffing, 일괄 테스트 러너, Postman 가져오기/내보내기 기능과 같은 고급 기능이 포함되어 있습니다. 컨텍스트 윈도우 사용을 최적화하기 위해 헤더를 필터링하고 본문을 자르는 압축 모드를 제공하여 디버깅 세션 중 토큰 소비를 크게 줄여줍니다.
활용 사례
- 1복잡한 인증 플로우 자동화로그인 응답에서 토큰을 추출하여 후속 API 호출에 사용하는 방식으로 여러 요청을 체인으로 연결합니다.
- 2API 응답 무결성 검증특정 엔드포인트가 올바른 상태 코드, 본문 값 및 응답 시간을 반환하는지 확인합니다.
- 3동시 부하 테스트 수행여러 개의 동시 요청을 보내고 결과를 분석하여 엔드포인트의 부하 처리 성능을 측정합니다.
- 4스키마 준수 모크 데이터 생성가져온 OpenAPI 스펙에 정의된 타입과 형식을 기반으로 현실적인 테스트 페이로드를 생성합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
api-testing MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 api-testing MCP 설치
$ claude mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcpCursor에 api-testing MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"api-testing-mcp": {
"command": "npx",
"args": [
"-y",
"@cocaxcode/api-testing-mcp"
]
}
}
}VS Code에 api-testing MCP 설치
.vscode/mcp.json
{
"servers": {
"api-testing-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cocaxcode/api-testing-mcp"
]
}
}
}VS Code CLI에 api-testing MCP 설치
$ code --add-mcp '{"name":"api-testing-mcp","type":"stdio","command":"npx","args":["-y","@cocaxcode/api-testing-mcp"]}'Claude Desktop에 api-testing MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"api-testing-mcp": {
"command": "npx",
"args": [
"-y",
"@cocaxcode/api-testing-mcp"
]
}
}
}Codex에 api-testing MCP 설치
$ codex mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcpCodex config.toml에 api-testing MCP 설치
~/.codex/config.toml
[mcp_servers.api-testing-mcp] command = "npx" args = ["-y", "@cocaxcode/api-testing-mcp"]
Gemini CLI에 api-testing MCP 설치
$ gemini mcp add -s user api-testing-mcp npx -- -y @cocaxcode/api-testing-mcpGemini settings.json에 api-testing MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"api-testing-mcp": {
"command": "npx",
"args": [
"-y",
"@cocaxcode/api-testing-mcp"
]
}
}
}구성
API_TESTING_DIR
| 이름 | 설명 | 유형 |
|---|---|---|
| API_TESTING_DIR | — |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기Quick Overview
The most complete MCP server for API testing — 42 tools, zero config, nothing else comes close. This is not just a request sender. It is a full testing workbench: HTTP requests with assertions, multi-step flows with variable extraction, OpenAPI import with schema-aware mock data, load testing with percentile metrics, response diffing across environments, bulk test runners, reusable collections, environment groups with directory scoping and persistent defaults, Postman import/export, and cURL export. All from natural conversation. No accounts, no cloud, no generated files. Everything runs inline and stores as plain JSON you own.
Just Talk to It
You don't need to learn tool names or parameters. Describe what you want and the AI picks the right tool.
"Create a group called my-project and add this directory as scope"
"Set up a dev environment with BASE_URL http://localhost:3000"
"Switch to prod for this session"
"Set dev as the default environment"
"Import my API spec from /api-docs-json"
"Show me all user endpoints"
"GET /users"
"Create a user with random data"
"Verify that DELETE /users/5 returns 204"
"Login as admin, extract the token, then fetch dashboard stats"
"How fast is /health with 50 concurrent requests?"
"Run all my saved smoke tests"
"Compare the users endpoint between dev and prod"
"Export the create-user request as curl"
"Export my collection to Postman"
If you've imported an OpenAPI spec, the AI already knows every endpoint, every required field, every valid enum value. When you say "create a blog post", it reads the schema and builds the request correctly — no guessing.
Installation
Claude Code
claude mcp add --scope user api-testing -- npx -y @cocaxcode/api-testing-mcp@latest
Claude Desktop
Add to your config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"api-testing": {
"command": "npx",
"args": ["-y", "@cocaxcode/api-testing-mcp@latest"]
}
}
}
Cursor / Windsurf
Add to .cursor/mcp.json or .windsurf/mcp.json in your project root:
{
"mcpServers": {
"api-testing": {
"command": "npx",
"args": ["-y", "@cocaxcode/api-testing-mcp@latest"]
}
}
}
VS Code — add to .vscode/mcp.json:
{
"servers": {
"api-testing": {
"command": "npx",
"args": ["-y", "@cocaxcode/api-testing-mcp@latest"]
}
}
}
Codex CLI (OpenAI):
codex mcp add api-testing -- npx -y @cocaxcode/api-testing-mcp@latest
Or add to ~/.codex/config.toml:
[mcp_servers.api-testing]
command = "npx"
args = ["-y", "@cocaxcode/api-testing-mcp@latest"]
Gemini CLI — add to ~/.gemini/settings.json:
{
"mcpServers": {
"api-testing": {
"command": "npx",
"args": ["-y", "@cocaxcode/api-testing-mcp@latest"]
}
}
}
Quick Start
Once installed, set up an environment so relative paths resolve automatically:
"Create an environment called dev with BASE_URL http://localhost:3000"
If your API has a Swagger/OpenAPI spec, import it:
"Import my API spec from http://localhost:3000/api-docs-json"
Verify with: "List my environments" — you should see the one you just created.
Features
HTTP Requests
Send any HTTP method with headers, query params, JSON body, auth, and {{variable}} interpolation. Relative URLs auto-resolve against BASE_URL.
"POST to /api/users with name Jane and email jane@company.com using my bearer token"
Supports: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS — Bearer / API Key / Basic auth — custom timeouts.
Compression modes (v0.13+)
AI agents pay for every byte that lands in their context window. By default, request now returns a compressed response that cuts 70-95% of those tokens without losing debugging value. Three optional parameters control it:
| Param | Values | What it does |
|---|---|---|
verbosity |
'minimal' / 'normal' (default) / 'full' |
Controls detail level |
only_fields |
['user.id', 'items[*].name'] |
Returns only these body paths (dot-notation + wildcards) |
max_body_bytes |
number (default 2048) |
Body size cap for 'normal' |
Modes:
minimal— onlystatus,timing,size_bytes, first 200 chars of body. Perfect for health checks, polling loops, or fire-and-forget calls. Saves ~95% tokens.normal(default) — filtered headers (dropsDate,Server,CF-*,Set-Cookie, etc.) + body truncated tomax_body_bytes. Covers ~80% of debugging use cases. Saves ~75% tokens.full— complete response untouched. Use when you explicitly need every header or the full body.
Typical savings on a 5 KB JSON response (≈1,500 tokens):
| Mode | Tokens consumed | Savings |
|---|---|---|
full |
~1,500 | 0% (baseline) |
normal |
~300-400 | ~75% |
minimal |
~50-80 | ~95% |
only_fields: ['data.id'] |
~30 | ~98% |
For a head-to-head comparison against
curl,WebFetchand other native alternatives with measured numbers, see Native alternatives below.
Recovering full responses: every compressed response includes a call_id. If you need the full body later, call inspect_last_response({ call_id }) — no need to re-execute the request. This works for request, assert, and each step of flow_run. Responses are kept in a 20-slot ring buffer and persisted to .api-testing/last-responses/ with a 1-hour TTL.
// Example: normal (default) response
{
"call_id": "k3m9a2xp",
"status": 200,
"statusText": "OK",
"method": "GET",
"url": "https://api.example.com/users/1",
"timing": { "total_ms": 142 },
"size_bytes": 5324,
"headers": { "content-type": "application/json" },
"body": { "id": 1, "email": "...", "...": "..." },
"body_truncated": true,
"hint": "Body truncated to 2048 bytes (full size: 5324B). Call inspect_last_response({ call_id: \"k3m9a2xp\" }) for the full body.",
"tokens_saved_estimate": 820
}
Native alternatives: real token cost
How this MCP compares against the native options Claude Code has when api-testing is not available (Bash + curl, WebFetch, etc.).
TL;DR: compared to raw curl, request saves between 65% and 97% of context tokens depending on the mode, with no loss of debugging information. Measured on a real call to GET /api/v1/blog returning 8 posts (~8.7 KB of JSON, 19 response headers):
| How the agent calls it | Uses MCP? | Tokens consumed | Delta vs curl |
|---|---|---|---|
Bash + curl (raw stdout) |
❌ native | ~2,170 | baseline |
WebFetch (LLM summary) |
❌ native | ~400-800 | −65%, but no auth / no envs / no inspect |
request verbosity=full |
✅ MCP | ~2,170 | 0% (same as curl, no compression) |
request verbosity=normal (default) |
✅ MCP | ~750 | −65% |
request verbosity=minimal |
✅ MCP | ~50 | −97% |
request with only_fields: ["data[*].id","data[*].title"] |
✅ MCP | ~190 | −91% |
Why this table's numbers differ slightly from the "Compression modes" section above: these come from a single real-world response, while the previous table shows typical savings on a synthetic 5 KB response. Trend and order of magnitude are the same.
Notes:
- The default mode (
normal) already saves 65% without any configuration: it filters out noisy headers (Date, Server, CF-*, Set-Cookie…) and caps the body at 2048 bytes. only_fieldsaccepts dot-paths with array index and wildcard support (items[*].name) — returns only the fields you ask for.- The MCP also adds features that have no direct native equivalent:
{{variable}}interpolation, stored environments, auth schemas, flows, Postman import/export, andinspect_last_responseto recover the full body without re-hitting the server. - Every registered MCP adds a fixed overhead of ~300-600 tokens per session (its instructions block + tool names). Typical break-even: 1-2 real calls per session.
Assertions
Validate responses with structured pass/fail results:
"Verify that GET /api/health returns 200, body.status is ok, and responds in under 500ms"
PASS — 3/3 assertions passed
status === 200
body.status === "ok"
timing.total_ms < 500
10 operators: eq, neq, gt, gte, lt, lte, contains, not_contains, exists, type
Request Flows
Chain requests with variable extraction between steps. Perfect for auth flows and CRUD sequences.
"Login as admin@test.com, extract the access token, then use it to fetch all users"
flow_run({
steps: [
{
name: "login",
method: "POST",
url: "/auth/login",
body: { email: "admin@test.com", password: "SecurePass#99" },
extract: { "TOKEN": "body.access_token" }
},
{
name: "get-users",
method: "GET",
url: "/api/users",
headers: { "Authorization": "Bearer {{TOKEN}}" }
}
]
})
OpenAPI Import
Import specs from a URL or local file (JSON and YAML). Once imported, the AI knows every endpoint, parameter, and schema.
"Import my API spec from http://localhost:3000/api-docs-json"
"Import the spec from ./openapi.yaml"
"What parameters does POST /users expect?"
Supports OpenAPI 3.x with full $ref resolution, allOf, oneOf, anyOf. OpenAPI 2.0 partially supported.
Mock Data Generation
Generate realistic fake data from your OpenAPI schemas. Respects types, formats (email, uuid, date-time), enums, and required fields.
"Generate mock data for creating a user"
{
"email": "user42@example.com",
"name": "Test User 73",
"password": "TestPass123!",
"role": "admin"
}
Load Testing
Fire N concurrent requests and get performance metrics:
"How fast is the health endpoint with 50 concurrent requests?"
LOAD TEST — GET /api/health
Requests: 50 concurrent
Successful: 50 | Failed: 0
Req/sec: 23.31
Min: 45ms | Avg: 187ms
p50: 156ms | p95: 412ms | p99: 523ms
Max: 567ms
Response Diffing
Execute two requests and compare their responses field by field. Detect regressions or compare environments.
"Compare the users endpoint between dev and prod"
Bulk Testing
Run every saved request in a collection (or filter by tag) and get a summary:
"Run all my saved smoke tests"
BULK TEST — 8/8 passed | 1.2s total
health — GET /health → 200 (45ms)
list-users — GET /users → 200 (123ms)
create-post — POST /blog → 201 (89ms)
login — POST /auth/login → 200 (156ms)
Collections
Save requests for reuse with tags. Build regression suites.
"Save this request as create-user with tags auth, smoke"
"List all requests tagged smoke"
Environments
Environments hold your variables — BASE_URL, tokens, API keys — and keep them separated by context. The system has three core concepts:
Group. A group organizes environments and binds them to directories. A group has N scopes (directories) that share its environments, and exactly one default environment. When you create an environment inside a group, it belongs to that group. When you cd into a directory that is a scope of a group, its environments become available automatically.
Default. The default environment activates automatically when you enter a scope of its group. It persists between sessions — restart your editor, reopen your terminal, and the default is still there. Set it once and forget about it.
Active. The active environment is what is being used right now for variable resolution. It starts as the default when you enter a scope, but you can switch it at any time. The active selection is session-only — it resets to the default on restart.
Global environments (not associated with any group) still exist. They require explicit activation with env_switch and do not persist between sessions.
Practical example:
"Create a group called my-api"
"Add this directory as scope to my-api"
"Create a dev environment with BASE_URL http://localhost:3000" <- auto-joins group, auto-default
"Create a prod environment with BASE_URL https://api.example.com"
"List environments" <- shows dev (active, default) and prod
"Switch to prod" <- session only
"Set prod as default" <- persists
Automatic interpolation. Any {{variable}} in URLs, headers, query params, or request bodies is resolved against the active environment before the request fires. Set BASE_URL once and every relative path just works.
Your credentials never leave your machine. Environment files are plain JSON stored in ~/.api-testing/. Nothing syncs to any cloud. Nothing gets embedded in exports. Nothing gets tracked by git. Your tokens and secrets stay exactly where they should: on your disk, under your control.
Postman Import & Export
Bidirectional Postman support. Migrate seamlessly between Postman and your AI workflow.
"Import my Postman collection from ./exported.postman_collection.json"
"Export my collection to Postman"
"Export the dev environment for Postman"
Collection: Postman v2.1 format. Folders become tags. Auth inherited from folders/collection level. Supports raw JSON, x-www-form-urlencoded, form-data bodies.
Environment: Prefers currentValue over value. Skips disabled variables. Optional activate flag.
Collection: Requests grouped in folders by tag. Auth mapped to Postman's native format. {{variables}} preserved as-is.
Environment: All variables exported as enabled: true in Postman-compatible format.
Native Export & Import
Export collections and environments to a portable .atm/ folder. Share with your team or copy between projects.
"Export my collection and dev environment"
your-project/
└── .atm/
├── collection.json
└── dev.env.json
Note:
.atm/is automatically added to.gitignoreon first export.
cURL Export
Convert any saved request into a ready-to-paste cURL command with resolved variables.
"Export the create-user request as curl"
curl -X POST \
'https://api.example.com/users' \
-H 'Authorization: Bearer eyJhbGci...' \
-H 'Content-Type: application/json' \
-d '{"name":"Jane","email":"jane@company.com"}'
Tool Reference
42 tools across 10 categories:
| Category | Tools | Count |
|---|---|---|
| Requests | request |
1 |
| Inspect | inspect_last_response |
1 |
| Testing | assert |
1 |
| Flows | flow_run |
1 |
| Collections | collection_save, collection_list, collection_get, collection_delete |
4 |
| Environments | env_create, env_list, env_set, env_get, env_switch, env_rename, env_delete, env_spec, env_project_clear, env_project_list |
10 |
| Groups | env_group_create, env_group_list, env_group_delete, env_group_add_scope, env_group_remove_scope, env_set_default, env_set_group |
7 |
| API Specs | api_import, api_spec_list, api_endpoints, api_endpoint_detail |
4 |
| Mock | mock |
1 |
| Utilities | load_test, export_curl, diff_responses, bulk_test, export_collection, import_collection, export_environment, import_environment, export_postman_collection, import_postman_collection, export_postman_environment, import_postman_environment |
12 |
Tip: You don't need to call tools directly. Describe what you want and the AI picks the right one.
Storage
Everything is local. No database, no cloud sync, no telemetry. All data lives in ~/.api-testing/ as plain JSON files you can read, back up, or delete at any time.
~/.api-testing/
├── groups/ # Environment groups with scopes and defaults
├── environments/ # Environment variables — tokens, keys, passwords
├── collections/ # Saved requests (shareable, no secrets)
├── specs/ # Imported OpenAPI specs
└── project-envs.json # Session-only active environments (cleared on restart)
Global storage vs project exports. The ~/.api-testing/ directory is your private, global store — this is where credentials live and they never leave. When you export a collection or environment, it goes to .atm/ in your project root. That folder is auto-added to .gitignore on first export, but even if you choose to commit it, your credentials stay in ~/.api-testing/ and are never copied into .atm/. You can safely share .atm/ exports with your team without leaking secrets.
Override the default storage path:
{
"env": { "API_TESTING_DIR": "/path/to/custom/.api-testing" }
}
Warning: If you override
API_TESTING_DIRto a path inside a git repository, add.api-testing/to your.gitignoreto avoid pushing credentials.
Architecture
src/
├── index.ts # Entry point (shebang + StdioServerTransport)
├── server.ts # createServer() factory
├── tools/ # 42 tool handlers (one file per category)
│ ├── request.ts # HTTP request (1)
│ ├── inspect.ts # inspect_last_response (1)
│ ├── assert.ts # Assertions (1)
│ ├── flow.ts # Request chaining (1)
│ ├── collection.ts # Collection CRUD (4)
│ ├── environment.ts # Environments + groups (17)
│ ├── api-spec.ts # OpenAPI import/browse (4)
│ ├── mock.ts # Mock data generation (1)
│ ├── load-test.ts # Load testing (1)
│ └── utilities.ts # curl, diff, bulk, import/export (11)
├── lib/ # Business logic (no MCP dependency)
│ ├── http-client.ts # fetch wrapper with timing
│ ├── storage.ts # JSON file storage engine (atomic writes)
│ ├── compress.ts # Response compression + verbosity modes
│ ├── response-cache.ts # Ring buffer + disk cache for inspect
│ ├── schemas.ts # Shared Zod schemas (HttpMethodSchema, AuthSchema)
│ ├── url.ts # BASE_URL resolution
│ ├── path.ts # Dot-notation accessor (body.data.0.id)
│ ├── interpolation.ts # {{variable}} resolver
│ └── openapi-parser.ts # $ref + allOf/oneOf/anyOf resolution
└── __tests__/ # 15 test suites, 180 tests
Stack: TypeScript (strict) · MCP SDK · Zod · Vitest · tsup
api-testing MCP 질문
api-testing MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add api-testing-mcp -- npx -y @cocaxcode/api-testing-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
api-testing MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
대용량 API 응답은 어떻게 처리하나요?
서버는 토큰 사용량을 줄이기 위해 압축 모드(minimal, normal, full)를 사용합니다. inspect_last_response 도구에서 call_id를 사용하면 전체 본문을 다시 불러올 수 있습니다.
기존 API 문서를 가져올 수 있나요?
네, URL이나 로컬 JSON/YAML 파일에서 OpenAPI 스펙을 가져올 수 있어 AI가 모든 엔드포인트와 스키마를 이해할 수 있습니다.
복잡한 인증 플로우를 지원하나요?
네, Request Flows를 사용하여 로그인 후 토큰을 추출하고, 해당 토큰을 다음 호출에 사용하는 등 여러 요청을 체인으로 연결할 수 있습니다.