@rubyls/yearning-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@rubyls/yearning-mcplist pending audit orders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@rubyls/yearning-mcp
Yearning SQL 审核平台的 MCP Server(TypeScript)。不只读查询,还覆盖完整工单能力:提交 DDL/DML、审核(同意/驳回)、撤回、查询申请、评论,以及数据源/表结构探查。
基于 Yearning REST / WebSocket API(/api/v2,JWT Bearer)。列表类与查询执行走 WebSocket,其余为 REST。
仓库:https://github.com/rubyLs/yearning_mcp
快速接入(推荐)
发布到 npm 后,在 Cursor / Claude Desktop 的 MCP 配置中:
{
"mcpServers": {
"yearning": {
"command": "npx",
"args": ["-y", "@rubyls/yearning-mcp"],
"env": {
"YEARNING_URL": "http://your-yearning:8000",
"YEARNING_USERNAME": "your-user",
"YEARNING_PASSWORD": "your-password",
"YEARNING_LOGIN_TYPE": "general",
"YEARNING_READ_ONLY": "false"
}
}
}
}也可全局安装后使用:
npm i -g @rubyls/yearning-mcp
yearning-mcpRelated MCP server: Universal Database MCP Server
Docker(单容器 HTTP)
镜像已发布到 Docker Hub:rubyls/yearning-mcp
# 直接拉取运行(推荐)
docker run -d --name yearning-mcp -p 8080:8080 \
-e MCP_AUTH_TOKEN=your-strong-token \
-e YEARNING_URL=http://your-yearning:8000 \
-e YEARNING_USERNAME=your-user \
-e YEARNING_PASSWORD=your-password \
-e YEARNING_READ_ONLY=false \
rubyls/yearning-mcp:latest
# 指定版本
# rubyls/yearning-mcp:1.1.1本地构建(可选):
docker build -t yearning-mcp:latest .
# 或 npm run docker:build健康检查:
GET http://localhost:8080/healthMCP 端点:
http://localhost:8080/mcpHeader:
Authorization: Bearer <MCP_AUTH_TOKEN>
Cursor 连接示例:
{
"mcpServers": {
"yearning": {
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer your-strong-token"
}
}
}
}容器内访问宿主机 Yearning 时,macOS/Windows 可用
host.docker.internal代替localhost。
维护者推送镜像:
npm run docker:build
npm run docker:push
# 需已 docker login,镜像会打上 rubyls/yearning-mcp:1.1.1 与 :latest功能一览
只读工具(14)
工具 | 说明 |
| 当前用户与可查询数据源 |
| 数据源列表 |
| 库列表 |
| 表列表 |
| 表结构(字段 + 索引) |
| 提交前 SQL 审核检测 |
| 我的工单列表 |
| 工单详情 |
| 审核时间线 / 步骤(含 |
| 回滚 SQL |
| 待我审核的工单 |
| 查询审核开关与我的查询工单状态 |
| 只读 SELECT(msgpack WebSocket) |
| 读取工单评论 |
写工具(5,YEARNING_READ_ONLY=false 时注册)
工具 | 说明 |
| 提交 SQL 工单(需 |
| 撤回未执行工单(需 |
| 审核:agree / reject / undo(需 |
| 提交查询申请 |
| 发表工单评论 |
工单状态:0 已驳回 / 1 执行中 / 2 待审核 / 3 已完成 / 4 已终止 / 5 待执行 / 6 已撤回。
推荐流程:
yearning_sql_check → yearning_submit_order → yearning_order_timeline → yearning_audit_order环境变量
变量 | 说明 | 默认 |
| Yearning 地址 |
|
| 登录用户名 | (必填) |
| 登录密码 | (必填) |
|
|
|
| 请求超时(秒) |
|
|
|
|
| 跳过 TLS 校验 |
|
|
|
|
| HTTP 监听 |
|
| HTTP Bearer 鉴权 | (不设则不鉴权) |
| 无状态 HTTP |
|
HTTP 远程模式
MCP_TRANSPORT=streamable-http \
MCP_HOST=0.0.0.0 MCP_PORT=8080 \
MCP_AUTH_TOKEN=your-strong-token \
YEARNING_URL=http://your-yearning:8000 \
YEARNING_USERNAME=your-user \
YEARNING_PASSWORD=your-password \
YEARNING_READ_ONLY=false \
npx -y @rubyls/yearning-mcp客户端连接:http://localhost:8080/mcp,Header:Authorization: Bearer your-strong-token。
健康检查:GET /health(免鉴权)。
从源码运行
git clone https://github.com/rubyLs/yearning_mcp.git
cd yearning_mcp
npm install
npm run build
npm startCursor 本地调试:
{
"mcpServers": {
"yearning": {
"command": "node",
"args": ["/absolute/path/to/yearning_mcp/dist/index.js"],
"env": {
"YEARNING_URL": "http://localhost:8000",
"YEARNING_USERNAME": "your-user",
"YEARNING_PASSWORD": "your-password",
"YEARNING_READ_ONLY": "false"
}
}
}
}对话示例
连上 Yearning,列出我有权限的数据源把这条建表 SQL 在 dev 数据源做检测,没问题就提工单:
CREATE TABLE t_demo (id INT PRIMARY KEY, name VARCHAR(64));列出待我审核的工单;工单 XXX 没问题,帮我同意(先看 timeline 拿 flag)在 order_db 的 user 库查最近 7 天注册账号,前 100 条开发
npm run dev # tsx 直接跑 src
npm run build # 编译到 dist/
npm start # node dist/index.js
npm publish --access public # 发布到 npm(需先 npm login)已知限制
部分
/fetch/*接口使用 GET + JSON Body;若前置代理丢弃 GET body,列表会静默为空。WebSocket 鉴权依赖
Sec-WebSocket-Protocol透传裸 JWT,且需正确Origin。查询审核开启时,
yearning_run_query需先有已批准的查询工单。管理端能力(用户/数据源/规则管理)未包含,请在 Yearning 控制台操作。
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceMCP server for connecting to databases (PostgreSQL, MySQL, SQL Server, Redis) enabling SQL queries, table exploration, and Redis key-value operations.Last updated1MIT
- Flicense-qualityDmaintenanceA versatile MCP server that connects to multiple relational databases (MySQL, PostgreSQL, Oracle, SQL Server, SQLite) and enables secure read-only SQL query execution and metadata access.Last updated4
- Alicense-qualityCmaintenanceA production-ready MCP server for MySQL database operations, providing secure HTTP endpoints for read-only queries, performance analysis, and server monitoring.Last updated649MIT
- Alicense-qualityFmaintenanceRead-only MCP server for SQL databases (SQL Server, Postgres, SQLite) with multi-server support and three-layer safety using AST validation and linting.Last updatedMIT
Related MCP Connectors
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
MCP server for managing Prisma Postgres.
MCP server for interacting with the Supabase platform
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/rubyLs/yearning_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server