conversational-api-debugger

Featured mcp v1.0.0 by Jeremy Longshore

Debug REST API failures using OpenAPI specs and HTTP logs (HAR) - root cause analysis with cURL generation

4 MCP Tools
MIT License
Free Pricing

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:

  1. Load OpenAPI Specs - Parse API documentation (JSON/YAML)
  2. Ingest HTTP Logs - Import request/response data (HAR, JSON)
  3. Explain Failures - Analyze why API calls failed with root cause analysis
  4. 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

  1. OpenAPI Parsing: Uses openapi-types and yaml to parse specs
  2. HAR Processing: Extracts requests/responses from browser exports
  3. Pattern Matching: Matches URLs to OpenAPI endpoints with regex
  4. Failure Analysis: Compares actual vs expected behavior
  5. 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

  1. Debugging Production Issues - Analyze production API failures quickly
  2. API Integration - Understand third-party API errors
  3. Documentation - Generate examples for API docs
  4. Testing - Create reproducible test cases
  5. Bug Reports - Include working repro commands
  6. Onboarding - Help new developers understand APIs

FAQ

Ready to use conversational-api-debugger?