MCP Catalogs
首页

mcp-api-gateway

by rflpazini·40·综合分 45

通用MCP服务器,可将任何带Swagger/OpenAPI规范的API通过Docker转换为Claude Desktop工具。

developer-toolsapi-integrationai-llm
13
Forks
0
活跃 Issue
2 个月前
最近提交
2 天前
收录于

概述

这个MCP服务器作为网关,通过自动将API端点转换为Claude工具,将任何REST API集成到Claude Desktop。它使用Swagger/OpenAPI规范动态生成工具,使Claude能够与API交互而无需自定义集成代码。服务器支持多种身份验证方法,优化大型API的性能,并包括自动重试和基于Cookie的身份验证等功能。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:将企业API集成到Claude Desktop,无需自定义工具开发
:使Claude能够在单个会话中与多个API服务交互
:通过Claude中的自然语言提示自动化API交互
:这个MCP服务器能否处理需要身份验证的API?
:它如何处理拥有许多端点的大型API?
:我可以使用本地API规范吗?

什么时候选它

当您需要快速将多个 API 与 Claude 集成,而无需编写自定义 MCP 服务器时,特别是对于具有 OpenAPI 规范的 REST API。

什么时候不要选它

如果您需要 WebSocket 支持、OAuth 认证或 OpenAPI 规范之外的复杂 API 转换,请不要选择它。

此 server 暴露的工具

从 README 抽取出 4 个工具
  • check_api_health

    Verify connectivity to configured APIs and report status

  • myapi_Users

    Grouped tool for user-related API operations

  • myapi_Products

    Grouped tool for product-related API operations

  • myapi_Orders

    Grouped tool for order-related API operations

说明:Tool names inferred from grouped examples and documentation. Actual tool names depend on the API's OpenAPI specification configuration.

可对比工具

openapi-mcprest-api-mcpswagger-mcp

安装

使用Docker MCP工具包(推荐)

  1. 安装Docker Desktop
  2. 从Docker MCP工具包获取MCP服务器
  3. 添加到你的claude_desktop_config.json中:
{
  "mcpServers": {
    "my-api": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i", "--pull", "always",
        "-e", "API_1_NAME=my-api",
        "-e", "API_1_SWAGGER_URL=https://api.example.com/swagger.json",
        "-e", "API_1_BASE_URL=https://api.example.com/v1",
        "-e", "API_1_HEADER_AUTHORIZATION=Bearer YOUR_TOKEN",
        "rflpazini/mcp-api-gateway:latest"
      ]
    }
  }
}

使用npx

API_1_NAME=my-api \
API_1_SWAGGER_URL=https://api.example.com/swagger.json \
API_1_BASE_URL=https://api.example.com/v1 \
npx mcp-api-gateway

FAQ

这个MCP服务器能否处理需要身份验证的API?
是的,它支持多种身份验证方法,包括Bearer令牌、自定义标头和自动基于Cookie的身份验证。
它如何处理拥有许多端点的大型API?
服务器提供性能优化,如工具分组、模式压缩和路径过滤,以减小有效载荷大小并提高启动时间。
我可以使用本地API规范吗?
可以,您可以将Swagger/OpenAPI文件挂载到Docker容器中,使用卷挂载功能。

mcp-api-gateway 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。