mcp-yearning
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | HTTP transport listen address | 0.0.0.0 |
| MCP_PORT | No | HTTP transport listen port | 8080 |
| YEARNING_URL | No | Yearning server URL | http://localhost:8000 |
| MCP_LOG_LEVEL | No | Log level: debug/info/warning/error | info |
| MCP_TRANSPORT | No | Transport protocol: stdio, sse, streamable-http | stdio |
| MCP_AUTH_TOKEN | No | Bearer token for HTTP authentication | |
| YEARNING_TIMEOUT | No | Request timeout in seconds | 30 |
| YEARNING_PASSWORD | Yes | Login password for Yearning (required) | |
| YEARNING_USERNAME | Yes | Login username for Yearning (required) | |
| YEARNING_READ_ONLY | No | Enable read-only mode (true/false) | false |
| YEARNING_LOGIN_TYPE | No | Login type: general or ldap | general |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| yearning_user_infoA | 查看当前登录用户的信息、部门、邮箱,以及有权查询的数据源列表。 对应 API:GET /api/v2/fetch/userinfo |
| yearning_list_sourcesA | 列出当前账号有权限的数据源(可按 query/dml/ddl 维度过滤)。 对应 API:GET /api/v2/fetch/source |
| yearning_list_databasesA | 列出指定数据源下的数据库(库)列表。 对应 API:GET /api/v2/fetch/base |
| yearning_list_tablesA | 列出指定数据源、指定库下的数据表列表。 对应 API:GET /api/v2/fetch/table |
| yearning_table_fieldsC | 查看表结构:字段列表(类型/可空/键/默认值/注释)与索引信息。 对应 API:GET /api/v2/fetch/fields |
| yearning_sql_checkA | 提交前对 SQL 做审核检测,返回逐条检查结果(级别/影响行数/错误/执行耗时)。 建议先调用本工具确认无误,再调用 yearning_submit_order 提交工单。 对应 API:PUT /api/v2/fetch/test |
| yearning_my_ordersA | 分页列出当前用户提交的工单(支持状态/关键字/工单号过滤)。 对应 API:WS /api/v2/common/list |
| yearning_order_detailA | 查看工单详情:SQL 明细(分页)、完整 SQL 语句、执行结果记录。 对应 API:GET /api/v2/fetch/detail + GET /api/v2/fetch/sql |
| yearning_order_timelineA | 查看工单审核时间线与流程步骤(含各审核人动作与当前所处步骤)。 对应 API:GET /api/v2/fetch/timeline + GET /api/v2/fetch/steps |
| yearning_rollback_sqlB | 获取工单的回滚 SQL(执行前由系统生成,用于误操作回退)。 对应 API:GET /api/v2/fetch/roll |
| yearning_audit_ordersA | 分页列出与当前用户相关的待审核/审核工单(审核人视角)。 对应 API:WS /api/v2/audit/order/list |
| yearning_query_statusC | 查看查询审核开关是否开启,以及当前用户的查询工单状态。 对应 API:GET /api/v2/fetch/is_query + GET /api/v2/fetch/query_status |
| yearning_run_queryA | 在指定数据源执行只读 SELECT 查询并返回结果表格。 注意:本工具仅执行 SELECT,对目标库数据无修改;但 Yearning 会留存查询审计记录, 且查询本身可能产生资源开销(如全表扫描、锁竞争),属「提交操作」而非纯被动读取。 需具备查询权限且已通过查询审核。 对应 API:WS /api/v2/query/results(msgpack 编解码) |
| yearning_order_commentsB | 读取指定工单的全部评论。 对应 API:WS /api/v2/fetch/comment |
| yearning_submit_orderA | 提交 SQL 工单(DDL/DML)。提交前建议先调用 yearning_sql_check 检测。 对应 API:POST /api/v2/common/post |
| yearning_undo_orderA | 撤回自己提交、尚未执行的工单。 对应 API:GET /api/v2/fetch/undo |
| yearning_audit_orderB | 审核工单:agree 同意(末级步骤会触发 SQL 执行)/ reject 驳回 / undo 撤回。 flag 为当前审核步骤序号,可用 yearning_order_timeline 确认; reject 必须提供 reason。本操作会变更线上数据,请谨慎。 对应 API:POST /api/v2/audit/order/state |
| yearning_submit_query_orderA | 提交数据查询申请(开通查询审核时需审核通过后方可 yearning_run_query)。 对应 API:POST /api/v2/query/post |
| yearning_post_commentA | 在指定工单下发表评论。 对应 API:POST /api/v2/fetch/comment |
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/zhouweico/mcp-yearning'
If you have feedback or need assistance with the MCP directory API, please join our Discord server