A generic Model Context Protocol (MCP) server that dynamically converts OpenAPI specifications into MCP tools, enabling Claude Desktop and other AI systems to interact with any REST API.
# Connect any OpenAPI to Claude Desktop
npx @lucid-spark/openapi-mcp-server openapi-mcp-server \
--api-base-url https://api.example.com \
--openapi-spec https://api.example.com/openapi.json \
--headers "Authorization:Bearer token123"
# ✨ 47 tools generated from OpenAPI spec
# 🔗 Server ready for Claude Desktop connection
Everything you need to connect APIs to AI systems
Automatically converts OpenAPI operations to MCP tools with intelligent naming and parameter mapping
Support for static headers, dynamic providers, token refresh, and complex authentication patterns
Filter tools by tags, resources, operations, or explicit lists to expose only what you need
Stdio for Claude Desktop integration, HTTP for web applications with streaming support
Intelligent abbreviation system with ≤64 character limit and readable formats
Built-in API exploration and dynamic endpoint invocation capabilities
Type-safe, modular design with comprehensive TypeScript interfaces
Load OpenAPI specs from URL, file, stdin, or inline content
Get up and running in minutes
Add to your Claude Desktop configuration file:
{
"mcpServers": {
"openapi": {
"command": "npx",
"args": ["-y", "@lucid-spark/openapi-mcp-server", "openapi-mcp-server"],
"env": {
"API_BASE_URL": "https://api.example.com",
"OPENAPI_SPEC_PATH": "https://api.example.com/openapi.json",
"API_HEADERS": "Authorization:Bearer token123"
}
}
}
}
Your API endpoints will appear as available tools in Claude conversations.
npm install -g @lucid-spark/openapi-mcp-server
npx @lucid-spark/openapi-mcp-server openapi-mcp-server \
--api-base-url https://api.example.com \
--openapi-spec https://api.example.com/openapi.json \
--headers "Authorization:Bearer token123" \
--transport stdio
npm install @lucid-spark/openapi-mcp-server
import { OpenAPIServer } from "@lucid-spark/openapi-mcp-server";
const server = new OpenAPIServer({
apiBaseUrl: "https://api.example.com",
openApiSpec: "https://api.example.com/openapi.json",
headers: {
Authorization: "Bearer token123"
},
transportType: "stdio"
});
await server.start();
Modular, type-safe design for maximum flexibility
Orchestration & MCP Protocol
Validation & Defaults
Interface-based Safety
Multiple Inputs & $ref Resolution
Creation, Filtering & Caching
Static & Dynamic Providers
ID Generation & Name Abbreviation
HTTP Requests & Auth Integration
Stdio (Claude) & HTTP (Web)
Real-world scenarios and patterns
openapi-mcp-server \
--api-base-url https://jsonplaceholder.typicode.com \
--openapi-spec https://jsonplaceholder.typicode.com/openapi.json
openapi-mcp-server \
--api-base-url https://api.github.com \
--openapi-spec https://api.github.com/openapi.json \
--headers "Authorization:Bearer ghp_xxxx"
openapi-mcp-server \
--api-base-url https://api.example.com \
--openapi-spec ./api-spec.yaml \
--tag public --operation GET
openapi-mcp-server \
--api-base-url https://api.example.com \
--openapi-spec ./api-spec.yaml \
--transport http --port 3000
Comprehensive guides and references
Prerequisites, global installation, local setup, and development environment
Complete configuration options, environment variables, and CLI arguments
Static headers, dynamic providers, token refresh, and complex auth patterns
Tool generation, filtering, naming conventions, and meta-tools
Stdio for Claude Desktop, HTTP for web apps, and session management
Component design, data flow, interface patterns, and extensibility
TypeScript interfaces, method signatures, and library usage
Real-world usage examples, integration patterns, and best practices
Common issues, debug mode, error handling, and solutions
Get help and contribute to the project