Installing and configuring openapi-mcp-server is divided into the following steps:
- environmental preparation: Make sure Node.js and pnpm are installed (recommended). You can use the node -v and pnpm -v commands to check if they are installed.
- Get Code: Cloning GitHub repositories:
git clone https://github.com/janwilmake/openapi-mcp-server.git
cd openapi-mcp-server - Installation of dependencies: Run pnpm install
- Build the project: Run pnpm build
- Configuring Claude Desktop: Edit the configuration file (Windows at %AppData%Claude, Mac at ~/Library/Application Support/Claude) to add the MCP server configuration:
{
"mcpServers": {
"petstore-api": {
"command": "npx".
"args": ["openapi-mcp-server", "/path/to/openapi.json"]
}
}
} - priming: Start Claude Desktop after the configuration is complete and you're ready to go!
Note: The path needs to be replaced with the actual OpenAPI file location, the project comes with examples/petstore-openapi.json example file can be used for testing.
This answer comes from the articleopenapi-mcp-server: letting AI directly invoke MCP services with open APIsThe