Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNo日志级别,设为 debug 时会输出更多拉取和解析过程日志。
CACHE_TTL_MSNo内存缓存有效期,单位毫秒,默认值 300000(5分钟)。
SWAGGER_HEADERSNo额外附带到所有文档请求上的自定义 HTTP Header,格式为 JSON 字符串,例如 {"X-Env":"dev","X-Token":"abc"}。
SWAGGER_BASE_URLNo用于补全 swagger-resources 里返回的相对路径。未设置时默认回退到 SWAGGER_RESOURCES_URL 的基址。
SWAGGER_BASIC_AUTHNo访问 Swagger 文档时使用的 HTTP Basic Auth 账号密码,格式 username:password。
SWAGGER_RESOURCES_URLYesKnife4j / Swagger 聚合入口地址,用来读取模块列表。例如:http://127.0.0.1:3301/swagger-resources
SWAGGER_MODULE_ALLOWLISTNo只加载指定模块,其他模块会被忽略。格式为逗号分隔,例如 sample-account,sample-auth。

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_specsA

List aggregated Knife4j / Swagger modules and their loading status. Use this for module discovery and diagnostics, not for reading API details or fetching spec URLs directly.

find_apiA

Find candidate APIs by path, keyword, tag, module, or method. After locating a candidate, call get_api_detail with its module, path, and method to read the full indexed API documentation instead of fetching Swagger/OpenAPI spec URLs directly.

get_api_detailA

Preferred tool for full API documentation. Use module + exact path + HTTP method to read the server-indexed API detail, including recursively expanded request and response schemas. Do not fetch /v2/api-docs, /v3/api-docs, or spec URLs directly.

refresh_specsA

Force a reload of swagger-resources and all module specs while keeping partial failures isolated. Use this when upstream docs changed or when a previous lookup returned stale results.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/chaselen/knife4j-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server