- Home
- MCP servers
- Swagger
Swagger
- typescript
3
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"kyle-pena-nlp-swagger-mcp": {
"command": "swagger-mcp",
"args": [
"--spec",
"http://localhost:9000/openapi.json",
"--name",
"Product-MCP",
"--server-url",
"http://localhost:9000"
],
"env": {
"REAL_LOGGER": "true"
}
}
}
}You can automatically turn a Swagger/OpenAPI specification into an MCP server that exposes your API as a set of AI-friendly tools. This lets Windsurf, Cursor, and other clients discover and interact with your API endpoints in a safe, tool-oriented way.
How to use
To use the MCP server, connect it to your MCP client ( Windsurf or Cursor) and load the server configuration. You’ll reference the Swagger/OpenAPI specification, set a name for the MCP server, and define the base API URL. Once configured, your API can be explored and manipulated through a consistent set of tools such as listing, creating, updating, and deleting resources.
How to install
Prerequisites and initial setup: you need Python and a way to install Python packages. The recommended approach uses pipx to install the MCP generator from PyPI. You’ll also verify the installation and then run a sample server to validate the setup.
Additional options
You can tailor which endpoints are exposed and how you connect to the API by using extra options when you create the MCP server. Options include filtering endpoints by path patterns, supplying authentication tokens, adding custom headers, and forcing constant values for certain parameters. You can also point to a local OpenAPI spec file, a YAML/JSON file, or a remote URL.
Examples and known configurations
{
"mcpServers": {
"product-mcp": {
"command": "swagger-mcp",
"args": [
"--spec",
"http://localhost:9000/openapi.json",
"--name",
"Product-MCP",
"--server-url",
"http://localhost:9000"
]
}
}
}
Notes on Cursor and Windsurf integration
Cursor integration is in beta and may be unstable. Windsurf provides the smoother experience for most users. When adding a custom MCP server in Cursor, you may need to use the full path to the executable and include the --cursor flag to enable Cursor compatibility.
Security and troubleshooting
If you encounter issues spinning up a server, try a dry run with verbose logging to capture detailed output that you can share when seeking help. Ensure the sample server is running before attempting to connect through Windsurf or Cursor.
Available tools
Inspector
MCP Inspector lets you explore the MCP Server interactively. It helps you discover available tools and test commands within the running server.