- Mage.ai MCP Integration
Mage.ai MCP Integration
Content
Mage.ai MCP Integration
A comprehensive Model Context Protocol (MCP) integration for Mage.ai, allowing AI assistants like Anthropic's Claude to efficiently work with Mage data pipelines.
Features
- Browse Pipelines: Explore all Mage.ai pipelines and their components
- View and Edit Code: Read and modify block code
- Execute Pipelines: Run entire pipelines or individual blocks
- Search Functionality: Find blocks by name, type, or content
- Pipeline Creation: Create new pipelines and blocks from scratch
Installation
# Clone the repository
git clone https://github.com/yourusername/mage-mcp.git
cd mage-mcp
# Install dependencies
pip install -r requirements.txt
Configuration
The server can be configured using environment variables or command-line arguments:
MAGE_API_URL: URL for the Mage.ai API (default:http://localhost:6789/api/)MAGE_API_KEY: API key for authentication (if required)
Create a .env file for persistent configuration:
MAGE_API_URL=http://localhost:6789/api/
MAGE_API_KEY=your_api_key_if_needed
Usage
Running the Server
Use the provided script to start the MCP server:
# 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
Installing with Claude Desktop
For the best experience, install this server directly with Claude Desktop:
# Using mcp CLI
mcp install run_server.py --name "Mage.ai Manager"
# With environment variables
mcp install run_server.py -v MAGE_API_URL=http://localhost:6789/api/ -v MAGE_API_KEY=your_key
Development Mode
For testing and development:
mcp dev run_server.py
MCP Resources and Tools
Resources
mage://pipelines- List all pipelinesmage://pipelines/{pipeline_uuid}- Get pipeline detailsmage://pipelines/{pipeline_uuid}/blocks- List blocks in a pipelinemage://pipelines/{pipeline_uuid}/blocks/{block_uuid}- Get block detailsmage://pipelines/{pipeline_uuid}/blocks/{block_uuid}/content- Get block codemage://pipelines/{pipeline_uuid}/content- Get entire pipeline contentmage://pipelines/{pipeline_uuid}/execution- Get pipeline execution detailsmage://blocks/search/{query}- Search blocks by name, type or content
Tools
list_all_pipelines()- List all pipelines with detailsget_pipeline_details(pipeline_uuid)- Get pipeline informationlist_pipeline_blocks(pipeline_uuid)- List blocks in a pipelineget_block_content(pipeline_uuid, block_uuid)- Get block codecreate_pipeline(name, description, pipeline_type)- Create a new pipelinecreate_block(pipeline_uuid, name, block_type, language, content, upstream_blocks)- Create a blockupdate_block_content(pipeline_uuid, block_uuid, content)- Update block codeexecute_pipeline(pipeline_uuid)- Run a pipelineexecute_block(pipeline_uuid, block_uuid)- Run a specific blockget_pipeline_code(pipeline_uuid)- Get complete pipeline code
Example Interactions
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.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.