conversational-api-debugger
Debug REST API failures using OpenAPI specs and HTTP logs (HAR) - root cause analysis with cURL generation
Installation
Open Claude Code and run this command:
/plugin install conversational-api-debugger@claude-code-plugins-plus
Use --global to install for all projects, or --project for current project only.
What It Does
This plugin transforms API debugging from guesswork into systematic analysis:
- Load OpenAPI Specs - Parse API documentation (JSON/YAML)
- Ingest HTTP Logs - Import request/response data (HAR, JSON)
- Explain Failures - Analyze why API calls failed with root cause analysis
- Generate Repros - Create cURL/HTTPie/fetch commands to reproduce issues
Features
4 Powerful MCP Tools
1. load_openapi
Load and parse OpenAPI 3.x specifications.
{
"filePath": "/path/to/openapi.yaml",
"name": "my-api"
}
Returns:
- API title, version, description
- Base URL and servers
- Complete endpoint list
- Endpoint count and structure
2. ingest_logs
Import HTTP request/response logs for analysis.
{
"filePath": "/path/to/requests.har",
"format": "har"
}
Or provide logs directly:
{
"logs": [
{
"timestamp": "2025-10-10T12:00:00Z",
"method": "POST",
"url": "https://api.example.com/users",
"statusCode": 400,
"requestBody": { "name": "John" },
"responseBody": { "error": "Missing required field: email" }
}
]
}
Returns:
- Total requests ingested
- Success/failure breakdown
- Status code distribution
- Method distribution
- Top errors (first 10)
3. explain_failure
Analyze why an API call failed.
{
"logIndex": 0,
"specName": "my-api"
}
Returns:
- Severity: critical | high | medium | low
- Possible Causes: List of likely root causes
- Suggested Fixes: Actionable remediation steps
- Matching Endpoint: Comparison with OpenAPI spec
- Details: Request/response for inspection
4. make_repro
Generate cURL command to reproduce API call.
{
"logIndex": 0,
"includeHeaders": true,
"pretty": true
}
Returns:
- cURL Command: Ready to copy-paste
- HTTPie Alternative: Shorter syntax
- JavaScript fetch: For automated tests
- Metadata: Method, URL, headers count
How It Works
Under the Hood
- OpenAPI Parsing: Uses
openapi-typesandyamlto parse specs - HAR Processing: Extracts requests/responses from browser exports
- Pattern Matching: Matches URLs to OpenAPI endpoints with regex
- Failure Analysis: Compares actual vs expected behavior
- Command Generation: Creates executable test commands
In-Memory Storage
The plugin maintains:
- API Specs: Map of loaded OpenAPI documents
- HTTP Logs: Array of ingested requests/responses
- Log Indexing: Fast lookup by index for analysis
Data persists during the session but clears on restart (no disk storage).
Use Cases
- Debugging Production Issues - Analyze production API failures quickly
- API Integration - Understand third-party API errors
- Documentation - Generate examples for API docs
- Testing - Create reproducible test cases
- Bug Reports - Include working repro commands
- Onboarding - Help new developers understand APIs
FAQ
A: Ensure it's valid OpenAPI 3.x (check openapi: "3.0.0" field)
Q: HAR file won't parse
A: Verify it's exported with "content" option enabled
Q: Can't find matching endpoint
A: Check URL path matches OpenAPI spec (including base path)
Q: Generated cURL doesn't work
A: Verify all required headers are in original request