Developer tools / MCP server

Turn endpoint definitions into an API documentation toolchain.

mcp-api-doc-generator gives an agent five focused tools for producing OpenAPI 3.1 specs, Markdown endpoint documentation, a TypeScript client SDK, validation reports, and Jest or Vitest test source.

5 shipped tools 3 calls free Node.js 18+ MIT
terminal
$ npx -y mcp-api-doc-generator
API Doc Generator MCP server running on stdio

What it does

Five tools, each with a defined output

generate_openapi

Builds an OpenAPI 3.1 specification in YAML or JSON from endpoint definitions, including paths, parameters, reusable schemas, server URLs, tags, error responses, and supported authentication schemes.

document_endpoint

Produces Markdown for one endpoint with parameter and schema tables, request and response examples, standard error documentation, and cURL, JavaScript fetch, and Python requests examples.

generate_sdk Pro

Generates TypeScript interfaces and an API client with endpoint methods, timeout handling, ApiError, retry support, and Bearer, API Key, and Basic authentication wrappers.

validate_api

Checks supplied OpenAPI JSON or basic YAML and returns errors, warnings, and suggestions with rule names, document paths, and concrete fixes.

generate_tests Pro

Generates Jest or Vitest source covering successful responses, required fields, edge values, authentication, wrong methods, response shape, and mock data helpers.

Agent use cases

Three concrete workflows

The agent supplies explicit endpoint definitions or spec text. The server returns generated text to the MCP client.

01

Draft an OpenAPI contract

After defining a new endpoint, ask the agent to produce a versioned OpenAPI 3.1 YAML document with reusable request and response schemas.

Shipped tool: generate_openapi

MCP tool input
{
  "tool": "generate_openapi",
  "arguments": {
    "endpoints": [
      {
        "method": "POST",
        "path": "/widgets",
        "name": "createWidget",
        "description": "Create a widget",
        "request_body": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Widget name"
            }
          },
          "required": ["name"]
        },
        "response": {
          "status": 201,
          "type": "object",
          "properties": {
            "id": { "type": "string" },
            "name": { "type": "string" }
          }
        },
        "auth_type": "bearer",
        "tags": ["widgets"]
      }
    ],
    "info": {
      "title": "Widgets API",
      "version": "1.0.0",
      "description": "API for widgets",
      "base_url": "https://api.example.com"
    },
    "format": "yaml"
  }
}
02 / Pro

Generate a typed client

Give the agent endpoint shapes and a base URL, then receive TypeScript source with typed path parameters, response models, a client method, and authentication support.

Shipped tool: generate_sdk

MCP tool input
{
  "tool": "generate_sdk",
  "arguments": {
    "endpoints": [
      {
        "method": "GET",
        "path": "/widgets/{id}",
        "name": "getWidget",
        "description": "Get a widget by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "type": "string",
            "required": true,
            "description": "Widget ID"
          }
        ],
        "response": {
          "status": 200,
          "type": "object",
          "properties": {
            "id": { "type": "string" },
            "name": { "type": "string" }
          }
        },
        "auth_type": "api_key"
      }
    ],
    "base_url": "https://api.example.com"
  }
}
03

Review a spec before release

Pass OpenAPI text to the agent and get a categorized report. Errors determine the validity result; warnings and suggestions identify documentation and consistency gaps.

Shipped tool: validate_api

MCP tool input
{
  "tool": "validate_api",
  "arguments": {
    "spec": "{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Widgets API\",\"version\":\"1.0.0\"},\"paths\":{}}"
  }
}

Install & connect

Run directly from npm

Open your client's config file

  • Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json

    Windows: %APPDATA%\Claude\claude_desktop_config.json. In the app: Settings → Developer → Edit Config.

  • Cursor ~/.cursor/mcp.json

    Or .cursor/mcp.json inside a single project.

  • Windsurf ~/.codeium/windsurf/mcp_config.json

    Cascade panel → MCP icon → edit the raw config.

Paste this entry

All three clients accept the same object. If the file already has an mcpServers block, add just the "api-doc-generator" entry inside it.

mcpServers entry
{
  "mcpServers": {
    "api-doc-generator": {
      "command": "npx",
      "args": ["-y", "mcp-api-doc-generator"]
    }
  }
}

No env block is needed to start: the first 3 tool calls total across this server's tools run without a license.

Using Claude Code instead? One command, no file

shell
$ claude mcp add --transport stdio api-doc-generator -- npx -y mcp-api-doc-generator

Check it registered with claude mcp list. Add a key later with --env LICENSE_KEY=your-key placed before --transport.

Restart the client, then confirm it loaded

  • Claude Desktop: quit and reopen the app, then look for API Doc Generator in the tools/plugin menu.
  • Cursor: Settings → Customize → MCP; the server should list its tools.
  • Windsurf: reload Cascade; the server appears under the MCP panel.
  • Claude Code: run claude mcp list and look for ✔ Connected.

Running npx -y mcp-api-doc-generator in a terminal looks frozen — that is correct. It is a stdio server: it waits silently for an MCP client on stdin and never returns a prompt. Press Ctrl+C to exit. Use the config above rather than the bare command; your client starts the process for you.

Add your license key when you buy

A key arrives on screen right after checkout. Add it as an environment variable in the same entry:

mcpServers entry with license
{
  "mcpServers": {
    "api-doc-generator": {
      "command": "npx",
      "args": ["-y", "mcp-api-doc-generator"],
      "env": {
        "LICENSE_KEY": "paste-your-key-here"
      }
    }
  }
}

Keys are verified offline against a public key compiled into the package — no account, no network check, no usage reporting. Lost the key? Recover it here. More detail on the FAQ.

Free behavior & plans

Try three calls before a license is required

Without a license key, the package allows 3 calls total, shared across all tools—not three per tool, and not three per day. It is a one-off trial with no credit card. It normally records the usage count in ~/.aivp-mcp/usage.json, so restarting the process does not reset the trial. If that file cannot be used, counting falls back to memory for the process.

A purchased key removes the trial counter and unlocks unlimited, ungated calls to the tools in your plan. It is verified fully offline against a public key compiled into the package—no account, no network check, no usage reporting—and stays valid for 365 days.

Basic · $10/month

Documentation essentials

Unlimited, licensed access to generate_openapi, document_endpoint, and validate_api. The Pro-only tools generate_sdk and generate_tests are not included in Basic.

Pro · $20/month

All five tools

Adds unlimited use of the Pro-only tools generate_sdk and generate_tests to every Basic tool.

See API Doc Generator pricing

Scope

What this server does not do

No route discovery

It does not inspect a repository or parse Express, FastAPI, Hono, or other framework source. Generation starts from endpoint definitions supplied in the tool call.

No API execution or publishing

It does not call a target API, host documentation, publish a specification, or run the SDK and test source it generates.

Defined output formats only

OpenAPI output is YAML or JSON. Endpoint documentation is Markdown, the SDK is TypeScript, and test output is Jest or Vitest TypeScript source.

No generated-file storage

Tool handlers return text through MCP; they do not write endpoint definitions, supplied specs, or generated material to project files. Local storage is limited to free-trial usage accounting.

Start with explicit inputs

Give your agent the endpoint shape. Get documentation-ready text back.