Skip to content
Back to search

N8N2MCP

Convert N8N agent / workflow into MCP servers, you can use it in Claude / Cursor / Super Chain

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/super-chain--n8n2mcp/badge.svg)](/listings/super-chain--n8n2mcp)

HTML

<a href="/listings/super-chain--n8n2mcp"><img src="/api/listings/super-chain--n8n2mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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)

1. **Clone the repository**

   git clone https://github.com/Super-Chain/N8N2MCP.git
   cd N8N2MCP

2. **Configure environment**

   cp env.example .env
   # Edit .env with your actual configuration values

3. **Start with Docker Compose**

   docker-compose up -d

This starts: - Flask App (Agent Marketplace) at: http://localhost:5000 - MCP Router at: http://localhost:6545

4. **View logs**

   docker-compose logs -f

Option 2: Manual Installation

1. **Clone the repository**

   git clone https://github.com/Super-Chain/N8N2MCP.git
   cd N8N2MCP

2. **Install dependencies**

   pip install -r requirements.txt
    ```

3. **Install Playwright browsers** (Required)
   ```bash
   playwright install
   # This downloads the necessary browser binaries for N8N authentication

4. **Configure environment**

   # Copy and edit the .env file (see Environment Configuration section)
   cp .env.example .env

```.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= ```

5. **Start both servers**

   python main.py

This starts: - Flask App (Agent Marketplace) at: http://localhost:5000 - MCP Router at: http://localhost:6545

6. **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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 466 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <img width="512" height="128" alt="Screenshot 2025-07-21 at 5 38 29 PM" src="https://github.com/user-attachments/assets/057ec717-a61a-47af-9a54-e711e85ab4dd" />
  2. <a href="https://www.producthunt.com/products/n8n2mcp-n8n-workflow-into-mcp-servers?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-n8n2mcp" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=995941&theme=light&t=1753173693440" alt="N8N2MCP - Turn&#0032;your&#0032;N8N&#0032;workflow&#0032;to&#0032;MCP&#0032;servers&#0032;with&#0032;just&#0032;3&#0032;clicks | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
  3. #### Transform your N8N workflows into MCP servers instantly
  4. 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.
  5. ![Demo](demo.gif)
  6. ## ✨ How to use
  7. 1. Copy the N8N template link/JSON from any workflow
  8. 2. Map your credentials through our intuitive interface
  9. 3. Deploy with one click!
  10. **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!**
  11. ## 🎯 Key Features
  12. ### 🤖 **MCP Server Creation**
  13. Convert your N8N workflows into MCP servers that AI assistants can use as custom tools
  14. ### 🔄 **Dual Architecture**
  15. - **Agent Marketplace**: Web-based workflow management and deployment platform
  16. - **MCP Router**: High-performance MCP server creation and routing system
  17. ### 🛠️ **Comprehensive Workflow Management**
  18. - Browse and deploy pre-built workflow templates
  19. - Upload and manage your custom N8N workflows
  20. - Real-time credential configuration and testing
  21. - One-click deployment to your N8N instance
  22. ## 🏗️ Architecture
  23. ```mermaid
  24. graph TB
  25. subgraph "AI Assistant Layer"
  26. A[Claude/Cursor/Super Chain]
  27. end
  28. subgraph "N8N 2 MCP"
  29. B[Agent Marketplace<br/>Flask Web App]
  30. C[MCP Router<br/>FastAPI Service]
  31. D[Workflow Parser<br/>Analysis Engine]
  32. end
  33. subgraph "Infrastructure"
  34. E[Supabase Database]
  35. F[N8N Instance]
  36. G[Credential Manager]
  37. end
  38. A -->|MCP Protocol| C
  39. C -->|Dynamic MCP| F
  40. B -->|Workflow Management| E
  41. B -->|Deploy & Configure| F
  42. C -->|User Config| E
  43. B -->|Parse & Analyze| D
  44. D -->|Extract Requirements| G
  45. G -->|Secure Handling| F
  46. ```
  47. ## 📦 Installation
  48. ### Prerequisites
  49. - **Python 3.11+**
  50. - **N8N Instance** (cloud.n8n.io or self-hosted)
  51. - **Supabase Account** (for data storage)
  52. - **Playwright** (required for N8N authentication)
  53. - **Docker** (optional, for containerized deployment)
  54. > ⚠️ **Important**: Playwright installation is **required** for N8N workflow execution. The system will use dummy credentials if Playwright is not properly installed, limiting functionality.
  55. ### Quick Start
  56. #### Option 1: Docker Compose (Recommended)
  57. 1. **Clone the repository**
  58. ```bash
  59. git clone https://github.com/Super-Chain/N8N2MCP.git
  60. cd N8N2MCP
  61. ```
  62. 2. **Configure environment**
  63. ```bash
  64. cp env.example .env
  65. # Edit .env with your actual configuration values
  66. ```
  67. 3. **Start with Docker Compose**
  68. ```bash
  69. docker-compose up -d
  70. ```
  71. This starts:
  72. - Flask App (Agent Marketplace) at: http://localhost:5000
  73. - MCP Router at: http://localhost:6545
  74. 4. **View logs**
  75. ```bash
  76. docker-compose logs -f
  77. ```
  78. #### Option 2: Manual Installation
  79. 1. **Clone the repository**
  80. ```bash
  81. git clone https://github.com/Super-Chain/N8N2MCP.git
  82. cd N8N2MCP
  83. ```
  84. 2. **Install dependencies**
  85. ```bash
  86. pip install -r requirements.txt
  87. ```
  88. 3. **Install Playwright browsers** (Required)
  89. ```bash
  90. playwright install
  91. # This downloads the necessary browser binaries for N8N authentication
  92. ```
  93. 4. **Configure environment**
  94. ```bash
  95. # Copy and edit the .env file (see Environment Configuration section)
  96. cp .env.example .env
  97. ```
  98. ```.env
  99. # Supabase Configuration
  100. SUPABASE_URL=https://your-project-id.supabase.co
  101. SUPABASE_KEY=your_supabase_anon_key
  102. SUPABASE_SERVICE_KEY=your_supabase_service_role_key
  103. # N8N Configuration
  104. X_N8N_API_KEY=your_n8n_api_key
  105. N8N_BASE_URL=https://your-n8n-instance.com
  106. N8N_USERNAME=your_n8n_username
  107. N8N_PASSWORD=your_n8n_password
  108. # MCP Router Configuration
  109. N8N_BUILDER_URL=http://localhost:6545
  110. # Server Configuration
  111. FLASK_HOST=0.0.0.0
  112. FLASK_PORT=5000
  113. MCP_HOST=0.0.0.0
  114. MCP_PORT=6545
  115. # Optional: Authentication credentials (auto-populated)
  116. N8N_AUTH=
  117. N8N_BROWSER_ID=
  118. ```
  119. 5. **Start both servers**
  120. ```bash
  121. python main.py
  122. ```
  123. This starts:
  124. - Flask App (Agent Marketplace) at: http://localhost:5000
  125. - MCP Router at: http://localhost:6545
  126. 6. **Access to UI**
  127. Front end : http://localhost:5000
  128. **Configuration Notes:**
  129. - **SUPABASE_URL**: Your Supabase project URL
  130. - **SUPABASE_KEY**: Anon key for client-side operations
  131. - **SUPABASE_SERVICE_KEY**: Service role key for admin operations
  132. - **N8N_BASE_URL**: Your N8N instance URL (must include https://)
  133. - **N8N_BUILDER_URL**: Must include http:// protocol
  134. ## 🔧 Usage
  135. ### Creating MCP Servers from N8N Workflows
  136. #### Method 1: Import N8N Templates
  137. 1. **Browse Templates**: Visit the [N8N template](https://n8n.io/workflows/)
  138. 2. **Import Template**: Enter an N8N template URL from n8n.io
  139. 3. **Configure Credentials**: Fill in required API keys and service credentials
  140. 4. **Deploy Workflow**: Click deploy to create the workflow in your N8N instance
  141. 5. **MCP Server Created**: Automatically generates an MCP server endpoint
  142. #### Method 2: Upload Custom Workflows
  143. 1. **Upload JSON**: Upload your N8N workflow JSON file / Copy and paste your JSON workflow
  144. 2. **Review Analysis**: Check detected nodes and required credentials
  145. 3. **Configure & Deploy**: Fill credentials and deploy to N8N
  146. 4. **Access MCP Server**: Use the generated MCP endpoint in AI tools
  147. #### Using MCP Servers
  148. ```bash
  149. # Example MCP server URL format:
  150. http://localhost:6545/mcp/{workflow_id}/{api_key}
  151. # Test MCP server:
  152. curl http://localhost:6545/list # List all registered MCP servers
  153. ```
  154. ## 🎨 Use Cases
  155. ### 🔍 **Data Processing & Analysis**
  156. - Transform CSV/Excel files using N8N's data manipulation nodes
  157. - Connect to databases and APIs for real-time data analysis
  158. - Generate reports and visualizations from AI conversations
  159. ### 🌐 **API Integration Hub**
  160. - Connect AI assistants to external services (Slack, Google, etc.)
  161. - Create custom API endpoints for proprietary systems
  162. - Build unified interfaces for multiple SaaS platforms
  163. ### 📧 **Communication & Notifications**
  164. - Send emails, Slack messages, or Discord notifications
  165. - Create automated reporting systems
  166. - Build alert systems triggered by AI interactions
  167. ### 🔄 **Workflow Automation**
  168. - Trigger complex business processes from AI conversations
  169. - Create approval workflows and task management systems
  170. - Build custom integrations with enterprise systems
  171. ## 🛠️ Development
  172. ### Project Structure
  173. ```
  174. N8N2MCP/
  175. ├── main.py # Unified server startup script
  176. ├── requirements.txt # Consolidated Python dependencies
  177. ├── .env # Environment configuration (shared)
  178. │
  179. ├── agent_marketplace/ # Flask web application
  180. │ ├── app.py # Main Flask app with API endpoints
  181. │ ├── database.py # Supabase integration & data models
  182. │ ├── n8n_workflow_parser.py # Workflow analysis engine
  183. │ ├── setup_supabase.py # Database setup utilities
  184. │ ├── templates/ # HTML templates
  185. │ │ ├── workflows.html # Main marketplace interface
  186. │ │ └── static/ # CSS, JS assets
  187. │ └── __init__.py # Python package marker
  188. │
  189. ├── mcp_router/ # FastAPI MCP service
  190. │ ├── mcp_router.py # Main FastAPI application
  191. │ ├── n8n_credential_extractor.py # N8N authentication
  192. │ ├── credential_helper.py # Credential management utilities
  193. │ └── __init__.py # Python package marker
  194. │
  195. └── README.md # This documentation
  196. ```
  197. ### Database Setup
  198. The system uses **2 main tables** in Supabase:
  199. #### Setup
  200. 1. **Create Supabase Project**: Set up a new project at [supabase.com](https://supabase.com)
  201. 2. **Run SQL in Supabase SQL Editor**:
  202. ```sql
  203. -- Main workflow storage table
  204. CREATE TABLE IF NOT EXISTS public.user_workflows (
  205. id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
  206. user_id TEXT NOT NULL,
  207. template_id TEXT NOT NULL,
  208. template_url TEXT NOT NULL,
  209. workflow_name TEXT NOT NULL,
  210. workflow_json JSONB NOT NULL,
  211. workflow_description TEXT,
  212. n8n_workflow_id TEXT,
  213. source TEXT DEFAULT 'user_upload',
  214. credentials_required JSONB DEFAULT '[]'::jsonb,
  215. mcp_link TEXT,
  216. status TEXT DEFAULT 'pending',
  217. created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  218. updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
  219. );
  220. -- MCP server configurations
  221. CREATE TABLE IF NOT EXISTS public.mcp_configs (
  222. id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
  223. workflow_id TEXT NOT NULL,
  224. user_apikey TEXT NOT NULL,
  225. code TEXT NOT NULL,
  226. created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  227. updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  228. UNIQUE(workflow_id, user_apikey)
  229. );
  230. -- Enable Row Level Security (recommended)
  231. ALTER TABLE user_workflows ENABLE ROW LEVEL SECURITY;
  232. ALTER TABLE mcp_configs ENABLE ROW LEVEL SECURITY;
  233. ```
  234. ## 🚀 Running the System
  235. ### Unified Startup (Recommended)
  236. ```bash
  237. python main.py
  238. ```
  239. This automatically starts both services with:
  240. - ✅ Environment validation
  241. - ✅ Database setup verification
  242. - ✅ Graceful shutdown handling
  243. - ✅ Centralized logging
  244. ### Individual Services
  245. #### Agent Marketplace (Port 5000)
  246. ```bash
  247. cd agent_marketplace
  248. python app.py
  249. ```
  250. #### MCP Router (Port 6545)
  251. ```bash
  252. cd mcp_router
  253. python mcp_router.py
  254. ```
  255. ### Verification
  256. ```bash
  257. # Test Agent Marketplace
  258. curl http://localhost:5000/api/health
  259. # Test MCP Router
  260. curl http://localhost:6545/list
  261. # View all endpoints
  262. curl http://localhost:5000/api/health | grep endpoints
  263. ```
  264. ## 🔧 Troubleshooting
  265. ### Common Issues
  266. #### Port Already in Use
  267. ```bash
  268. # Kill processes on ports 5000 and 6545
  269. fuser -k 5000/tcp 6545/tcp
  270. # Or restart with main.py which handles this automatically
  271. python main.py
  272. ```
  273. #### Database Connection Issues
  274. ```bash
  275. # Verify Supabase configuration
  276. python -c "from agent_marketplace.database import db_manager; print('✅ Database OK' if db_manager.supabase else '❌ Database connection failed')"
  277. # Reset database tables
  278. python agent_marketplace/setup_supabase.py
  279. ```
  280. #### MCP Router Not Responding
  281. ```bash
  282. # Check if MCP Router is running
  283. curl http://localhost:6545/list
  284. # View MCP Router logs
  285. # Logs appear in terminal where main.py was started
  286. ```
  287. #### N8N Workflow Creation Fails
  288. - Verify `N8N_BASE_URL` includes `https://`
  289. - Check `X_N8N_API_KEY` is valid and has workflow creation permissions
  290. - Ensure N8N instance is accessible from your server
  291. #### Missing Dependencies
  292. ```bash
  293. # Install missing packages
  294. pip install playwright
  295. playwright install # For N8N authentication (required)
  296. # Or install all dependencies
  297. pip install -r requirements.txt
  298. ```
  299. #### Playwright Browser Issues
  300. ```bash
  301. # If playwright browsers fail to download
  302. playwright install --force
  303. # For headless environments (servers)
  304. playwright install chromium
  305. # Check if playwright is working
  306. python -c "from playwright.async_api import async_playwright; print('✅ Playwright OK')"
  307. ```
  308. ### Development Tips
  309. ```bash
  310. # Enable debug mode for Flask
  311. export FLASK_DEBUG=1
  312. # View detailed MCP Router logs
  313. cd mcp_router && python mcp_router.py --log-level debug
  314. # Test individual components
  315. python -m agent_marketplace.n8n_workflow_parser # Test parser
  316. python -m mcp_router.mcp_router # Test MCP Router
  317. ```
  318. ## 🔐 Security Best Practices
  319. - **Credential Management**: Never store user credentials server-side
  320. - **API Key Rotation**: Regularly rotate N8N API keys and Supabase keys
  321. - **Network Security**: Use HTTPS in production with proper SSL certificates
  322. - **Access Control**: Implement proper authentication and authorization
  323. - **Data Isolation**: Ensure proper user data segregation with RLS policies
  324. ## 🤝 Contributing
  325. 1. **Fork the repository**
  326. 2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
  327. 3. **Commit your changes**: `git commit -m 'Add amazing feature'`
  328. 4. **Push to the branch**: `git push origin feature/amazing-feature`
  329. 5. **Open a Pull Request**
  330. ## 📄 License
  331. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
  332. ## 📋 Quick Reference
  333. ### API Endpoints
  334. #### Agent Marketplace (Port 5000)
  335. - `GET /` - Main marketplace interface
  336. - `GET /api/health` - Health check and available endpoints
  337. - `POST /api/import-n8n-template-enhanced` - Import N8N template
  338. - `POST /api/deploy-workflow-to-n8n` - Deploy workflow with credentials
  339. - `GET /api/user/uploaded-workflows` - List user workflows
  340. - `GET /api/user/mcp-servers` - List active MCP servers
  341. #### MCP Router (Port 6545)
  342. - `GET /list` - List all registered MCP servers
  343. - `POST /n8n/build` - Create MCP server from N8N workflow
  344. - `GET /n8n/credentials/status` - Check N8N credential status
  345. - `/mcp/{workflow_id}/{api_key}` - MCP server endpoint
  346. ### Key File Locations
  347. - **Configuration**: `.env` (root directory)
  348. - **Main Startup**: `main.py`
  349. - **Flask App**: `agent_marketplace/app.py`
  350. - **MCP Router**: `mcp_router/mcp_router.py`
  351. ## 🆘 Support
  352. - **Issues**: [GitHub Issues](https://github.com/Super-Chain/N8N-Agent-Marketplace/issues)
  353. - **Documentation**: Check this README and inline code documentation
  354. - **Community**: Join our community discussions for help and feature requests
  355. ## 🙏 Acknowledgments
  356. - [N8N](https://n8n.io/) for the amazing workflow automation platform
  357. - [Model Context Protocol](https://modelcontextprotocol.io/) for enabling AI tool integration
  358. - [Supabase](https://supabase.com/) for the robust database infrastructure
  359. - [FastAPI](https://fastapi.tiangolo.com/) and [Flask](https://flask.palletsprojects.com/) for the web frameworks
  360. ---
  361. ## Star History
  362. [![Star History Chart](https://api.star-history.com/svg?repos=Super-Chain/N8N2MCP&type=Date)](https://www.star-history.com/#Super-Chain/N8N2MCP&Date)
  363. **Built with ❤️ by the SUPERCHAIN team for the AI automation community**

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.