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

@mnikks01/mcpforge

v0.1.2

Published

MCPForge generation engine + CLI (Phase A) — OpenAPI spec -> production-ready MCP server. Runs on Node 24 native TypeScript; zero runtime dependencies.

Readme

MCPForge — generation engine (Phase A) ✅

Install & CLI

turn an OpenAPI spec OR your codebase into a production-ready MCP server. Requires Node ≥18.

npm i -g @mnikks01/mcpforge    # then run `mcpforge …`, or use npx without installing:
npx @mnikks01/mcpforge scan ./my-app                 # codebase -> MCP server
npx @mnikks01/mcpforge scan . --base-url https://api.myapp.com --llm
npx @mnikks01/mcpforge ./openapi.json               # OpenAPI spec -> MCP server
npx @mnikks01/mcpforge https://petstore3.swagger.io/api/v3/openapi.json -o ./out

The core of the MCP Server Generator: OpenAPI spec → production-ready MCP server. This is the implementation of BUILD_ORDER.md Phase A (the engine), built before any UI. Pure TypeScript, runs on Node 24 native TS, zero runtime dependencies.

Status: Phase A gate PASSED + hardened

Proven end-to-end on 2026-06-20 across 3 crafted specs (apiKey / bearer / no-auth) and the live Swagger Petstore spec (19 tools, full $refs):

  • ✅ Parses OpenAPI 3 (incl. local $ref resolution, security schemes) → IR.
  • ✅ Maps operations → tools (correct names, methods, path/query/body params, side-effect flags).
  • ✅ Generates LLM-style tool descriptions (what / when / when-not / returns) — works with zero network via the spec-derived fallback; upgrades to Claude when --llm (+ ANTHROPIC_API_KEY).
  • ✅ Emits a complete runnable project (src/index.ts, package.json, tsconfig.json, README.md, mcp.json, .env.example, .gitignore).
  • ✅ Generated servers typecheck against the real @modelcontextprotocol/sdk + zod (tsc --noEmit) — including the 19-tool real-world server.
  • ✅ Generated servers boot and speak MCP — complete initialize and advertise tools over stdio JSON-RPC (scripts/smoke-mcp.ts).
  • ✅ Auth branches verified: apiKey→header, bearer→Authorization, none→no token. No secrets in generated code (auth from env).
  • CLI shipped (mcpforge <spec|url>) — the first user-facing surface + OSS funnel asset.

Run it

# CLI — generate from a file or a URL
node src/cli.ts examples/petstore.json -o ./pet-mcp
node src/cli.ts https://petstore3.swagger.io/api/v3/openapi.json -o ./petstore
node src/cli.ts <spec> --stdout        # print src/index.ts
node src/cli.ts <spec> --llm           # premium descriptions (needs ANTHROPIC_API_KEY)

# demo (writes to ./generated/<name>/)
node scripts/demo.ts [spec.json]

# tests — generate + validate across all example specs
node scripts/test-specs.ts

# prove a generated server actually runs over MCP
cd generated/pet-store && npm install && npx tsc && cd ../..
node scripts/smoke-mcp.ts generated/pet-store/dist/index.js

Structure (maps to the eventual Next.js lib/)

src/
  ir/types.ts            # the IR (keystone abstraction)
  openapi/parse.ts       # OpenAPI 3 -> IR (focused; swap to swagger-parser for full coverage)
  generator/
    descriptions.ts      # tool descriptions (spec-derived fallback + optional Claude)
    server-template.ts   # IR -> src/index.ts (the core codegen)
    project-files.ts     # package.json/tsconfig/README/mcp.json/.env/.gitignore
    build.ts             # orchestrator: IR -> file map
  output/write.ts        # file map -> disk (web layer will zip instead)
examples/
  petstore.json          # sample spec (path/query/body params, apiKey, $ref)
  hand-written-server.ts # BUILD_ORDER item 2: the learn-the-SDK reference
scripts/
  demo.ts                # Phase A end-to-end pipeline
  smoke-mcp.ts           # drives a generated server over MCP stdio

What's next (per BUILD_ORDER.md)

  • Finish Phase A hardening: test against 2–3 more real specs (bearer auth, no-auth, larger specs); swap the focused parser for @apidevtools/swagger-parser for full OpenAPI/YAML coverage.
  • Phase B: wrap this engine in the Next.js app (/api/parse, /api/generate SSE, preview, ZIP download), deploy to Vercel, launch the free generator → first users.
  • Then: monetization (auth/Stripe/Pro) or done-for-you for first ₹10,000.

Single source of truth

mcpforge/src is the canonical engine. The web app uses a generated copy at web/lib/engine/ (imports stripped of .ts extensions for the bundler). After any change to src/, run:

npm run sync-engine          # regenerate web/lib/engine
npm run sync-engine:check    # CI guard: exit 1 if the copy drifted

Edit src/ only — web/lib/engine/ files are marked // GENERATED — DO NOT EDIT.

Production notes vs. this Phase-A engine: real build uses @apidevtools/swagger-parser (full deref + OpenAPI 2.0 + YAML), pins the SDK version, and pipes descriptions through Claude by default for Pro. The IR contract stays identical, so nothing downstream changes.