Mcp链接将任何OpenAPI V3 API转换为Mcp服务器
概览
什么是 MCP-Link?
MCP-Link 是一个创新工具,旨在将任何 OpenAPI V3 API 转换为一个完全功能的 MCP(微服务通信协议)服务器。这使得开发者能够轻松创建和管理微服务,从而增强其应用程序的可扩展性和效率。通过利用 OpenAPI 规范的强大功能,MCP-Link 简化了 API 集成和管理的过程。
MCP-Link 的特点
- OpenAPI V3 兼容性:MCP-Link 支持最新的 OpenAPI V3 规范,确保开发者能够无缝地使用现代 API。
- 简单转换:该工具自动化转换过程,使用户能够以最小的努力将其 OpenAPI 定义转换为 MCP 服务器。
- 用户友好的界面:MCP-Link 提供直观的界面,使开发者能够轻松导航并有效利用其功能。
- 可扩展性:MCP-Link 在设计时考虑了可扩展性,允许开发者管理多个微服务而不影响性能。
- 文档生成:自动生成创建的 MCP 服务器的全面文档,使团队更容易理解和使用 API。
如何使用 MCP-Link
- 访问工具:访问 MCP-Link 网站 以获取该工具。
- 上传 OpenAPI 规范:首先上传您的 OpenAPI V3 规范文件。MCP-Link 将读取该文件并准备进行转换。
- 配置设置:调整任何必要的设置,以根据您的具体需求定制 MCP 服务器。
- 转换为 MCP 服务器:启动转换过程。MCP-Link 将根据您的 OpenAPI 定义生成 MCP 服务器。
- 部署和管理:转换完成后,部署您的 MCP 服务器并通过提供的界面进行管理。
常见问题解答
Q1: 什么是 OpenAPI V3?
A1: OpenAPI V3 是一种构建 API 的规范,允许开发者以标准化的方式描述其 API 的端点、请求/响应格式和认证方法。
Q2: MCP-Link 能处理复杂的 API 吗?
A2: 是的,MCP-Link 设计用于处理复杂的 API,适用于广泛的应用程序和服务。
Q3: 使用 MCP-Link 是否需要费用?
A3: MCP-Link 目前作为公共工具提供,用户可以免费访问其功能。
Q4: MCP-Link 支持哪些编程语言?
A4: MCP-Link 是语言无关的,意味着它可以与任何能够与 HTTP API 交互的编程语言一起使用。
Q5: 我如何可以为 MCP-Link 做贡献?
A5: 欢迎贡献!您可以访问 GitHub 上的 MCP-Link 仓库,报告问题、建议功能或提交拉取请求。
详情
MCP Link - Convert Any OpenAPI V3 API to MCP Server
🧩 Architecture
🤔 Why MCP Link?
There is a notable gap in the current AI Agent ecosystem:
- Most MCP Servers are simple wrappers around Web APIs
- Functionality interfaces may not be complete, depending on developer implementation
- Manual creation of MCP interfaces is time-consuming and error-prone
- Lack of standardized conversion processes
MCP Link solves these issues through automation and standardization, allowing any API to easily join the AI-driven application ecosystem.
🌟 Key Features
- Automatic Conversion: Generate complete MCP Servers based on OpenAPI Schema
- Seamless Integration: Make existing RESTful APIs immediately compatible with AI Agent calling standards
- Complete Functionality: Ensure all API endpoints and features are correctly mapped
- Zero Code Modification: Obtain MCP compatibility without modifying the original API implementation
- Open Standard: Follow the MCP specification to ensure compatibility with various AI Agent frameworks
🌐 Online Version
Try our hosted version at mcp-link.vercel.app to quickly convert and test your APIs without installation.
🚀 Quick Start
Installation
### Clone repository
git clone https://github.com/automation-ai-labs/mcp-link.git
cd mcp-openapi-to-mcp-adapter
### Install dependencies
go mod download
Running
### Specify port
go run main.go serve --port 8080 --host 0.0.0.0
Parameter Description
s=
- URL of the OpenAPI specification fileu=
- Base URL of the target APIh=
- Authentication header format, in the format ofheader-name:value-prefix
f=
- Path filter expressions to include or exclude API endpoints. Syntax:+/path/**
- Include all endpoints under /path/-/path/**
- Exclude all endpoints under /path/+/users/*:GET
- Include only GET endpoints for /users/{id}- Multiple filters can be separated by semicolons:
+/**:GET;-/internal/**
- Wildcards:
*
matches any single path segment,**
matches zero or more segments
Examples
| _ | API | MCP Link URL | Authentication Method |
||--|-||
| | Brave Search | https://mcp-link.vercel.app/links/brave | API Key |
|
| DuckDuckGo | https://mcp-link.vercel.app/links/duckduckgo | None |
|
| Figma | https://mcp-link.vercel.app/links/figma | API Token |
|
| GitHub | https://mcp-link.vercel.app/links/github | Bearer Token |
|
| Home Assistant | https://mcp-link.vercel.app/links/homeassistant | Bearer Token |
|
| Notion | https://mcp-link.vercel.app/links/notion | Bearer Token |
|
| Slack | https://mcp-link.vercel.app/links/slack | Bearer Token |
|
| Stripe | https://mcp-link.vercel.app/links/stripe | Bearer Token |
|
| TMDB | https://mcp-link.vercel.app/links/tmdb | Bearer Token |
|
| YouTube | https://mcp-link.vercel.app/links/youtube | Bearer Token |
Usage in AI Agents
{
"mcpServers": {
"@service-name": {
"url": "http://localhost:8080/sse?s=[OpenAPI-Spec-URL]&u=[API-Base-URL]&h=[Auth-Header]:[Value-Prefix]"
}
}
}
These URLs allow any API with an OpenAPI specification to be immediately converted into an MCP-compatible interface accessible to AI Agents.
📋 Future Development
- MCP Protocol OAuthflow: Implement OAuth authentication flow support for MCP Protocol
- Resources Support: Add capability to handle resource-based API interactions
- MIME Types: Enhance support for various MIME types in API requests and responses
Server配置
{
"mcpServers": {
"mcp-link": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--automation-ai-labs--mcp-link--mcp-link",
"./out"
],
"env": {}
}
}
}