从 YApi 文档链接读取接口信息,列出和搜索 YApi 项目中的接口。
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add yapi-server-ko-good-code --env YAPI_BASE_URL='<YAPI_BASE_URL>' --env YAPI_TOKEN='<YAPI_TOKEN>' -- npx -y @neigri/yapi-mcp-server@latest~/.codex/config.toml
[mcp_servers.yapi-server-ko-good-code]
command = "npx"
args = ["-y", "@neigri/yapi-mcp-server@latest"]
env = { YAPI_BASE_URL = "<YAPI_BASE_URL>", YAPI_TOKEN = "<YAPI_TOKEN>" }
# codex mcp add yapi-server-ko-good-code --env YAPI_BASE_URL='<YAPI_BASE_URL>' --env YAPI_TOKEN='<YAPI_TOKEN>' -- npx -y @neigri/yapi-mcp-server@latest~/.cursor/mcp.json
{
"mcpServers": {
"yapi-server-ko-good-code": {
"command": "npx",
"args": [
"-y",
"@neigri/yapi-mcp-server@latest"
],
"env": {
"YAPI_BASE_URL": "<YAPI_BASE_URL>",
"YAPI_TOKEN": "<YAPI_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"yapi-server-ko-good-code": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@neigri/yapi-mcp-server@latest"
],
"env": {
"YAPI_BASE_URL": "<YAPI_BASE_URL>",
"YAPI_TOKEN": "<YAPI_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"yapi-server-ko-good-code": {
"command": "npx",
"args": [
"-y",
"@neigri/yapi-mcp-server@latest"
],
"env": {
"YAPI_BASE_URL": "<YAPI_BASE_URL>",
"YAPI_TOKEN": "<YAPI_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"yapi-server-ko-good-code": {
"command": "npx",
"args": [
"-y",
"@neigri/yapi-mcp-server@latest"
],
"env": {
"YAPI_BASE_URL": "<YAPI_BASE_URL>",
"YAPI_TOKEN": "<YAPI_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"yapi-server-ko-good-code": {
"command": "npx",
"args": [
"-y",
"@neigri/yapi-mcp-server@latest"
],
"env": {
"YAPI_BASE_URL": "<YAPI_BASE_URL>",
"YAPI_TOKEN": "<YAPI_TOKEN>"
}
}
}
}Environment variables
YAPI_BASE_URLYAPI_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.