yapi-mcp-zhh
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port for HTTP MCP server and demo web UI. Defaults to 43181. | 43181 |
| YAPI_DEMO | No | Set to 'true' to force demo backend (in-memory). Defaults to false. If YAPI_BASE_URL is not set, demo mode is used automatically. | false |
| YAPI_EMAIL | No | YApi login email (or LDAP login name). Required for listing projects, creating interfaces, modifying advanced mock scripts, and managing mock cases. | |
| YAPI_TOKEN | No | Single project token required to modify normal response body (res_body). | |
| YAPI_COOKIE | No | Browser cookie string (_yapi_token=...; _yapi_uid=...). Can be used instead of YAPI_EMAIL and YAPI_PASSWORD for authenticated actions. | |
| YAPI_BASE_URL | No | YApi source URL (no trailing slash). Required when connecting to a real YApi instance. If not set or YAPI_DEMO=true, the server runs in demo mode and does not write to real YApi. | |
| YAPI_PASSWORD | No | YApi login password. Alternatively, use YAPI_COOKIE. | |
| YAPI_PROJECT_ID | No | Default project ID used when the tool omits projectId. | |
| YAPI_INSECURE_TLS | No | Set to 'true' to allow insecure TLS connections for intranet HTTPS with untrusted certificates. | false |
| MCP_HTTP_AUTH_TOKEN | No | Bearer token required for connecting to the HTTP MCP endpoint when using a real YApi. Clients must send it in the Authorization header. | |
| YAPI_PROJECT_TOKENS | No | Comma-separated project tokens in the format 'projectID:token,projectID:token'. Recommended for multi-project setups. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| yapi_list_projectsA | 列出当前账号能看到的 YApi 项目。不知道项目 ID 时先用这个,不必事先配置 YAPI_PROJECT_ID。 |
| yapi_search_interfacesA | 按标题、路径、方法搜索当前 YApi 项目里的接口,不知道 interfaceId 时先用这个。 |
| yapi_create_interfaceB | 在指定 YApi 项目新建接口。需要登录账号。不传 catId 时优先用「公共分类」,否则用第一个分类。 |
| yapi_get_interface_mockA | 读取接口的 res_body(普通 Mock 文档 / JSON Schema)以及 mock URL。 |
| yapi_update_interface_mockB | 更新接口返回体文档(普通 Mock)。高级脚本和期望请用对应工具。 |
| yapi_get_advanced_mockC | 读取高级 Mock 自定义脚本。需要 YAPI_EMAIL/YAPI_PASSWORD 或 Cookie。 |
| yapi_update_advanced_mockB | 覆盖保存高级 Mock 脚本。官方插件接口不在项目 token 白名单里,必须走登录态。 |
| yapi_list_mock_casesB | 列出接口的高级 Mock 期望。 |
| yapi_save_mock_caseB | 新增或更新一条 Mock 期望。更新时传 caseId。 |
| yapi_delete_mock_caseC | 删除一条 Mock 期望。 |
| yapi_call_mockB | 请求 mock URL,确认写入是否生效。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhanghaha416/yapi-mcp-zhh'
If you have feedback or need assistance with the MCP directory API, please join our Discord server