Install any skill in seconds. Free to start, no credit card required.
Get Started Free →MindsDB MCP服务器交互技能,用于通过自然语言查询和操作200+企业级数据源。当用户需要查询数据库、分析数据、创建AI模型、连接数据源(MySQL、PostgreSQL、MongoDB、Excel、CSV、Gmail、Slack等)、执行SQL查询、进行数据预测、构建知识库(RAG)、智能问答、文档检索或任何与数据库交互的任务时使用此技能。即使没有明确提到MindsDB,只要涉及数据库操作、数据分析、数据查询、知识库构建、AI问答或需要连接多个数据源的场景,都应该使用此技能。
.claude/skills/leoyeai-mindsdb-mcp-skill/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 209% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 142% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 179% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 201% | 0% |
MindsDB是一个AI大规模数据查询引擎,支持连接200+企业级数据源,通过MCP(Model Context Protocol)协议提供统一的数据库操作接口。本技能帮助你通过自然语言与各种数据库交互。
本技能采用 Agent + MCP 架构,与直接使用MindsDB有所不同:
This skill uses an Agent + MCP architecture, which differs from direct MindsDB usage:
直接使用MindsDB / Direct MindsDB Usage:
用户 → MindsDB GUI/SQL → 数据源/AI模型
User → MindsDB GUI/SQL → Data Sources/AI Models本技能方式 / This Skill's Approach:
用户(自然语言)→ Claude Agent → MindsDB MCP Server → 数据源/AI模型
User (Natural Language) → Claude Agent → MindsDB MCP Server → Data Sources/AI Models传统方式 / Traditional Approach:
sql-- 需要手动编写SQL / Need to write SQL manually CREATE DATABASE my_postgres WITH ENGINE = 'postgres', PARAMETERS = {"host": "127.0.0.1", ...}; SELECT * FROM my_postgres.products;
本技能方式 / This Skill's Approach:
用户: "连接到Postgres数据库并查询产品信息"
User: "Connect to Postgres database and query product information"
Agent自动完成:
1. 连接数据库 / Connect to database
2. 生成SQL / Generate SQL
3. 执行查询 / Execute query
4. 返回结果 / Return resultsClaude Agent (对话界面 / Chat Interface)
↓ (自然语言 / Natural Language)
MCP Client (内置 / Built-in)
↓ (MCP协议 / MCP Protocol)
MindsDB MCP Server (MindsDB提供的MCP接口 / MindsDB MCP Interface)
↓ (SQL/API)
MindsDB Server (核心引擎 / Core Engine)
↓ (连接器 / Connectors)
数据源 / Data Sources (MySQL, Postgres, 文件 / Files, etc.)Non-technical users, rapid prototyping, automated workflows
Scenarios requiring natural language interaction
Advanced users requiring fine-grained SQL control
MindsDB支持连接多种数据源:
将自然语言转换为SQL查询,支持:
使用MindsDB创建预测模型:
基于检索增强生成技术构建智能知识库:
MindsDB的AI驱动的智能分析能力:
当用户提出数据库相关需求时,首先理解:
根据用户需求,选择合适的操作:
使用MindsDB MCP工具执行操作,处理结果。
以清晰易懂的方式展示结果,包括:
用户输入: "查询上个月销售额最高的产品" 处理:
用户输入: "SELECT FROM orders WHERE date > '2024-01-01'" 处理:
用户输入: "预测下个月的销售额" 处理:
用户输入: "连接到MySQL数据库" 处理:
用户输入: "创建一个技术文档知识库" 处理:
用户输入: "根据技术文档回答设备报错0xE1怎么处理" 处理:
用户输入: "分析销售数据,找出增长趋势和异常" 处理:
用户输入: "预测下季度的销售额" 处理:
用户输入: "为用户推荐可能感兴趣的产品" 处理:
使用清晰的表格格式展示数据,包括:
提供详细的错误说明:
显示操作进度和状态:
用户: "分析2024年各地区的销售趋势" 操作:
用户: "预测哪些客户可能会流失" 操作:
用户: "查询库存不足的产品" 操作:
用户: "创建一个技术文档知识库,用于智能问答" 操作:
用户: "根据产品手册回答用户问题" 操作:
用户: "分析销售数据,找出增长机会和风险" 操作:
用户: "预测哪些客户可能会流失,并提供挽留建议" 操作:
用户: "为用户推荐他们可能喜欢的产品" 操作:
用户: "获取工业设备的运行情况" 操作:
说明: 示例中的表名和字段名仅为演示,Agent会自动适配你的实际数据库结构。
示例查询:
用户: "查询1号车间过去24小时的温度和压力数据"
Agent:
1. 连接TDengine数据库
2. 自动查询表结构,发现实际表名和字段
3. 根据实际结构生成SQL:
SELECT ts, temperature, pressure
FROM your_actual_table_name
WHERE location_id = 'workshop_001'
AND ts > NOW() - INTERVAL 24 HOUR
4. 返回结果和趋势分析
用户: "检查所有设备的运行状态,找出异常设备"
Agent:
1. 查询设备状态表(自动发现实际表名)
2. 根据实际字段名筛选异常设备
3. 分析异常原因
4. 提供维护建议用户: "分析工厂生产线的能耗情况" 操作:
案例背景: 使用MindsDB AI Agent分析TDengine时序数据库中的工业设备数据
数据规模:
设备类型:
Agent执行的操作:
sql_db_list_tables, sql_db_schema)关键发现:
详细案例: 参见 industrial-monitoring-case.md
详细的技术文档位于 references/ 目录:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | pass→pass | 14,562 | 17,583 | +21% | 1 | 1 | 0% | 3,702 | 8,755 | +136% | 0 | 0 | — |
case-06 | pass→pass | 13,999 | 17,057 | +22% | 1 | 1 | 0% | 3,247 | 8,653 | +166% | 0 | 0 | — |
case-07 | fail→pass | 12,406 | 11,238 | -9% | 1 | 1 | 0% | 2,262 | 6,981 | +209% | 0 | 0 | — |
case-08 | fail→pass | 26,874 | 12,137 | -55% | 1 | 1 | 0% | 2,916 | 7,043 | +142% | 0 | 0 | — |
case-01 | fail→fail | 11,558 | 3,658 | -68% | 1 | 1 | 0% | 2,201 | 5,330 | +142% | 0 | 0 | — |
case-02 | fail→fail | 15,192 | 20,322 | +34% | 1 | 1 | 0% | 2,453 | 8,132 | +232% | 0 | 0 | — |
case-03 | fail→pass | 15,481 | 14,153 | -9% | 1 | 1 | 0% | 2,555 | 6,647 | +160% | 0 | 0 | — |
case-04 | pass→pass | 20,733 | 15,506 | -25% | 1 | 1 | 0% | 3,601 | 7,541 | +109% | 0 | 0 | — |
case-09 | fail→pass | 15,280 | 12,670 | -17% | 1 | 1 | 0% | 2,524 | 7,032 | +179% | 0 | 0 | — |
case-10 | fail→pass | 10,557 | 4,290 | -59% | 1 | 1 | 0% | 1,812 | 5,458 | +201% | 0 | 0 | — |
case-11 | pass→pass | 17,383 | 7,766 | -55% | 1 | 1 | 0% | 2,653 | 5,885 | +122% | 0 | 0 | — |
case-12 | fail→pass | 20,663 | 15,424 | -25% | 1 | 1 | 0% | 3,479 | 7,275 | +109% | 0 | 0 | — |
case-13 | fail→pass | 13,360 | 10,182 | -24% | 1 | 1 | 0% | 2,297 | 6,492 | +183% | 0 | 0 | — |
case-14 | fail→pass | 15,592 | 13,095 | -16% | 1 | 1 | 0% | 2,842 | 7,301 | +157% | 0 | 0 | — |
case-15 | fail→pass | 21,934 | 11,413 | -48% | 1 | 1 | 0% | 3,417 | 6,757 | +98% | 0 | 0 | — |
case-16 | fail→pass | 20,220 | 16,517 | -18% | 1 | 1 | 0% | 3,300 | 7,626 | +131% | 0 | 0 | — |
case-17 | fail→pass | 16,716 | 14,153 | -15% | 1 | 1 | 0% | 2,672 | 7,124 | +167% | 0 | 0 | — |
case-18 | fail→pass | 14,853 | 12,920 | -13% | 1 | 1 | 0% | 2,848 | 6,894 | +142% | 0 | 0 | — |
case-19 | fail→pass | 19,293 | 16,680 | -14% | 1 | 1 | 0% | 3,236 | 8,451 | +161% | 0 | 0 | — |
case-20 | fail→fail | 15,060 | 2,739 | -82% | 1 | 1 | 0% | 2,938 | 5,063 | +72% | 0 | 0 | — |
case-21 | fail→fail | 9,460 | 3,497 | -63% | 1 | 1 | 0% | 2,020 | 4,901 | +143% | 0 | 0 | — |
case-22 | fail→fail | 19,388 | 4,844 | -75% | 1 | 1 | 0% | 3,184 | 5,067 | +59% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 20 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.