Overview
what is OpenAPI x MCP?
OpenAPI x MCP is a command-line interface (CLI) tool designed to generate a type-safe Model Context Protocol (MCP) server from an OpenAPI specification.
how to use OpenAPI x MCP?
To use OpenAPI x MCP, install it via npm and run the command pnpm generate <ABSOLUTE_PATH_TO_SPEC_YAML_OR_JSON> to generate the server code. You can then build and start the server locally.
key features of OpenAPI x MCP?
- Generates MCP server code from OpenAPI specifications
- Supports local server execution
- Uses dotenv for environment variable management
- Type-safe implementation with TypeScript
use cases of OpenAPI x MCP?
- Quickly setting up a server for API development.
- Ensuring type safety in server implementations.
- Facilitating the development of applications that rely on OpenAPI specifications.
FAQ from OpenAPI x MCP?
- Is OpenAPI x MCP stable for production use?
No, this project is experimental and APIs may change significantly between versions.
- How do I run the server locally?
After generating the server code, run
pnpm build:serverfollowed bypnpm startto start the server athttp://localhost:3001.
- Where can I find the project repository?
The project is hosted on GitHub at https://github.com/usemodel-dev/cli.