Mage.ai MCP Integration
KhushiBaby
README
Mage.ai MCP 集成
一个为 Mage.ai 提供的全面的模型上下文协议 (MCP) 集成,允许像 Anthropic 的 Claude 这样的 AI 助手高效地处理 Mage 数据管道。
特性
- 浏览管道: 探索所有 Mage.ai 管道及其组件
- 查看和编辑代码: 读取和修改代码块
- 执行管道: 运行整个管道或单个代码块
- 搜索功能: 通过名称、类型或内容查找代码块
- 创建管道: 从头开始创建新的管道和代码块
安装
# 克隆仓库
git clone https://github.com/yourusername/mage-mcp.git
cd mage-mcp
# 安装依赖
pip install -r requirements.txt
配置
服务器可以使用环境变量或命令行参数进行配置:
MAGE_API_URL
: Mage.ai API 的 URL (默认:http://localhost:6789/api/
)MAGE_API_KEY
: 用于身份验证的 API 密钥 (如果需要)
创建一个 .env
文件用于持久配置:
MAGE_API_URL=http://localhost:6789/api/
MAGE_API_KEY=your_api_key_if_needed
使用
运行服务器
使用提供的脚本启动 MCP 服务器:
# 使用 stdio 传输 (默认)
python run_server.py
# 使用 SSE 传输
python run_server.py --transport sse --host localhost --port 3000
# 附加选项
python run_server.py --api-url http://your-mage-instance:6789/api/ --api-key your_key --debug
使用 Claude Desktop 安装
为了获得最佳体验,请直接使用 Claude Desktop 安装此服务器:
# 使用 mcp CLI
mcp install run_server.py --name "Mage.ai Manager"
# 使用环境变量
mcp install run_server.py -v MAGE_API_URL=http://localhost:6789/api/ -v MAGE_API_KEY=your_key
开发模式
用于测试和开发:
mcp dev run_server.py
MCP 资源和工具
资源
mage://pipelines
- 列出所有管道mage://pipelines/{pipeline_uuid}
- 获取管道详细信息mage://pipelines/{pipeline_uuid}/blocks
- 列出管道中的代码块mage://pipelines/{pipeline_uuid}/blocks/{block_uuid}
- 获取代码块详细信息mage://pipelines/{pipeline_uuid}/blocks/{block_uuid}/content
- 获取代码块代码mage://pipelines/{pipeline_uuid}/content
- 获取整个管道内容mage://pipelines/{pipeline_uuid}/execution
- 获取管道执行详情mage://blocks/search/{query}
- 按名称、类型或内容搜索代码块
工具
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)
- 获取完整的管道代码
示例交互
User: Show me all the pipelines in Mage.ai.
Claude: Let me check what pipelines are available in your Mage.ai instance.
[Lists all pipelines with descriptions and types]
User: Can you show me the blocks in the data_ingestion pipeline?
Claude: Here are all the blocks in the data_ingestion pipeline:
[Lists all blocks with their types, languages, and status]
User: I need to modify the 'transform_data' block to fix a bug.
Claude: Let me help you with that. First, let's look at the current code:
[Shows the current block code]
Here's how we can fix the bug:
[Explains the issue and suggests changes]
Would you like me to update the block with these changes?
User: Yes, please update it.
Claude: I've updated the block. Here's the new content:
[Shows the updated code]
The changes have been saved successfully.
贡献
欢迎贡献!请随时提交 Pull Request。
许可证
此项目根据 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件。
推荐服务器
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
MCP Package Docs Server
促进大型语言模型高效访问和获取 Go、Python 和 NPM 包的结构化文档,通过多语言支持和性能优化来增强软件开发。
Claude Code MCP
一个实现了 Claude Code 作为模型上下文协议(Model Context Protocol, MCP)服务器的方案,它可以通过标准化的 MCP 接口来使用 Claude 的软件工程能力(代码生成、编辑、审查和文件操作)。
@kazuph/mcp-taskmanager
用于任务管理的模型上下文协议服务器。它允许 Claude Desktop(或任何 MCP 客户端)在基于队列的系统中管理和执行任务。
mermaid-mcp-server
一个模型上下文协议 (MCP) 服务器,用于将 Mermaid 图表转换为 PNG 图像。
Jira-Context-MCP
MCP 服务器向 AI 编码助手(如 Cursor)提供 Jira 工单信息。

Linear MCP Server
一个模型上下文协议(Model Context Protocol)服务器,它与 Linear 的问题跟踪系统集成,允许大型语言模型(LLM)通过自然语言交互来创建、更新、搜索和评论 Linear 问题。

Sequential Thinking MCP Server
这个服务器通过将复杂问题分解为顺序步骤来促进结构化的问题解决,支持修订,并通过完整的 MCP 集成来实现多条解决方案路径。
Curri MCP Server
通过管理文本笔记、提供笔记创建工具以及使用结构化提示生成摘要,从而实现与 Curri API 的交互。