vite-plugin-swagger-mcp
v0.1.1
Published
vite plugin for swagger mcp
Readme
vite-plugin-swagger-mcp
A vite plugin to generate mcp server from swagger
Usage
$ pnpm add vite-plugin-swagger-mcp -D// vite.config.ts
import { defineConfig } from 'vite'
import swaggerMcp from 'vite-plugin-swagger-mcp'
export default defineConfig({
plugins: [
swaggerMcp({
swaggerUrl: 'http://ip:port/path/v2/api-docs',
token: 'xxxx',
}),
],
})npm run dev
# MCP server connectedThen the MCP server will be available at http://ip:port/_mcp/sse/swagger.
New MCP endpoint (recommended)
Newer MCP clients/editors expect the Streamable HTTP "single endpoint" style. Prefer:
http://ip:port/_mcp/swagger
/_mcp/sse/swagger is kept as a legacy alias for backward compatibility.
When using VSCode, Cursor, Windsurf, Claude Code, the module will automatically update the config files for you.
LICENSE
MIT
