MCP OpenAPI Discovery
Provides specialized support for Laravel projects utilizing L5 Swagger, allowing for the discovery and summarization of API endpoints within Laravel-based applications.
Enables the discovery, inspection, and execution of API endpoints from Swagger UI deployments and OpenAPI specifications, including support for tracing parameter usage and making authenticated requests.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP OpenAPI Discoverydetect the API spec at https://petstore.swagger.io and list all available endpoints"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@rekl0w/mcp-openapi-discovery
@rekl0w/mcp-openapi-discovery is a TypeScript MCP server that can:
detect OpenAPI / Swagger documents from a URL,
inspect and summarize endpoints,
trace field and identifier usage across the API,
and execute real HTTP requests against those endpoints with auth and payload support.
It is designed for documentation-first API workflows where you want an MCP client to move from "find the spec" to "understand the endpoint" to "call the endpoint".
Published package:
Why this project exists
Many APIs expose documentation pages, but not always the raw spec URL directly. This server helps bridge that gap by discovering the OpenAPI document behind a docs page and turning it into callable MCP tools.
It is especially useful for:
Swagger UI deployments
ReDoc documentation pages
Laravel + L5 Swagger projects
APIs exposing
openapi.json,swagger.json,openapi.yaml, orswagger.yamldocs pages that reference the spec indirectly through HTML or JS config
Features
Detect OpenAPI / Swagger specs from docs pages or direct spec URLs
Summarize API metadata, servers, tags, and endpoint counts
List endpoints with filtering by method, tag, or path fragment
Inspect request / response details for a specific endpoint
Trace where identifiers like
userId,accountId, orteamIdappear across parameters and schemasFind endpoints that are structurally related to another endpoint
Execute endpoints with:
path params
query params
custom headers
JSON payloads
form-urlencoded payloads
basic multipart form data
Apply authentication with:
Basic auth
Bearer tokens
API keys
OAuth 2.0 password flow
OAuth 2.0 client credentials flow
automatic auth selection based on the OpenAPI security scheme
Available MCP tools
Tool | Description |
| Detects the OpenAPI document behind a docs page or spec URL and returns a summary |
| Lists endpoints with optional filtering |
| Returns request / response details for a single endpoint |
| Traces where a parameter or field is used across parameters, request bodies, and response bodies |
| Finds endpoints related to a source endpoint through shared resources, identifiers, and path structure |
| Executes a real request against an endpoint discovered from the OpenAPI document |
Requirements
Node.js 18+
npm 9+ recommended
Installation
Install from npm:
npm i @rekl0w/mcp-openapi-discoveryOr install project dependencies when working from source:
npm install
npm run buildRunning locally
Run the stdio MCP server after building:
node dist/index.jsFor development:
npm run devConnecting from an MCP client
The easiest way to use the published package in MCP clients is to let the client auto-install and run it through npx.
Auto-install from npm with npx
If your MCP client supports a command + args stdio server definition, use:
{
"command": "npx",
"args": ["-y", "@rekl0w/mcp-openapi-discovery"]
}This is usually the cleanest setup for clients such as VS Code and Cursor-like MCP clients because the package is downloaded automatically when the server starts.
VS Code (.vscode/mcp.json)
VS Code supports mcp.json and can run local MCP servers through npx.
{
"servers": {
"openapi-discovery": {
"command": "npx",
"args": ["-y", "@rekl0w/mcp-openapi-discovery"]
}
}
}Cursor-style MCP config
For MCP clients that use a JSON config with mcpServers, a typical setup looks like this:
{
"mcpServers": {
"openapi-discovery": {
"command": "npx",
"args": ["-y", "@rekl0w/mcp-openapi-discovery"]
}
}
}Local build instead of npm
If you prefer to run the local build directly instead of using npm, point your MCP client at dist/index.js.
Claude Desktop example (Windows)
Add this to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"openapi-discovery": {
"command": "node",
"args": ["C:/absolute/path/to/project/dist/index.js"]
}
}
}Use an absolute path. On Windows, either forward slashes or escaped backslashes work.
Example use cases
Detect the spec behind
https://example.com/docsList endpoints from
https://api.example.com/openapi.jsonInspect the
PUT /users/{id}endpointFilter only
POSTendpoints tagged withusersTrace where
userIdappears across the APIFind endpoints related to
GET /users/{id}Send a real
POST /ordersrequest with a JSON payloadLog in with username/password, obtain a token, and call a protected endpoint
Structured tracing
Beyond plain endpoint listing, this server can help answer questions like:
“Where is
userIdused?”“Which endpoints are related to
GET /users/{id}?”“Is this identifier coming from a response body, a query parameter, or a path parameter?”
This is intentionally more structured than pure semantic search. Instead of only doing natural-language similarity, the server can inspect:
path parameters
query parameters
request body fields
response body fields
shared resource names in paths
shared identifier patterns such as
userId,accountId,teamId, or entity-specificidfields
Example tracing queries
Use trace_parameter_usage when you want to follow a field such as userId across the API surface.
Use find_related_endpoints when you already know one endpoint and want to discover nearby or dependent endpoints, such as child resources or endpoints using the same identifiers.
Endpoint execution and authentication
The call_endpoint tool can execute actual API calls, not just describe them.
Supported auth strategies:
basicbearerapiKeyoauth2-passwordoauth2-client-credentialsauto
In auto mode, the tool inspects the endpoint’s effective OpenAPI security requirements and tries to apply the most appropriate authentication strategy from the credentials you provide.
Supported request body styles
JSON
application/x-www-form-urlencodedsimple
multipart/form-dataraw string bodies via
rawBody
You can also override the outgoing content type explicitly with contentType.
Example call_endpoint inputs
JSON body + API key
{
"url": "https://orders.example.com/openapi.json",
"method": "POST",
"path": "/orders",
"body": {
"productId": 42,
"quantity": 3
},
"auth": {
"apiKey": "your-api-key"
}
}OAuth password flow
{
"url": "https://auth.example.com/openapi.json",
"method": "GET",
"path": "/me",
"auth": {
"username": "demo",
"password": "super-secret",
"clientId": "client",
"clientSecret": "client-secret",
"scopes": ["profile"]
}
}Path params + query params
{
"url": "https://api.example.com/openapi.json",
"method": "GET",
"path": "/users/{id}",
"pathParams": {
"id": 123
},
"query": {
"include": ["roles", "permissions"]
}
}Direct bearer token
{
"url": "https://api.example.com/openapi.json",
"method": "GET",
"path": "/profile",
"auth": {
"strategy": "bearer",
"token": "your-access-token"
}
}Validation
Run the full verification suite with:
npm run checkThis runs:
the TypeScript build
the Vitest test suite
Development notes
Runtime: Node.js 18+
MCP SDK:
@modelcontextprotocol/sdkv1Spec parsing: JSON / YAML + HTML discovery heuristics
Request execution: real HTTP requests with automatic auth handling
Test runner:
vitest
Security notes
Do not commit real credentials, client secrets, or access tokens.
Prefer environment-specific client configuration over hardcoded secrets.
Be careful when using this against production APIs.
Review OpenAPI specs from untrusted sources carefully, especially when authentication and live request execution are involved.
Contributing
Issues and pull requests are welcome.
If you want to contribute:
fork the repository
create a feature branch
run
npm run checkopen a pull request with a clear description
Roadmap
search_endpointstooloptional semantic-search layer on top of structured tracing
broader Swagger UI / Scalar detection patterns
external
$refresolution supportricher Laravel-specific API summaries
optional Streamable HTTP transport support
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rekl0w/mcp-openapi-discovery'
If you have feedback or need assistance with the MCP directory API, please join our Discord server