Universal OpenAPI ➜ MCP relay server with enterprise authentication.
Relay converts any OpenAPI/Swagger specification into AI-callable MCP tools. It acts as a bridge between AI assistants and REST APIs, automatically generating tools from API documentation and executing real HTTP requests.
Main Function: Transform any REST API into MCP tools that AI assistants can use directly.
npm install relay-mcp
npm install
npm run build
.env
file):SWAGGER_SOURCE=url
SWAGGER_URL=https://petstore.swagger.io/v2/swagger.json
AUTH_TYPE=none
npm start
{
"mcpServers": {
"relay": {
"command": "node",
"args": ["/path/to/relay/dist/index.js"],
"env": {
"SWAGGER_SOURCE": "url",
"SWAGGER_URL": "https://petstore.swagger.io/v2/swagger.json",
"AUTH_TYPE": "none",
"TRANSPORT": "stdio"
}
}
}
}
Or run as a standalone server with SSE/HTTP:
# For SSE transport
TRANSPORT=sse TRANSPORT_PORT=3000 npm start
# For HTTP transport
TRANSPORT=http TRANSPORT_PORT=3000 npm start
Then configure your MCP client to connect to http://localhost:3000/mcp
.
MIT