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

@postmcp/cli

v0.1.37

Published

The Postman for MCP. Turn any OpenAPI spec into a context-optimized MCP server in seconds.

Readme

@postmcp/cli

The "Postman for MCP" - Turn any OpenAPI or Swagger specification into a context-optimized, safe, type-safe Model Context Protocol (MCP) server in seconds.

License: MIT MCP Compliant npm package


Overview

@postmcp/cli is the command-line interface for the PostMCP ecosystem. It allows AI coding assistants (Cursor, Claude Desktop, Antigravity, Windsurf) to connect directly to any REST API with zero code and intelligent token optimization.

Key Features

  • Zero-Code Runtime: Mount any OpenAPI 3.0, 3.1, or Swagger 2.0 specification over stdio or Streamable HTTP.
  • Token Diet Engine: Reduce prompt context payload size by 70% to 95% using response pruning and compact Markdown table serialization.
  • JIT Dynamic Routing: Replace massive static tool catalogs with an on-demand tool_search meta-tool, keeping active prompt context under 1,500 tokens.
  • Safety Circuit Breaker: Intercept destructive actions (DELETE, POST /charge) in --dry-run mode before modifying remote state.
  • Visual Web Studio: Launch an interactive dark-mode workbench (postmcp studio) to curate endpoints, build macros, and test prompts in a live sandbox.
  • 1-Click Exporter: Generate ready-to-use client configurations for Cursor (.cursor/mcp.json), Claude Desktop, and Windsurf.
  • Standalone Code Generator: Scaffold production-ready TypeScript or Python FastMCP servers.

Installation

Run Directly via npx (Zero Install)

npx @postmcp/cli <command> [options]

Or Install Globally

npm install -g @postmcp/cli

# Now accessible as `postmcp`
postmcp --help

Commands

postmcp run <spec>

Start an MCP server from an OpenAPI URL, local file, or preset.

# Run any public OpenAPI spec with Token Diet and JIT tool search
postmcp run https://api.stripe.com/openapi.json \
  --header "Authorization: Bearer $STRIPE_SECRET_KEY" \
  --token-diet \
  --jit

# Run from a local OpenAPI file
postmcp run ./openapi.yaml --token-diet

# Run from a curated preset
postmcp run @github --bearer $GITHUB_TOKEN

| Option | Description | | :--- | :--- | | -t, --transport <type> | Transport type: stdio (default) or http | | -p, --port <number> | Port for HTTP transport (default: 3000) | | -H, --header <k:v...> | Custom headers to forward to the target API | | --bearer <token> | Bearer token for API authentication | | --api-key <key> | API key for authentication | | --token-diet | Enable Token Diet response optimization | | --jit | Enable Just-In-Time dynamic tool routing | | --dry-run | Intercept and simulate destructive mutations | | --config <path> | Path to postmcp.config.json |


postmcp studio [spec]

Launch the visual web studio on http://localhost:3000.

postmcp studio
postmcp studio ./openapi.json

| Option | Description | | :--- | :--- | | -p, --port <number> | Port for the studio server (default: 3000) | | --no-open | Start server without opening browser |


postmcp inspect <spec>

Inspect an OpenAPI spec to analyze endpoints, risk tiers, and token counts.

postmcp inspect https://api.linear.app/openapi.json

| Option | Description | | :--- | :--- | | --json | Output machine-readable AST JSON |


postmcp generate <spec>

Generate a standalone TypeScript or Python FastMCP server repository.

# Generate standalone TypeScript server
postmcp generate ./stripe.json --lang ts -o ./my-stripe-mcp

# Generate standalone Python FastMCP server
postmcp generate ./stripe.json --lang py -o ./my-stripe-mcp-py

| Option | Description | | :--- | :--- | | -t, --target <lang> | Target language: ts or py (default: ts) | | -l, --lang <lang> | Alias for --target | | -o, --out <dir> | Output directory |


postmcp export <spec>

Generate client configuration snippets for Cursor, Claude Desktop, and Windsurf.

# Export and automatically write to .cursor/mcp.json
postmcp export @stripe --client cursor --write

| Option | Description | | :--- | :--- | | -t, --target <client> | Target client: cursor, claude, windsurf, or all | | --client <client> | Alias for --target | | -w, --write | Merge and write directly to configuration file on disk | | --bearer <token> | Bearer token for client environment |


postmcp presets

Browse and sync the built-in catalog of 60+ pre-curated API presets.

postmcp presets
postmcp presets finance
postmcp presets sync

1-Click Cursor Setup (.cursor/mcp.json)

{
  "mcpServers": {
    "linear": {
      "command": "npx",
      "args": ["-y", "@postmcp/cli", "run", "https://api.linear.app/openapi.json", "--token-diet", "--jit"],
      "env": {
        "LINEAR_API_KEY": "${env:LINEAR_API_KEY}"
      }
    }
  }
}

Related Packages


License

MIT (c) PostMCP Contributors