内容
# OpenAPI MCP Server
MCP server 将任何 OpenAPI/Swagger 规范转换为可查询的工具,以供您的 LLM 使用。搜索端点,获取端点详细信息,并从您的 API 文档中探索模式。
## Claude Code 的设置
添加到您的 `.mcp.json`、`.claude.json` 或 `claude_desktop_config.json` 中。
```json
{
"mcpServers": {
"my-api": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/puelpan/openapi-spec-mcp.git@main",
"openapi-spec-mcp",
"/path/to/your/openapi.yaml"
]
}
}
}
```
或者使用远程 URL:
```json
{
"mcpServers": {
"my-api": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/puelpan/openapi-spec-mcp.git@main",
"openapi-spec-mcp",
"https://api.example.com/openapi.json"
]
}
}
}
```
## 可用工具
- **search_endpoints**: 按关键字查找端点
- **get_endpoint**: 获取详细的端点信息(参数、响应等)
- **list_all_endpoints**: 列出所有可用的端点
- **search_schemas**: 按名称查找模式定义
- **get_schema**: 获取带有解析引用的模式详细信息
## 支持的格式
- 本地文件: `.yaml`、`.yml`、`.json`
- 远程 URL: 任何 OpenAPI 规范 URL(格式自动检测)
连接信息
猜你喜欢
rea
用于编码代理的逆向工程:一个 CLI 和 MCP 服务器,用于检查任何应用程序,了解其功能,并按照您的方式构建它们。
everything-claude-code
完整的 Claude Code 配置集合 - agents、skills、hooks、commands、rules、MCPs。来自 Anthropic...
Firecrawl
Firecrawl MCP Server 实现了网页抓取、爬虫和内容提取功能。
MarkItDown MCP
MarkItDown-MCP是一个轻量级服务器,用于将URI转换为Markdown。
cc-switch
跨平台的Claude Code、Codex和Gemini CLI一体化助手。
Agent-Reach
赋予你的AI Agent观察整个互联网的眼睛。读取并搜索...