Allow AI to wade through complex OpenAPIs using Simple Language
This is a Model Context Protocol (MCP) server that reads an OpenAPI specification file and exposes each API operation as a tool for Claude AI to use.
# Clone the repository
git clone https://github.com/yourusername/openapi-mcp-server.git
cd openapi-mcp-server
# Install dependencies
npm install
Place your OpenAPI YAML file in the project directory or provide a path to it via environment variables.
Set up environment variables (optional):
# Create a .env file
echo "DEBUG=true" > .env
echo "OPENAPI_FILE=./path/to/your/openapi.yaml" >> .env
npm run init
npm start
You can configure the server using environment variables:
DEBUG
: Set to true
to enable debug logging (default: false
)OPENAPI_FILE
: Path to your OpenAPI YAML file (default: ./openapi.yaml
)The server reads your OpenAPI specification file and:
With an OpenAPI spec like:
paths:
/users:
get:
operationId: listUsers
summary: List all users
...
Claude can call the listUsers
tool, and the server will make a GET request to /users
on your behalf.
MIT