npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-api-doc-generator

v1.1.4

Published

MCP server for generating API documentation — OpenAPI 3.1 specs, endpoint docs, TypeScript SDKs, validation, and test suites

Downloads

139

Readme

API Doc Generator MCP Server

Dev tools MCP server for generating API documentation. Produces OpenAPI 3.1 specs, endpoint docs with code examples, TypeScript SDKs, API validation reports, and test suites -- all from simple endpoint definitions.

Pricing

| Plan | Price | Includes | |------|-------|----------| | Basic | $10/mo | generate_openapi, document_endpoint, validate_api — Buy → | | Pro | $20/mo | All tools: generate_openapi, document_endpoint, generate_sdk, validate_api, generate_tests — Buy → |

Free trial: 3 calls total (shared across all tools), no credit card. License keys are emailed instantly after checkout. More info: aivp-mcp.vercel.app

Tools

generate_openapi

Generate an OpenAPI 3.1 specification from endpoint definitions. Outputs YAML or JSON with:

  • Paths, parameters, and operations
  • $ref schemas in components/schemas for reusable models
  • Security schemes (Bearer JWT, API Key, Basic)
  • Server URLs, tags, and grouping

document_endpoint

Generate detailed Markdown documentation for a single endpoint:

  • Parameter tables with types and descriptions
  • Request/response examples with realistic data
  • Error response documentation (400, 401, 403, 404, 500)
  • cURL command example
  • JavaScript (fetch) code example
  • Python (requests) code example

generate_sdk

Generate a TypeScript SDK client from endpoint definitions:

  • Typed interfaces for all request/response models
  • Client class with a method per endpoint
  • ApiError class with status helpers (isNotFound(), isUnauthorized(), etc.)
  • withRetry() helper for exponential backoff on 5xx/429
  • Authentication wrappers: BearerAuth, ApiKeyAuth, BasicAuth
  • Timeout and abort signal support

validate_api

Validate an OpenAPI spec (YAML or JSON):

  • Schema correctness (required fields, valid methods)
  • Missing descriptions and documentation
  • Inconsistent naming conventions (kebab-case vs snake_case vs camelCase)
  • Missing error responses
  • Security scheme completeness
  • Returns issues categorized as errors/warnings/suggestions with specific fix suggestions

generate_tests

Generate test suites from endpoint definitions:

  • Happy path tests
  • Validation tests (missing required fields)
  • Edge case tests (empty strings, null values, extra fields)
  • Authentication tests (401 without auth)
  • HTTP method tests (wrong method rejection)
  • Response structure checks
  • Mock data generator functions
  • Output as Jest or Vitest test files

Installation

Note: the npm package is mcp-api-doc-generator (not the bare name api-doc-generator).

No install step needed — run straight from npm:

npx -y mcp-api-doc-generator

Or install globally:

npm install -g mcp-api-doc-generator

Free trial: 3 calls total (shared across all tools), no credit card. Buy a license at the links in Pricing — your key is emailed instantly. Activate it with the LICENSE_KEY environment variable.

Usage

Stdio (default)

npx -y mcp-api-doc-generator

SSE

npx -y mcp-api-doc-generator --sse
# Listens on http://127.0.0.1:3000 by default
# Set PORT env var to change

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "api-doc-generator": {
      "command": "npx",
      "args": ["-y", "mcp-api-doc-generator"],
      "env": { "LICENSE_KEY": "<your license key — omit for free trial>" }
    }
  }
}

Examples

Generate OpenAPI spec

{
  "tool": "generate_openapi",
  "arguments": {
    "endpoints": [
      {
        "method": "GET",
        "path": "/users",
        "description": "List all users",
        "parameters": [
          { "name": "page", "in": "query", "type": "integer", "description": "Page number" },
          { "name": "limit", "in": "query", "type": "integer", "description": "Items per page" }
        ],
        "response": {
          "status": 200,
          "type": "object",
          "properties": {
            "users": { "type": "array", "description": "List of users" },
            "total": { "type": "integer", "description": "Total count" }
          }
        }
      },
      {
        "method": "POST",
        "path": "/users",
        "description": "Create a new user",
        "request_body": {
          "type": "object",
          "properties": {
            "name": { "type": "string", "description": "User name" },
            "email": { "type": "string", "description": "User email" }
          },
          "required": ["name", "email"]
        },
        "response": {
          "status": 201,
          "type": "object",
          "properties": {
            "id": { "type": "string", "description": "User ID" },
            "name": { "type": "string", "description": "User name" },
            "email": { "type": "string", "description": "User email" }
          }
        },
        "auth_type": "bearer"
      }
    ],
    "info": {
      "title": "User Service API",
      "version": "1.0.0",
      "description": "API for managing users"
    }
  }
}

Generate TypeScript SDK

{
  "tool": "generate_sdk",
  "arguments": {
    "endpoints": [
      {
        "method": "GET",
        "path": "/users/{id}",
        "name": "getUser",
        "description": "Get a user by ID",
        "parameters": [
          { "name": "id", "in": "path", "type": "string", "required": true, "description": "User ID" }
        ],
        "response": {
          "status": 200,
          "type": "object",
          "properties": {
            "id": { "type": "string" },
            "name": { "type": "string" },
            "email": { "type": "string" }
          }
        },
        "auth_type": "bearer"
      }
    ],
    "base_url": "https://api.myapp.com"
  }
}

Validate an OpenAPI spec

{
  "tool": "validate_api",
  "arguments": {
    "spec": "{ \"openapi\": \"3.1.0\", \"info\": { \"title\": \"My API\", \"version\": \"1.0.0\" }, \"paths\": { \"/users/{id}\": { \"get\": { \"summary\": \"Get user\", \"responses\": { \"200\": { \"description\": \"OK\" } } } } } }"
  }
}

Development

npm run dev  # Watch mode

License

MIT