internal-swagger-mcp
Allows AI agents to query internal Swagger platform API documentation, including listing services, searching APIs by keyword, viewing full parameters and mock examples, and refreshing the cache.
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., "@internal-swagger-mcpsearch for endpoints related to user authentication"
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.
internal-swagger-mcp
Let AI agents query your internal Swagger platform's API docs via MCP.
This server talks to the internal Swagger management platform's private share endpoint (
/flow/swagger/share?uid=...), not a public OpenAPI URL.
Tools
Tool | Purpose |
| List all configured services and their cache status |
| Search APIs by keyword (filterable by method / service) |
| View an API's full parameters and mock example |
| Force-refresh the doc cache (default TTL is 30 minutes) |
Related MCP server: mcp-swagger
Connecting MCP clients
Requires Node.js ≥ 18. Swagger sources are always supplied by the client — this server holds no configuration. Pass them in stdio mode via the SWAGGER_SOURCES env var or --sources-file, and in HTTP mode via the X-Swagger-Sources header per request. Use project scope for every client's MCP config so each repo pins its own sources and the config can be committed to git. In the snippets below, <SOURCE> looks like http://your-server/...#/swaggerManage?uid=xxx; if swagger_list_sources works inside the client, the integration is up.
Start in HTTP mode (for deploying on a shared internal host):
npx -y internal-swagger-mcp --http # defaults to port 3000; override with --port or PORTClaude Code
Official docs — using --scope project writes to the project root's .mcp.json.
Local (stdio):
claude mcp add swagger --scope project --env SWAGGER_SOURCES='["<SOURCE>"]' -- npx -y internal-swagger-mcpRemote (HTTP):
claude mcp add --transport http swagger --scope project http://<internal-IP>:3000/mcp --header 'X-Swagger-Sources: ["<SOURCE>"]'opencode
Official docs — place this in opencode.json at the project root.
Local (stdio):
{
"mcp": {
"swagger": {
"type": "local",
"command": ["npx", "-y", "internal-swagger-mcp"],
"environment": {
"SWAGGER_SOURCES": "[\"<SOURCE>\"]"
}
}
}
}Remote (HTTP):
{
"mcp": {
"swagger": {
"type": "remote",
"url": "http://<internal-IP>:3000/mcp",
"headers": {
"X-Swagger-Sources": "[\"<SOURCE>\"]"
}
}
}
}Cursor
Official docs — place this in .cursor/mcp.json at the project root.
Local (stdio):
{
"mcpServers": {
"swagger": {
"command": "npx",
"args": ["-y", "internal-swagger-mcp"],
"env": {
"SWAGGER_SOURCES": "[\"<SOURCE>\"]"
}
}
}
}Remote (HTTP):
{
"mcpServers": {
"swagger": {
"url": "http://<internal-IP>:3000/mcp",
"headers": {
"X-Swagger-Sources": "[\"<SOURCE>\"]"
}
}
}
}Sources file
When the source list belongs to the project, pass --sources-file <path> instead of pasting the same JSON-as-string into every client's env. Use a path relative to the project root (e.g. ./swagger-sources.json) — it resolves from process.cwd(), which is the project root under project-scoped configs in Claude Code, Cursor, opencode, etc. — so the MCP config can be committed and shared as-is.
swagger-sources.json (each entry is a <SOURCE> URL as defined above):
[
"<SOURCE_1>",
"<SOURCE_2>"
]Each client config then becomes a thin wrapper around the same command:
Claude Code:
claude mcp add swagger --scope project -- npx -y internal-swagger-mcp --sources-file ./swagger-sources.jsonopencode (opencode.json):
{
"mcp": {
"swagger": {
"type": "local",
"command": ["npx", "-y", "internal-swagger-mcp", "--sources-file", "./swagger-sources.json"]
}
}
}Cursor (.cursor/mcp.json) — and other clients using the mcpServers shape:
{
"mcpServers": {
"swagger": {
"command": "npx",
"args": ["-y", "internal-swagger-mcp", "--sources-file", "./swagger-sources.json"]
}
}
}The file is read once at startup; the source list is fixed for the server's lifetime (clients relaunch on config change anyway). When both --sources-file and SWAGGER_SOURCES are provided, the file wins. The flag is rejected in --http mode because HTTP sources are inherently per-request.
HTTP deployment security
The server binds to 0.0.0.0 by default for easy intranet sharing, and prints a warning if started bare. In production, set at least one of the following:
Environment variable | Effect |
| Bind address; set to |
| Require an |
| Comma-separated Origin allowlist (DNS-rebinding protection) |
When
MCP_ALLOWED_ORIGINSis set, requests without anOriginheader are rejected — except for requests carrying a validMCP_BEARER_TOKEN, so server-to-server calls still work.
Available Tools
4 toolsswagger_get_api_detailGet Swagger API DetailARead-onlyIdempotent
Get full details of a single API interface, including all parameter definitions and response examples.
Parameters:
source (required): Service name, from the [service name] returned by swagger_list_sources or swagger_search_api.
method (required): HTTP method, e.g. "GET", "POST".
path (required): Full interface path, e.g. "/qmAuthorityCenter/systemFun/initPerformanceSolution".
Response includes:
Basic interface info (name, description, status, Content-Type).
Full definitions for Query / Path / Header / Form / Body parameters (name, type, required, description). Required column: "是" = required, "否" = optional, "?" = platform metadata is ambiguous (checkType=1 with no error message — cross-check with backend code or treat as optional).
Sub-fields of nested Object parameters.
Response results (Demo JSON + output field table).
Mock response field table.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Full interface path, e.g. /qmAuthorityCenter/systemFun/initPerformanceSolution | |
| method | Yes | HTTP method. | |
| source | Yes | Service name, from swagger_list_sources or swagger_search_api results. |
Output Schema
| Name | Required | Description |
|---|---|---|
| name | Yes | |
| path | Yes | |
| method | Yes | |
| status | Yes | |
| responses | Yes | |
| mockFields | Yes | |
| moduleName | Yes | |
| parameters | Yes | |
| sourceName | Yes | |
| contentType | No | |
| description | Yes | |
| bodyRequestDemo | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds meaningful behavioral details: what the response includes (basic info, parameter definitions, response examples, mock field table) and explains the 'Required' column semantics ('是' = required, '否' = optional, '?' = ambiguous). This goes beyond annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear first sentence and bullet points for parameters and response sections. While it is longer than necessary, every bullet adds meaningful detail (e.g., required column semantics, response components). It is front-loaded with the primary purpose and avoids fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists (so return values are formally specified) and annotations declare safety traits, the description covers the essential operational context: how to specify the target API (source, method, path) and what the response contains. It does not cover error scenarios or rate limits, but these are not critical for a read-only detail operation. The description is sufficiently complete for a well-annotated tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all three parameters, with clear explanations (e.g., method enum, path example, source from sibling tools). The description adds little beyond what the schema already provides—the source field is explained more explicitly in the schema, and the path/method examples are duplicated. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get full details of a single API interface, including all parameter definitions and response examples.' This is a specific verb+resource combination that distinguishes it from sibling tools like swagger_list_sources (listing sources) and swagger_search_api (searching APIs).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells the agent that the 'source' parameter comes from the output of swagger_list_sources or swagger_search_api, providing context on when to use this tool. However, it does not explicitly state when not to use it or compare with alternatives, so it falls short of a perfect 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swagger_list_sourcesList Swagger SourcesARead-onlyIdempotent
List all configured Swagger documentation sources and their cache status.
For each service, returns:
name: Service name (from config, or auto-read from projectName).
fetchedAt: Last cache time (null means not yet loaded).
totalInterfaces: Total interface count (shown when loaded).
modules: Module list.
Use this before calling swagger_search_api to discover which services are available.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| sources | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds valuable behavioral nuance beyond the annotations: it explains that fetchedAt may be null (meaning not yet loaded) and that totalInterfaces is only shown when loaded. This clarifies caching behavior and return semantics, which the annotations do not cover. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a clear opening sentence, a bulleted list of return fields, and a usage tip. Every sentence serves a purpose, and it is easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless read-only list operation with an output schema, the description is fully complete. It explains what is returned, including edge cases, and how it fits into the broader workflow with sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. The description focuses on return fields rather than parameters, which is appropriate. It doesn't need to add parameter details because none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's specific function: 'List all configured Swagger documentation sources and their cache status.' It uses a strong verb ('List') and a specific resource ('Swagger documentation sources'), and effectively distinguishes itself from siblings by noting it should be used before swagger_search_api.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit usage guidance is provided: 'Use this before calling swagger_search_api to discover which services are available.' This tells the agent exactly when to employ this tool and mentions a sibling tool as the subsequent step.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swagger_refresh_cacheRefresh Swagger CacheAIdempotent
Force-refetch Swagger documentation data and update the cache.
Use this after the documentation has been updated (interfaces added or modified) to fetch the latest data.
Parameters:
source (optional): Service name. Omit to refresh all services.
Returns: Refresh results, including success/failure status and updated interface counts.
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Service name. Omit to refresh the cache for all services. |
Output Schema
| Name | Required | Description |
|---|---|---|
| failed | No | |
| refreshed | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover idempotence, non-destructiveness, and non-read-only. The description adds context about force-refetch semantics (ignoring cache), that it updates the cache, and the return shape (success/failure and interface counts). This goes beyond annotations, though it doesn't disclose every possible side effect.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured: it starts with the core action, then provides a usage hint, parameter explanation, and return summary. Every sentence contributes value without redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simple signature (one optional param), full schema coverage, rich annotations, and existing output schema, the description provides sufficient context for an agent to invoke it correctly. It covers purpose, usage timing, parameter behavior, and return contents.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% description coverage for the single 'source' parameter, and the description repeats the schema text almost exactly. No additional meaning is added; the baseline of 3 for full schema coverage applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Force-refetch') and resource ('Swagger documentation data'), and it distinguishes itself from sibling tools (list, search, get detail) by focusing on cache refresh. The action is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool ('after the documentation has been updated...') but does not mention when not to use it or explicitly reference alternatives. This clear context earns a 4, lacking only the exclusion/alternative guidance for a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swagger_search_apiSearch Swagger APIARead-only
Search API interfaces in the internal Swagger documentation.
Searches by keyword across interface name, description, path, and module name. Optionally filter by HTTP method and service.
Parameters:
keyword (required): Search keyword, e.g. "登录", "user", "/api/order". Chinese is supported.
method (optional): HTTP method filter, e.g. "GET", "POST".
source (optional): Service name filter, taken from swagger_list_sources results.
include_deprecated (optional): Whether to include deprecated interfaces. Default false.
limit (optional): Maximum number of results. Default 20.
Response: Each matched interface includes: service name, module name, HTTP method, full path, interface name, description, status.
Examples:
Search login interfaces: keyword="登录"
Search POST interfaces: keyword="用户", method="POST"
Search within a specific service: keyword="order", source="订单服务"
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results. Default 20, max 50. | |
| method | No | Filter by HTTP method. Omit to search all methods. | |
| source | No | Restrict the search to a specific service name (from swagger_list_sources). Omit to search all services. | |
| keyword | Yes | Search keyword. Matches interface name / description / path / module name. Chinese is supported. | |
| include_deprecated | No | Whether to include deprecated interfaces. Default false. |
Output Schema
| Name | Required | Description |
|---|---|---|
| total | Yes | |
| failed | No | |
| keyword | Yes | |
| results | Yes | |
| truncated | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and destructiveHint=false, and the description does not contradict them. It adds valuable behavioral context: search scope, default for include_deprecated, default/max limit, and response fields, giving a clear picture beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with sections for parameters, response, and examples. It is lengthy but every sentence earns its place, and the front-loaded summary makes intent immediately clear. No filler or redundant content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (5 params, filters, response fields), the description is complete: it covers search behavior, filters, defaults, response content, and examples. With an output schema present and good annotations, there are no significant gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (all parameters described in schema). The description still adds meaning beyond schema by providing example keywords, explaining the source origin from swagger_list_sources, and clarifying enum usage (HTTP method). This compensates with practical guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Search API interfaces in the internal Swagger documentation' and specifies the searchable fields (name, description, path, module). This distinguishes it from siblings like swagger_list_sources (lists sources) and swagger_get_api_detail (fetches details).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides concrete usage context through examples and notes that the 'source' parameter comes from swagger_list_sources results. However, it does not explicitly state when to use this tool versus alternatives or mention exclusions, which prevents a perfect score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.5- First observed
swagger_get_api_detail - First observed
swagger_list_sources - First observed
swagger_refresh_cache - First observed
swagger_search_api
TDQS
Each tool serves a distinct function: listing sources, searching APIs, fetching details, and refreshing cache. There is no overlap between these operations.
All tool names follow the consistent pattern 'swagger_<verb>_<noun>' with lowercase and underscores. The naming is uniform and predictable.
Four tools are well-scoped for a Swagger documentation MCP server, covering the essential operations without unnecessary bloat.
The tool surface covers the full workflow: discover sources, search endpoints, get detailed specs, and refresh cached docs. No obvious gaps exist for the stated purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
- OneOAuthai.withone
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides LLM-agnostic access to API documentation through MCP and REST endpoints, enabling AI assistants to retrieve, search, and proxy requests to whitelisted APIs across multiple platforms.-
- AlicenseAqualityDmaintenanceExposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.14132MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to explore, search, and query API definitions from OpenAPI/Swagger JSON files.59MIT
- FlicenseNot gradedqualityCmaintenanceEnables agents to query real-time OpenAPI documentation of backend services, providing tools to list services, endpoints, and schemas via MCP.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/zhangwanli09/internal-swagger-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server