Mage.ai MCP Integration
KhushiBaby
README
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.