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

@usemodel-dev/cli

v0.0.7-beta.1

Published

Generate a Type Safe mcp server from an OpenApi spec

Readme

OpenAPI x MCP

OpenAPI-MCP Architecture

Generate a type-safe MCP (Model Context Protocol) server from an OpenAPI specification.

Overview

This package allows you to generate and run a type-safe MCP server from your OpenAPI specification. It provides CLI tools for server generation, configuration management, and server execution.

If you would like to use an external configuration for a server with your MCP client, you can use the CLI to add it a single command.

Installation

npx -y -p @usemodel-dev/cli@latest

Usage

1. Generate Server Code

Generate the MCP server code from your OpenAPI specification:

npx -y -p @usemodel-dev/cli@latest cli generate <ABSOLUTE_PATH_TO_SPEC_YAML_OR_JSON>

This will create the mcp server files in the cwd() directory.

Run server with npx

npx -y -p @usemodel-dev/cli@latest server

2. Configure MCP Client Settings

Add or Update Configuration on your MCP Client (Cursor, Windsurf et al.)

npx -y -p @usemodel-dev/cli@latest cli config add <client> '<config_json>'

Where:

  • <client> can be one of: cursor, windsurf, or claude
  • <config_json> is a JSON string containing your configuration

Example:

# Add or update a server configuration for Cursor
npx -y -p @usemodel-dev/cli@latest cli config add cursor '{"@yourorg/mcp": {"url": "http://localhost:3000", "env": { "apiKey": "XXX" } } }'

Remove Configuration

npx -y -p @usemodel-dev/cli@latest cli config remove <client> <servername>

Example:

# Remove a server configuration from Cursor
npx -y -p @usemodel-dev/cli@latest cli config remove cursor @yourorg/mcp

Configuration Storage

Configurations are stored in the following locations based on the client:

  • Cursor: ~/.cursor/mcp.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json
  • Claude: ~/Library/Application Support/Claude/claude_desktop_config.json

All configurations are stored under the mcpServers key in the config file. When adding new configurations, they will be merged with existing ones, and when updating existing configurations, they will be overwritten.

Local development

  1. Build the server:
pnpm build

Note: You need to run the generate command before building.

  1. Start the server:
pnpm start

This will start the server at http://localhost:3001

Environment Variables

The server uses dotenv for configuration. Create a .env file in your project root with the necessary environment variables.

Dependencies

  • @modelcontextprotocol/sdk: For MCP implementation
  • express: For the server framework
  • openapi-typescript: For TypeScript type generation
  • zod: For runtime type validation

Contributing

This project is hosted on GitHub at https://github.com/@usemodel-dev/cli.git. Feel free to open issues or submit pull requests.

License

MIT

Package Information

Current version: 0.0.1