New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

relay-mcp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

relay-mcp

Universal OpenAPI to MCP relay server with enterprise authentication

latest
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Relay

Universal OpenAPI ➜ MCP relay server with enterprise authentication.

npm version npm downloads

What is Relay?

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.

Installation

npm install relay-mcp

Basic Usage

  • Install and build:
npm install
npm run build
  • Configure (create .env file):
SWAGGER_SOURCE=url
SWAGGER_URL=https://petstore.swagger.io/v2/swagger.json
AUTH_TYPE=none
  • Run the server:
npm start
  • Add to MCP client (e.g., Claude Desktop for stdio):
{
  "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.

Features

  • Dynamic tool generation from any OpenAPI/Swagger spec
  • Real HTTP execution with interceptors and structured logging
  • Auth: API Key (header/query), Bearer, Basic
  • OpenAPI 2.0 and 3.x support
  • Multiple transport modes: stdio, SSE (Server-Sent Events), HTTP

Documentation

License

MIT

Keywords

mcp

FAQs

Package last updated on 08 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts