Token导航 LogoToken导航

MCP Server · 数据服务

MCP data engineering

一个通过自然语言提示管理数据库和基础设施的现代数据工程工具,支持PostgreSQL、dbt模型开发和数据分析。

stdio官方级别未说明来源级核验工具 0
数据分析PythonCursor自然语言处理

快速开始

作者 / 组织
Roshr2211
提供方
Roshr2211
运行时
Python

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

MCP data engineering 属于数据服务类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Cursor,有可以直接复制的安装命令;接入前先确认权限范围。

分类

数据服务

传输方式

stdio

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

安装命令

python main.py

客户端配置示例

{
  "mcpServers": {
    "mcp-data-engineering": {
      "command": "python",
      "args": [
        "main.py"
      ]
    }
  }
}

按公开安装命令拼出来的示例,字段名和参数以仓库 README 为准;带 YOUR_API_KEY 这类占位符的位置记得换成自己的值。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

快速驱动数据工程

使用Cursor、uv和MCP操作真实的数据基础架构

该项目展示了 现代数据工程工作流程 使用以下方式管理数据库和基础架构 游标内的自然语言提示。您不用在CLI、SQL客户端和仪表板之间切换,而是使用 聊天操作 由...驱动 模型上下文协议(MCP).

在本项目结束时,您将:

  • 使用提示设置PostgreSQL
  • 通过对话方式管理模式和用户
  • 加载和分析大型数据集
  • 反思和可视化数据库结构
  • 使用快速驱动开发构建dbt模型
  • 运行数据质量测试并通过对话解决问题
  • 在人工智能的帮助下记录数据模型
  • 直接从Cursor聊天中执行分析

______________________________________________________________________

技术栈

工具角色
光标AI原生IDE和ChatOps接口
紫外线快速Python环境+MCP运行器
Docker MCP通过提示进行基础设施控制
Postgres MCPSQL执行和模式自检
dbt MCP转换、测试和文档
PostgreSQL分析数据存储
二苯并噻吩数据转换和建模框架

______________________________________________________________________

为什么这个项目很重要

传统的数据工程工作流程依赖于:

  • CLI繁重的Docker命令
  • 手动执行SQL
  • 用于模式设计、分析和调试的单独工具

该项目引入了 提示原生数据工程模型:

  • 基础设施即对话
  • SQL作为对话
  • 基于AI推理的模式设计
  • 具有上下文感知的调试

这是 ChatOps在数据工程中的应用.

______________________________________________________________________

项目初始化(uv优先)

所有MCP服务器都在由管理的Python环境中运行 uv.

初始化项目

在项目文件夹中打开Cursor的集成终端并运行:

uv init

这将创建:

  • pyproject.toml –依赖性和环境跟踪
  • .gitignore
  • README.md
  • main.py

______________________________________________________________________

安装并验证紫外线

检查是否 uv 已安装:

uv --version

如果未安装:

curl -LsSf https://astral.sh/uv/install.sh | sh

验证安装:

uv --version
uv 自动处理Python环境和依赖关系,无需手动设置virtualenv。

______________________________________________________________________

配置游标MCP服务器

MCP服务器允许Cursor 执行真实的Docker和PostgreSQL操作.

MCP配置

将以下内容添加到Cursor的 工具和MCP 配置:

{
  "mcpServers": {
    "docker": {
      "command": "uv",
      "args": ["run", "--with", "docker-mcp", "docker-mcp", "--access-mode=unrestricted"]
    },
    "postgres": {
      "command": "uv",
      "args": ["run", "--with", "postgres-mcp", "postgres-mcp", "--access-mode=unrestricted"],
      "env": {
        "DATABASE_URI": "postgresql://app:app@localhost:5432/demo"
      }
    },
    "dbt": {
      "command": "uv",
      "args": ["run", "--with", "dbt-postgres", "dbt-mcp"],
      "env": {
        "DBT_PROJECT_DIR": "./MCP_dbt"
      }
    }
  }
}

激活MCP

  1. 重新启动游标
  2. 打开 工具和MCP
  3. 确保 码头工人, Postgres,以及 二苯并噻吩 显示绿色指示器

______________________________________________________________________

通过Prompts进行数据工程

从这一点开始, 所有操作都发生在Cursor聊天中.

______________________________________________________________________

1️配置PostgreSQL(基础设施提示)

Using the Docker MCP, create a PostgreSQL 16 container named pg-local
on port 5432 with database demo and user/password app

此提示:

  • 提取PostgreSQL映像
  • 创建并运行容器
  • 初始化数据库

______________________________________________________________________

配置用户和架构

Using the Postgres MCP, create an application user named app,
grant it permissions on the demo database,
and create a schema called app owned by this user

为什么这很重要

  • 符合实际生产安全实践
  • 将管理和应用程序访问分开
  • 在妥协的情况下限制爆炸半径

______________________________________________________________________

加载大规模演示数据

该数据集模拟了一个生产电子商务系统:

  • 2000名客户
  • 1000个产品
  • 10000个订单
  • 30000+订单项目

加载数据:

cat demo_data.sql | docker exec -i pg-local psql -U app -d demo

这模仿了 大量摄入,一项核心数据工程任务。

______________________________________________________________________

验证基础结构状态

Using the Docker MCP, list all running containers.
Then using the Postgres MCP, list all tables in the demo database.

确认:

  • 集装箱健康状况
  • 数据库连接
  • 模式正确性

______________________________________________________________________

模式反思与可视化

Using the Postgres MCP, read the database schema and
sample 3 rows from each table.
Create a Mermaid ER diagram with example values.
Render in chat only.

替换:

  • pgAdmin
  • ER图工具
  • 手册文档

______________________________________________________________________

dbt模型开发与测试

该项目包括 dbt项目 (MCP_dbt/)使用提示建立分析模型。

运行dbt模型
Using the DBT MCP, run the customer_analytics model 
and summarize the results concisely in a table.

这 customer_analytics 模型创建了一个 客户360视图 与:

  • 寿命值计算
  • 订单频率指标
  • 客户细分(非活跃、偶尔、定期、VIP)
  • 最喜欢的产品类别
  • 客户生命周期指标
运行数据质量测试
Using the DBT MCP, run all tests for the customer_analytics model
and show me the results

测试验证:

  • NOT NULL约束
  • 唯一约束
  • 分段的可接受值
  • 数据质量规则
使用AI辅助修复失败的测试
Fix the failing test(s) in my customer_analytics model. Update the model
file to resolve the issue and explain what you changed.

光标将:

  • 确定根本原因
  • 更新SQL模型
  • 重新运行测试以确认修复
  • 解释所做的更改
使用AI的文档模型
Update my existing models/schema.yml file to add detailed documentation.
Keep the tests I already added, but enhance the descriptions for the
customer_analytics model and its columns.

创建生产就绪文档,该文档:

  • 解释业务逻辑
  • 文档数据沿袭
  • 明确栏目目的
  • 帮助其他团队成员理解模型

______________________________________________________________________

示例分析提示

Show the top 10 customers by lifetime value
Find products with high order volume but low inventory
Which countries generate the highest revenue per customer?
Explain which indexes would improve order lookup performance

光标将:

  • 生成SQL
  • 执行查询
  • 解释结果
  • 建议优化

______________________________________________________________________

这个项目展示了什么

  • 快速驱动的基础设施配置
  • 人工智能辅助模式和角色管理
  • 会话式SQL分析
  • 生产型数据库安全
  • 通过提示进行dbt模型开发
  • 人工智能辅助数据质量测试
  • 带有解释的自动测试修复
  • 数据模型的文档生成
  • 数据工程工作流的ChatOps

______________________________________________________________________

数据库设置

PostgreSQL容器

该项目使用名为的PostgreSQL 16容器 pg-local 具有以下配置:

  • 容器名称: pg-local
  • 端口:5432(主机)→ 5432 (集装箱)
  • 用户: app
  • 密码: app
  • 数据库: demo
  • 模式: app

数据库模式

这 app 架构包含以下表:

表格
  1. 客户

- customer_id (PK,整数) - email (varchar) - registration_date (日期) - country (varchar) - tier (varchar)

  1. 订单

- order_id (PK,整数) - customer_id (FK → 客户.customer_id) - order_date (日期) - status (varchar) - total_amount (数字) - region (varchar)

  1. 订单项目

- item_id (PK,整数) - order_id (FK → orders.order_id) - product_id (FK → products.product_id) - quantity (整数) - price (数字)

  1. 产品

- product_id (PK,整数) - name (varchar) - category (varchar) - price (数字) - stock_quantity (整数)

关系

  • 客户→ 订单(一对多)
  • 订单→ 订购项目(一对多)
  • 产品→ 订购项目(一对多)

数据库优化

已创建以下索引以优化查询性能:

  1. idx_orders_customer_id -索引在 orders.customer_id (外键)
  2. idx_order_items_order_id -索引在 order_items.order_id (外键)
  3. idx_order_items_product_id -索引在 order_items.product_id (外键)

性能指标

  • 缓存命中率: 95.51%
  • 行数:

- 客户:2000 - 订单数量:10000 - 订单数量:30000 - 产品数量:1000

使用的提示

本节记录了用于设置和配置数据库的提示/命令:

1.创建PostgreSQL容器

Using the Docker MCP, create a PostgreSQL 16 container named
pg-local on port 5432 with user/password 'app' and database 'demo'

2.配置数据库用户和架构

Using the Postgres MCP, configure the database user named 'app' with 
password 'app', grant it all permissions on the demo database, and 
create a schema called 'app' owned by this user

3.列出容器和表格

Using the Docker MCP, list all running containers. Then using the
Postgres MCP, list all tables in the demo database.

4.生成数据库架构图

Using the Postgres MCP, read the database schema and 
sample 3 rows from each table. Create a Mermaid diagram
including  the example values. Render the diagram in
the chat only, no files. Use a high-contrast style.

5.数据库审计

Using PostgreSQL MCP, audit my database (app schema: customers, orders, order_items, products).

Run these checks:
1. EXPLAIN ANALYZE on a join query between orders and customers - show execution time and scan types
2. Missing indexes - check which tables lack indexes on foreign keys
3. Cache hit rate - query pg_stat_database

Present findings in a table format with columns: Issue | Impact | Priority

Then provide:
- Top 3 optimization recommendations with exact SQL to implement

Keep responses concise but include key metrics (execution times, cache hit %, row counts).

6.创建推荐索引

Using the Postgres MCP, create ALL the indexes you recommended in your audit. Execute each CREATE INDEX statement and confirm when all indexes are created.

7.运行dbt模型

Using the DBT MCP, run the customer_analytics model 
and summarize the results concisely in a table.

8.测试dbt模型

Using the DBT MCP, run all tests for the customer_analytics model
and show me the results

9.修复失败的测试

Fix the failing test(s) in my customer_analytics model. Update the model
file to resolve the issue and explain what you changed.

10.记录dbt模型

Update my existing models/schema.yml file to add detailed documentation.
Keep the tests I already added, but enhance the descriptions for the
customer_analytics model and its columns (customer_id, email,
lifetime_value, customer_segment, total_orders).

Make the descriptions clear and helpful for other data team members.

用法

运行应用程序

python main.py

连接到数据库

psql -h localhost -p 5432 -U app -d demo

密码: app

使用MCP工具

本项目演示了MCP工具在以下方面的使用:

  • Docker MCP:集装箱管理

- 创建和管理PostgreSQL容器 - 列出正在运行的容器 - 查看容器日志

  • PostgreSQL MCP:数据库操作

- 执行SQL查询 - 分析查询性能(解释分析) - 数据库健康检查 - 索引建议 - 模式检查

  • dbt MCP:数据转换和建模

- 运行dbt模型 - 执行数据质量测试 - 构建分析模型 - 生成文档 - 管理数据转换

数据库审核结果

对数据库进行了全面审计,确定:

发现的问题

问题影响优先级
orders.customer_id缺少索引对10000个订单进行顺序扫描高
order_items.order_id缺少索引与30000个order_items连接缓慢高
order_items.product_id上缺少索引产品查找的顺序扫描中等
计划时间长(18.5ms)计划超过执行时间中等
缓存命中率95.51%良好但可以提高低

已应用优化

所有推荐的索引都是为了提高查询性能而创建的。

dbt项目结构

该项目包括一个位于 MCP_dbt/:

MCP_dbt/
├── models/
│   └── example/
│       ├── customer_analytics.sql    # Customer 360 analytics model
│       ├── my_first_dbt_model.sql    # Example model
│       ├── my_second_dbt_model.sql   # Example model
│       └── schema.yml                 # Model documentation & tests
├── dbt_project.yml                    # dbt project configuration
└── profiles.yml                        # Database connection settings

关键dbt型号

客户分析

一个全面的客户分析模型,提供:

  • 终生价值:每位客户的总收入
  • 订单指标:总订单、平均订单值、订单频率
  • 分割:自动客户细分(非活跃、偶尔、定期、VIP)
  • 产品偏好:每位客户最喜欢的产品类别
  • 生命周期指标:注册后天数,客户寿命

应用的测试:

  • not_null 关于临界柱
  • unique 关于customer_id
  • accepted_values 论客户细分

最近的改进:

  • 修复了无订单客户的NULL处理(lifetime_value默认为0)
  • 通过详细的列描述增强文档
  • 生产就绪模式文档

dbt文档命令

您可以从终端构建和查看此项目的dbt文档:

# From the project root
uv run dbt --project-dir MCP_dbt docs generate
uv run dbt --project-dir MCP_dbt docs serve --port 8080

然后打开 http://localhost:8080 在浏览器中浏览:

  • 模型文档(包括 customer_analytics)
  • 列级描述
  • 测试和谱系

发展

Python版本

本项目使用Python 3.14(在 .python-version).

依赖项

看 pyproject.toml 对于项目依赖关系。该项目使用:

  • docker-mcp 用于Docker操作
  • postgres-mcp 用于PostgreSQL操作
  • dbt-postgres 用于dbt转换

dbt配置

dbt项目连接到 demo 数据库使用 app 用户。连接详细信息在中配置 MCP_dbt/profiles.yml.

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

数据工程Python本地部署自然语言处理PostgreSQLdbt数据分析

支持客户端

Cursor

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

用自然语言查库

不用手写 SQL,直接问数据,让模型组织查询语句。

数据巡检

定期拉指标、做对比,把异常项整理成一段说明。

打通业务数据

把数据库、数仓和接口接进同一个上下文,减少导出再上传。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在数据服务场景里让模型直接调用外部能力的人。
  • 已经在用 Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
MCP data engineering

MCP World · 本页

0stdio有1 个2026-05-17
Memory 9d25f64e

MCP World

9未说明未标注1 个2026-05-17
Prisma MCP Server

MCP World

0stdio有3 个2026-05-17
Astr Bot

MCP World

0stdio有1 个2026-05-17
Getzep MCP

MCP World

9stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

MCP data engineering 怎么安装?

公开资料给出的安装命令是 python main.py,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

MCP data engineering 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

MCP data engineering 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP data engineering 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

MCP data engineering 支持哪些客户端?

公开资料标注支持 Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP