Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
YAPI_UIDNoOptional; login JWT usually auto-parses uid
YAPI_TOKENYesLogin JWT or project open token
YAPI_COOKIENoOptional raw Cookie header override
YAPI_BASE_URLYesYApi host, e.g. https://yapi.example.com
YAPI_MCP_CONFIGNoOptional path to JSON config file

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Fetch YApi project API docs (JSON request/response) from a project URL so the agent can implement client integrations. Configure credentials via env (YAPI_BASE_URL / YAPI_TOKEN), config file (.yapi-mcp.json), yapi_configure, or per-tool token/base_url. Prefer: configure → parse URL → list/search interfaces → get interface detail → generate client code.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
yapi_configureA

Set runtime connection settings for this MCP session (overrides env/file).

Prefer env vars or .yapi-mcp.json for durable config. Use this when the user pastes host/token in chat. Never echo the raw token back.

yapi_get_configA

Show non-secret connection settings currently in effect.

yapi_parse_urlA

Parse a YApi page URL into base_url, project_id, and optional interface_id.

Example: https://yapi.example.com/project/123/interface/api/

yapi_get_projectC

Get YApi project metadata (name, basepath, desc).

yapi_list_interfacesB

List interfaces under a YApi project (from list_menu), with optional filters.

Pass a browser URL like https://yapi.example.com/project/123/interface/api/ or set project_id + base_url. Credentials via env / config / token arg.

yapi_get_interfaceA

Get one interface's full JSON request/response definition for client codegen.

Prefer interface_id from yapi_list_interfaces, or a detail URL: https://yapi.example.com/project/123/interface/api/456

yapi_export_catalogB

Export a project API catalog for agent understanding / client scaffolding.

By default returns an index (method/path/title). Set include_details=true to also pull normalized request/response bodies (capped by limit).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 7 tools

Disambiguation4/5

Most tools target distinct actions: configure vs get_config are cleanly separated by direction, and parse_url is a focused utility. The only soft overlap is yapi_export_catalog with include_details=true, which can approximate the combined output of yapi_list_interfaces and yapi_get_interface, though the index-first default keeps them reasonably distinct.

Naming Consistency5/5

Every tool uses the yapi_ prefix followed by a verb_noun form (get_config, parse_url, get_project, list_interfaces, get_interface, export_catalog), all in snake_case. No mixing of conventions.

Tool Count5/5

Seven tools is well-scoped for a read-focused YApi client: two config tools, one URL helper, three resource reads, and one export. Each earns its place with no filler.

Completeness4/5

The read surface covers project metadata, interface listing, single-interface detail, and bulk catalog export, which fits the codegen/agent-understanding purpose. Gaps remain: there is no list_projects or interface search, so an agent starting from just a host must rely on parse_url or a known project_id, and no write/update operations exist.

Maintenance

ActivityMaintained
ResponsivenessSyncing