
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A project-agnostic MCP server that pulls structured API metadata from YApi by page URL, interface ID, or project ID.
MCP server for reading YApi interface metadata is cataloged as an MCP server attributed to xiaozhi666666. A project-agnostic MCP server that pulls structured API metadata from YApi by page URL, interface ID, or project ID. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP server for reading YApi interface metadata are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes, when includeRaw is set to true the raw YApi data is returned.
No; it only pulls structured data from YApi, leaving generation of services, types, models, or API clients to your coding agent or project-specific generator.
README.md · 87016578c5f3 · Fetched 2026-11-13 09:30:07 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
用于读取 YApi 接口元数据的 MCP server。你可以通过 YApi 页面 URL、接口 ID 或项目 ID 获取接口路径、请求参数、请求体、响应结构等信息。
它刻意保持项目无关:这个 MCP 只负责从 YApi 拉取结构化数据,至于如何生成 services、TypeScript 类型、model 或 API client,可以交给你的编码 agent 或项目专用生成器完成。
npm install -g yapi-fetch-mcp
本地开发:
git clone https://github.com/xiaozhi666666/yapi-mcp.git
cd yapi-mcp
npm install
npm run build
如果你的 YApi 支持项目 token,推荐使用:
export YAPI_HOST="https://yapi.example.com"
export YAPI_TOKEN="project-token"
如果你的 YApi 只能通过登录态访问,可以复制浏览器 cookie:
export YAPI_HOST="https://yapi.example.com"
export YAPI_COOKIE="_yapi_token=...; _yapi_uid=..."
工具参数里也可以直接传 host、token 和 cookie。
YAPI_TOKEN 指的是 YApi 的项目 token,通常是项目级别的长期 token。获取方式一般如下:
设置、项目设置 或类似页面。Token、项目 Token 或 开放接口 Token。YAPI_TOKEN。配置后,本 MCP 会把它作为 YApi API 的 token 查询参数发送,例如:
/api/interface/get?id=123&token=project-token
注意:这里的 YAPI_TOKEN 不是所有系统里的 accessToken。如果你的 accessToken 可以直接作为 YApi API 的 token 参数使用,就可以填到 YAPI_TOKEN;如果它必须通过 Authorization: Bearer ... 请求头传递,当前版本不会自动处理,请改用 YAPI_COOKIE 或按你的私有化 YApi 鉴权方式扩展代码。
如果你使用 Codex,并且希望这个 MCP 只在某个业务项目里生效,可以在该业务项目根目录创建:
.codex/config.toml
写入:
[mcp_servers.yapi]
command = "npx"
args = ["-y", "yapi-fetch-mcp"]
[mcp_servers.yapi.env]
YAPI_HOST = "https://yapi.example.com"
YAPI_TOKEN = "project-token"
然后在 Codex 中打开或重启这个项目。Codex 只有在项目被信任后才会加载项目级 .codex/config.toml。
注意:如果 .codex/config.toml 会提交到 Git,不建议把真实 YAPI_TOKEN 写进去。可以只提交示例配置,或者把真实 token 放到你的个人 ~/.codex/config.toml 中。
推荐用 npx:
{
"mcpServers": {
"yapi": {
"command": "npx",
"args": ["-y", "yapi-fetch-mcp"],
"env": {
"YAPI_HOST": "https://yapi.example.com",
"YAPI_TOKEN": "project-token"
}
}
}
}
如果已经全局安装,也可以直接使用命令:
{
"mcpServers": {
"yapi": {
"command": "yapi-fetch-mcp",
"env": {
"YAPI_HOST": "https://yapi.example.com",
"YAPI_TOKEN": "project-token"
}
}
}
}
从源码运行:
{
"mcpServers": {
"yapi": {
"command": "node",
"args": ["/absolute/path/to/yapi-mcp/build/src/index.js"],
"env": {
"YAPI_HOST": "https://yapi.example.com",
"YAPI_TOKEN": "project-token"
}
}
}
}
get_interface通过 URL 或接口 ID 获取单个接口详情。
{
"url": "https://yapi.example.com/project/12/interface/api/345"
}
{
"host": "https://yapi.example.com",
"interfaceId": 345,
"token": "project-token"
}
返回字段包括:
methodpathheadersquerypathParamsbodySchemaresponseSchemaincludeRaw 为 true 时返回原始 YApi 数据list_project_interfaces读取 YApi 项目的接口目录。
{
"url": "https://yapi.example.com/project/12/interface/api/345"
}
search_project_interfaces按关键字分页搜索项目接口。
{
"projectId": 12,
"keyword": "order",
"page": 1,
"limit": 20
}
仓库已经包含 server.json 和 package.json#mcpName,npm 包发布后可以继续走 MCP Registry 发布流程。
常见发布流程:
npm publish --access public
mcp-publisher login github
mcp-publisher publish
npm 包名:
yapi-fetch-mcp
Registry server name:
io.github.xiaozhi666666/yapi-mcp
当前使用的常见 YApi API:
/api/interface/get?id=:interfaceId/api/interface/list_menu?project_id=:projectId/api/interface/list?project_id=:projectId&page=1&limit=20部分私有化 YApi 可能改造过鉴权方式。如果 token 不可用,可以尝试 YAPI_COOKIE。
MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP server for reading YApi interface metadata from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/yapi-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.