Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
n8n workflow to MCP server connector
This project converts n8n workflows into MCP servers that agent tools can call. The flow is: import or upload a workflow, map credentials, deploy it to n8n, and then use the generated MCP endpoint from Claude, Cursor, or another MCP client.
Builders who want to expose n8n workflows as tools inside Claude, Cursor, or other MCP clients.
You can turn an existing n8n workflow into a callable agent tool instead of rebuilding the automation from scratch.
What it does
Workflow import and deployment
Imports n8n template URLs or workflow JSON, then deploys the workflow to an n8n instance.
Credential mapping
Lets you map required credentials through the UI and stores workflow configuration in Supabase.
MCP server routing
Creates a per-workflow MCP endpoint such as `/mcp/{workflow_id}/{api_key}` and lists registered servers at `/list`.
Dual app structure
Combines a Flask agent marketplace for workflow management with a FastAPI MCP router for serving tools.
Workflow parsing
Parses n8n workflows to detect nodes and required credentials before deployment.
How to get it
- 1Clone the repository
git clone https://github.com/Super-Chain/N8N2MCP.git cd N8N2MCP
- 2Configure environment
cp env.example .env # Edit .env with your actual configuration values
- 3Start with Docker Compose
docker-compose up -d
- 4View logs
docker-compose logs -f
- 5Clone the repository
git clone https://github.com/Super-Chain/N8N2MCP.git cd N8N2MCP
- 6Install dependencies
pip install -r requirements.txt
README
Transform your N8N workflows into MCP servers instantly
A comprehensive platform that converts N8N workflows into Model Context Protocol (MCP) servers, enabling seamless integration with AI assistants like Claude, Cursor, and other MCP-compatible platforms. Build powerful automation tools using N8N's visual workflow editor and deploy them as callable AI functions.

β¨ How to use
-
Copy the N8N template link/JSON from any workflow
-
Map your credentials through our intuitive interface
-
Deploy with one click!
Your N8N workflow gets deployed and creates a local hosted MCP server. Just paste the server URL into Claude, Cursor, Super Chain, or any MCP-compatible platform!
π― Key Features
π€ MCP Server Creation
Convert your N8N workflows into MCP servers that AI assistants can use as custom tools
π Dual Architecture
- Agent Marketplace: Web-based workflow management and deployment platform
- MCP Router: High-performance MCP server creation and routing system
π οΈ Comprehensive Workflow Management
- Browse and deploy pre-built workflow templates
- Upload and manage your custom N8N workflows
- Real-time credential configuration and testing
- One-click deployment to your N8N instance
ποΈ Architecture
graph TB
subgraph "AI Assistant Layer"
A[Claude/Cursor/Super Chain]
end
subgraph "N8N 2 MCP"
B[Agent Marketplace<br/>Flask Web App]
C[MCP Router<br/>FastAPI Service]
D[Workflow Parser<br/>Analysis Engine]
end
subgraph "Infrastructure"
E[Supabase Database]
F[N8N Instance]
G[Credential Manager]
end
A -->|MCP Protocol| C
C -->|Dynamic MCP| F
B -->|Workflow Management| E
B -->|Deploy & Configure| F
C -->|User Config| E
B -->|Parse & Analyze| D
D -->|Extract Requirements| G
G -->|Secure Handling| F
π¦ Installation
Prerequisites
- Python 3.11+
- N8N Instance (cloud.n8n.io or self-hosted)
- Supabase Account (for data storage)
- Playwright (required for N8N authentication)
- Docker (optional, for containerized deployment)
β οΈ Important: Playwright installation is required for N8N workflow execution. The system will use dummy credentials if Playwright is not properly installed, limiting functionality.
Quick Start
Option 1: Docker Compose (Recommended)
-
Clone the repository
git clone https://github.com/Super-Chain/N8N2MCP.git cd N8N2MCP -
Configure environment
cp env.example .env # Edit .env with your actual configuration values -
Start with Docker Compose
docker-compose up -dThis starts:
- Flask App (Agent Marketplace) at: http://localhost:5000
- MCP Router at: http://localhost:6545
-
View logs
docker-compose logs -f
Option 2: Manual Installation
-
Clone the repository
git clone https://github.com/Super-Chain/N8N2MCP.git cd N8N2MCP -
Install dependencies
pip install -r requirements.txt -
Install Playwright browsers (Required)
playwright install # This downloads the necessary browser binaries for N8N authentication -
Configure environment
# Copy and edit the .env file (see Environment Configuration section) cp .env.example .env# Supabase Configuration SUPABASE_URL=https://your-project-id.supabase.co SUPABASE_KEY=your_supabase_anon_key SUPABASE_SERVICE_KEY=your_supabase_service_role_key # N8N Configuration X_N8N_API_KEY=your_n8n_api_key N8N_BASE_URL=https://your-n8n-instance.com N8N_USERNAME=your_n8n_username N8N_PASSWORD=your_n8n_password # MCP Router Configuration N8N_BUILDER_URL=http://localhost:6545 # Server Configuration FLASK_HOST=0.0.0.0 FLASK_PORT=5000 MCP_HOST=0.0.0.0 MCP_PORT=6545 # Optional: Authentication credentials (auto-populated) N8N_AUTH= N8N_BROWSER_ID= -
Start both servers
python main.pyThis starts:
- Flask App (Agent Marketplace) at: http://localhost:5000
- MCP Router at: http://localhost:6545
-
Access to UI Front end : http://localhost:5000
Configuration Notes:
- SUPABASE_URL: Your Supabase project URL
- SUPABASE_KEY: Anon key for client-side operations
- SUPABASE_SERVICE_KEY: Service role key for admin operations
- N8N_BASE_URL: Your N8N instance URL (must include https://)
- N8N_BUILDER_URL: Must include http:// protocol
π§ Usage
Creating MCP Servers from N8N Workflows
Method 1: Import N8N Templates
- Browse Templates: Visit the N8N template
- Import Template: Enter an N8N template URL from n8n.io
- Configure Credentials: Fill in required API keys and service credentials
- Deploy Workflow: Click deploy to create the workflow in your N8N instance
- MCP Server Created: Automatically generates an MCP server endpoint
Method 2: Upload Custom Workflows
- Upload JSON: Upload your N8N workflow JSON file / Copy and paste your JSON workflow
- Review Analysis: Check detected nodes and required credentials
- Configure & Deploy: Fill credentials and deploy to N8N
- Access MCP Server: Use the generated MCP endpoint in AI tools
Using MCP Servers
# Example MCP server URL format:
http://localhost:6545/mcp/{workflow_id}/{api_key}
# Test MCP server:
curl http://localhost:6545/list # List all registered MCP servers
π¨ Use Cases
π Data Processing & Analysis
- Transform CSV/Excel files using N8N's data manipulation nodes
- Connect to databases and APIs for real-time data analysis
- Generate reports and visualizations from AI conversations
π API Integration Hub
- Connect AI assistants to external services (Slack, Google, etc.)
- Create custom API endpoints for proprietary systems
- Build unified interfaces for multiple SaaS platforms
π§ Communication & Notifications
- Send emails, Slack messages, or Discord notifications
- Create automated reporting systems
- Build alert systems triggered by AI interactions
π Workflow Automation
- Trigger complex business processes from AI conversations
- Create approval workflows and task management systems
- Build custom integrations with enterprise systems
π οΈ Development
Project Structure
N8N2MCP/
βββ main.py # Unified server startup script
βββ requirements.txt # Consolidated Python dependencies
βββ .env # Environment configuration (shared)
β
βββ agent_marketplace/ # Flask web application
β βββ app.py # Main Flask app with API endpoints
β βββ database.py # Supabase integration & data models
β βββ n8n_workflow_parser.py # Workflow analysis engine
β βββ setup_supabase.py # Database setup utilities
β βββ templates/ # HTML templates
β β βββ workflows.html # Main marketplace interface
β β βββ static/ # CSS, JS assets
β βββ __init__.py # Python package marker
β
βββ mcp_router/ # FastAPI MCP service
β βββ mcp_router.py # Main FastAPI application
β βββ n8n_credential_extractor.py # N8N authentication
β βββ credential_helper.py # Credential management utilities
β βββ __init__.py # Python package marker
β
βββ README.md # This documentation
Database Setup
The system uses 2 main tables in Supabase:
Setup
- Create Supabase Project: Set up a new project at supabase.com
- Run SQL in Supabase SQL Editor:
-- Main workflow storage table
CREATE TABLE IF NOT EXISTS public.user_workflows (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
user_id TEXT NOT NULL,
template_id TEXT NOT NULL,
template_url TEXT NOT NULL,
workflow_name TEXT NOT NULL,
workflow_json JSONB NOT NULL,
workflow_description TEXT,
n8n_workflow_id TEXT,
source TEXT DEFAULT 'user_upload',
credentials_required JSONB DEFAULT '[]'::jsonb,
mcp_link TEXT,
status TEXT DEFAULT 'pending',
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- MCP server configurations
CREATE TABLE IF NOT EXISTS public.mcp_configs (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
workflow_id TEXT NOT NULL,
user_apikey TEXT NOT NULL,
code TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
UNIQUE(workflow_id, user_apikey)
);
-- Enable Row Level Security (recommended)
ALTER TABLE user_workflows ENABLE ROW LEVEL SECURITY;
ALTER TABLE mcp_configs ENABLE ROW LEVEL SECURITY;
π Running the System
Unified Startup (Recommended)
python main.py
This automatically starts both services with:
- β Environment validation
- β Database setup verification
- β Graceful shutdown handling
- β Centralized logging
Individual Services
Agent Marketplace (Port 5000)
cd agent_marketplace
python app.py
MCP Router (Port 6545)
cd mcp_router
python mcp_router.py
Verification
# Test Agent Marketplace
curl http://localhost:5000/api/health
# Test MCP Router
curl http://localhost:6545/list
# View all endpoints
curl http://localhost:5000/api/health | grep endpoints
π§ Troubleshooting
Common Issues
Port Already in Use
# Kill processes on ports 5000 and 6545
fuser -k 5000/tcp 6545/tcp
# Or restart with main.py which handles this automatically
python main.py
Database Connection Issues
# Verify Supabase configuration
python -c "from agent_marketplace.database import db_manager; print('β
Database OK' if db_manager.supabase else 'β Database connection failed')"
# Reset database tables
python agent_marketplace/setup_supabase.py
MCP Router Not Responding
# Check if MCP Router is running
curl http://localhost:6545/list
# View MCP Router logs
# Logs appear in terminal where main.py was started
N8N Workflow Creation Fails
- Verify
N8N_BASE_URLincludeshttps:// - Check
X_N8N_API_KEYis valid and has workflow creation permissions - Ensure N8N instance is accessible from your server
Missing Dependencies
# Install missing packages
pip install playwright
playwright install # For N8N authentication (required)
# Or install all dependencies
pip install -r requirements.txt
Playwright Browser Issues
# If playwright browsers fail to download
playwright install --force
# For headless environments (servers)
playwright install chromium
# Check if playwright is working
python -c "from playwright.async_api import async_playwright; print('β
Playwright OK')"
Development Tips
# Enable debug mode for Flask
export FLASK_DEBUG=1
# View detailed MCP Router logs
cd mcp_router && python mcp_router.py --log-level debug
# Test individual components
python -m agent_marketplace.n8n_workflow_parser # Test parser
python -m mcp_router.mcp_router # Test MCP Router
π Security Best Practices
- Credential Management: Never store user credentials server-side
- API Key Rotation: Regularly rotate N8N API keys and Supabase keys
- Network Security: Use HTTPS in production with proper SSL certificates
- Access Control: Implement proper authentication and authorization
- Data Isolation: Ensure proper user data segregation with RLS policies
π€ Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Quick Reference
API Endpoints
Agent Marketplace (Port 5000)
GET /- Main marketplace interfaceGET /api/health- Health check and available endpointsPOST /api/import-n8n-template-enhanced- Import N8N templatePOST /api/deploy-workflow-to-n8n- Deploy workflow with credentialsGET /api/user/uploaded-workflows- List user workflowsGET /api/user/mcp-servers- List active MCP servers
MCP Router (Port 6545)
GET /list- List all registered MCP serversPOST /n8n/build- Create MCP server from N8N workflowGET /n8n/credentials/status- Check N8N credential status/mcp/{workflow_id}/{api_key}- MCP server endpoint
Key File Locations
- Configuration:
.env(root directory) - Main Startup:
main.py - Flask App:
agent_marketplace/app.py - MCP Router:
mcp_router/mcp_router.py
π Support
- Issues: GitHub Issues
- Documentation: Check this README and inline code documentation
- Community: Join our community discussions for help and feature requests
π Acknowledgments
- N8N for the amazing workflow automation platform
- Model Context Protocol for enabling AI tool integration
- Supabase for the robust database infrastructure
- FastAPI and Flask for the web frameworks
Star History
Built with β€οΈ by the SUPERCHAIN team for the AI automation community
Files in the repo
- agent_marketplace
- mcp_router
- .env.example
- .gitignore
- demo.gif
- docker-compose.yml
- Dockerfile
- LICENSE
- main.py
- README.md
- requirements.txt
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More connectors
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph β average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

Universal provider proxy for OpenAI Codex & Claude Code β use any LLM (Claude, Gemini, Grok, DeepSeek, Ollamaβ¦) with Codex CLI, App, SDK, and Claude Code
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300Β΅s in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
Stop your AI from making things up β it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.