Mage.ai MCP Integration

Mage.ai MCP Integration

site icon
2025.04.15 0
Python数据管道管理AI 助手集成开发效率
Mage.ai MCP Integration 是一个为 Mage.ai 数据管道设计的 Model Context Protocol (MCP) 集成服务,旨在帮助 AI 助手(如 Anthropic 的 Claude)高效地与 Mage 数据管道进行交互。该服务提供了浏览、编辑、执行和创建数据管道的功能,支持搜索管道组件,并能与 Claude Desktop 无缝集成。
View on GitHub

Overview

基本能力

产品定位

Mage.ai MCP Integration 是一个专为 Mage.ai 数据管道设计的集成服务,旨在通过 MCP 协议实现 AI 助手与数据管道的无缝交互。

核心功能

  • 浏览管道:查看所有 Mage.ai 管道及其组件
  • 查看和编辑代码:读取和修改块代码
  • 执行管道:运行整个管道或单个块
  • 搜索功能:按名称、类型或内容查找块
  • 管道创建:从头开始创建新的管道和块

适用场景

  • AI 助手与数据管道的交互
  • 数据管道的管理和维护
  • 数据管道的开发和调试

工具列表

  • list_all_pipelines() - 列出所有管道的详细信息
  • get_pipeline_details(pipeline_uuid) - 获取管道信息
  • list_pipeline_blocks(pipeline_uuid) - 列出管道中的块
  • get_block_content(pipeline_uuid, block_uuid) - 获取块代码
  • create_pipeline(name, description, pipeline_type) - 创建新管道
  • create_block(pipeline_uuid, name, block_type, language, content, upstream_blocks) - 创建块
  • update_block_content(pipeline_uuid, block_uuid, content) - 更新块代码
  • execute_pipeline(pipeline_uuid) - 运行管道
  • execute_block(pipeline_uuid, block_uuid) - 运行特定块
  • get_pipeline_code(pipeline_uuid) - 获取完整的管道代码

使用教程

使用依赖

# Clone the repository
git clone https://github.com/yourusername/mage-mcp.git
cd mage-mcp

# Install dependencies
pip install -r requirements.txt

安装教程

# Using stdio transport (default)
python run_server.py

# Using SSE transport
python run_server.py --transport sse --host localhost --port 3000

# Additional options
python run_server.py --api-url http://your-mage-instance:6789/api/ --api-key your_key --debug

调试方式

mcp dev run_server.py

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。