n8n-workflow-builder-mcp 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +114 -69
  2. package/package.json +6 -2
package/README.md CHANGED
@@ -26,15 +26,64 @@ Current problems:
26
26
  - **AI Integration**: Special tools for connecting AI components in workflows
27
27
  - **AI-Friendly Interface**: Designed specifically for interaction with AI agents
28
28
 
29
-
30
29
  ## Prerequisites
31
30
 
32
31
  - Node.js (v14 or higher)
33
32
  - Cursor IDE (v0.48 or newer)
34
- - npm or yarn
35
- - TypeScript compiler (installed as a dev dependency via `npm install`)
33
+ - npm (for npx command)
34
+
35
+ ## Installation & Setup
36
+
37
+ ### Recommended: Using npx in mcp.json (Easiest)
38
+
39
+ The recommended way to install this MCP server is using npx directly in your `.cursor/mcp.json` file:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "n8n-workflow-builder": {
45
+ "command": "npx",
46
+ "args": [
47
+ "-y",
48
+ "n8n-workflow-builder-mcp"
49
+ ],
50
+ "env": {
51
+ "N8N_API_URL": "http://localhost:5678",
52
+ "N8N_API_KEY": "your-n8n-api-key-here"
53
+ }
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ This approach:
60
+ - ✅ Automatically installs the latest version
61
+ - ✅ Does not require global installation
62
+ - ✅ Works reliably across different environments
63
+ - ✅ No manual building or path configuration needed
64
+
65
+ **Setup Steps:**
66
+ 1. Create the `.cursor` directory in your project root (if it doesn't exist):
67
+ ```bash
68
+ mkdir -p .cursor
69
+ ```
36
70
 
37
- ## Installation
71
+ 3. Create or update `.cursor/mcp.json` with the configuration above, replacing:
72
+ - `N8N_API_URL`: Your n8n instance URL (default: `http://localhost:5678`)
73
+ - `N8N_API_KEY`: Your n8n API key from the n8n settings
74
+
75
+ 4. Restart Cursor IDE for changes to take effect
76
+
77
+
78
+ ### Getting your n8n API Key:
79
+ 1. Open your n8n instance in a browser
80
+ 2. Go to Settings > API Keys
81
+ 3. Click "Create API Key"
82
+ 4. Copy the generated key and use it in your configuration
83
+
84
+ ### Alternative: Development Installation
85
+
86
+ For development or local testing, you can clone and build from source:
38
87
 
39
88
  1. Clone the repository:
40
89
  ```bash
@@ -52,60 +101,42 @@ Current problems:
52
101
  npm run build
53
102
  ```
54
103
 
55
- 4. Make the MCP server script executable (if needed):
56
- ```bash
57
- chmod +x dist/index.js
58
- ```
59
-
60
- ## Running the Server
61
-
62
- Start the MCP server:
63
- ```bash
64
- npm start
65
- ```
66
- This will run the compiled code from `dist/index.js`.
67
-
68
- For development with auto-rebuild and restart on changes:
69
- ```bash
70
- npm run dev
71
- ```
72
-
73
- ## Cursor IDE Integration
74
-
75
- There are two ways to set up the MCP server with Cursor:
76
-
77
- ### Method 1: Using Cursor Settings UI (Recommended)
78
-
79
- 1. Start Cursor IDE
80
- 2. Go to Settings > Features > MCP Servers
81
- 3. Click "Add Server" and provide the **absolute path** to the `dist/index.js` file
82
- (e.g., `/Users/yourname/n8n-workflow-builder-mcp/dist/index.js`)
83
- 4. Make sure the server is enabled
84
- 5. Restart Cursor IDE for changes to take effect
85
-
86
- ### Method 2: Manual Configuration
87
-
88
- 1. Ensure the `.cursor` directory exists:
89
- ```bash
90
- mkdir -p .cursor
91
- ```
92
-
93
- 2. Create the MCP configuration file:
94
- ```bash
95
- cat > .cursor/mcp.json << 'EOF'
104
+ 4. Configure in `.cursor/mcp.json`:
105
+ ```json
96
106
  {
97
107
  "mcpServers": {
98
108
  "n8n-workflow-builder": {
99
109
  "command": "node",
100
- "args": ["/absolute/path/to/n8n-workflow-builder-mcp/dist/index.js"]
110
+ "args": ["/absolute/path/to/n8n-workflow-builder-mcp/dist/index.js"],
111
+ "env": {
112
+ "N8N_API_URL": "http://localhost:5678",
113
+ "N8N_API_KEY": "your-n8n-api-key-here"
114
+ }
101
115
  }
102
116
  }
103
117
  }
104
- EOF
105
118
  ```
106
- Make sure to replace `/absolute/path/to` with the actual path on your system.
107
119
 
108
- 3. Restart Cursor IDE for changes to take effect
120
+ 5. For development with auto-rebuild:
121
+ ```bash
122
+ npm run dev
123
+ ```
124
+
125
+ ## Cursor IDE Integration
126
+
127
+ ### Using Cursor Settings UI (Optional)
128
+
129
+ Alternatively, you can set up the MCP server through Cursor's interface:
130
+
131
+ 1. Start Cursor IDE
132
+ 2. Go to Settings > Features > MCP Servers
133
+ 3. Click "Add Server"
134
+ 4. For npx method: Use command `npx` with args `["-y", "n8n-workflow-builder-mcp"]`
135
+ 5. Add environment variables:
136
+ - `N8N_API_URL`: `http://localhost:5678`
137
+ - `N8N_API_KEY`: `your-n8n-api-key-here`
138
+ 6. Make sure the server is enabled
139
+ 7. Restart Cursor IDE for changes to take effect
109
140
 
110
141
  ## Available MCP Tools
111
142
 
@@ -127,61 +158,75 @@ The server provides the following tools for working with n8n workflows:
127
158
 
128
159
  If you're having trouble getting the MCP server to work with Cursor, try these steps:
129
160
 
130
- 1. **Restart Cursor**: After setting up the MCP configuration, completely close and restart Cursor.
161
+ ### For npx installation (Recommended method):
131
162
 
132
- 2. **Check Cursor MCP settings**:
163
+ Make sure your `.cursor/mcp.json` file is properly formatted:
164
+ ```json
165
+ {
166
+ "mcpServers": {
167
+ "n8n-workflow-builder": {
168
+ "command": "npx",
169
+ "args": ["-y", "n8n-workflow-builder-mcp"]
170
+ }
171
+ }
172
+ }
173
+ ```
174
+
175
+ ### General troubleshooting:
176
+
177
+ 1. **Check Cursor MCP settings**:
133
178
  - Open Cursor Settings
134
179
  - Go to Features > MCP Servers
135
180
  - Make sure your server is listed and enabled
136
181
  - If it's listed but not working, try clicking the refresh button
137
182
 
138
- 3. **Check server logs**: Look for errors in the terminal where you're running the server or in the Cursor Output panel. Select "Cursor MCP" from the dropdown in the Output panel to see MCP-specific logs.
139
-
140
- 4. **Verify file permissions**: Make sure the `dist/index.js` file has execution permissions.
141
-
142
- 5. **Check for port conflicts**: If there are other MCP servers running, they might conflict. Check for other processes using the same ports.
183
+ 2. **Check server logs**: Look for errors in the Cursor Output panel. Select "Cursor MCP" from the dropdown in the Output panel to see MCP-specific logs.
143
184
 
144
- 6. **Try global installation**: Instead of using a local path, you can try installing the server globally:
185
+ 3. **Try manual installation**: If npx fails, try the global installation method as an alternative:
145
186
  ```bash
146
187
  npm install -g n8n-workflow-builder-mcp
147
188
  ```
148
- Then update the `.cursor/mcp.json` file to use the global command.
149
189
 
150
190
  ## Common Issues and Solutions
151
191
 
152
- ### "Failed to create client"
192
+ ### "Failed to create client" or "Module not found"
153
193
 
154
194
  This usually happens when:
155
- - The MCP server isn't running
156
- - There's a connectivity issue between Cursor and the server
157
- - The server crashed during initialization
195
+ - Internet connection issues prevent npx from downloading the package
196
+ - Node.js/npm version compatibility issues
197
+ - Cursor MCP service is not running properly
158
198
 
159
199
  Try:
160
- 1. Running the test script to make sure the server works correctly
161
- 2. Checking for errors in the server logs
162
- 3. Restarting Cursor
200
+ 1. Check your internet connection
201
+ 2. Update Node.js to the latest LTS version
202
+ 3. Restart Cursor completely
203
+ 4. Try the global installation method as fallback
163
204
 
164
205
  ### MCP Server is not showing up in Cursor
165
206
 
166
207
  This can happen if:
167
208
  - The `.cursor/mcp.json` file is not properly formatted
168
209
  - Cursor hasn't detected the configuration change
210
+ - File permissions on the `.cursor` directory
169
211
 
170
212
  Try:
171
213
  1. Validating the JSON format of your `.cursor/mcp.json` file
172
214
  2. Restarting Cursor
173
215
  3. Manually selecting the server in Cursor settings (if it appears there)
216
+ 4. Check file permissions: `chmod 755 .cursor`
174
217
 
175
218
  ### MCP Server shows up but tools aren't available
176
219
 
177
220
  This can happen if:
178
221
  - The server isn't properly registering its tools
179
- - There's an issue with the ListOfferings request/response
222
+ - Package installation is incomplete
223
+ - Version compatibility issues
180
224
 
181
225
  Try:
182
- 1. Running the test script to check if tools are properly registered
226
+ 1. Check the package was downloaded correctly by npx
183
227
  2. Clicking the refresh button in the MCP server settings in Cursor
184
- 3. Checking the server logs for any errors
228
+ 3. Try clearing npm cache: `npm cache clean --force`
229
+ 4. Use the development installation method for debugging
185
230
 
186
231
  ## Project Structure
187
232
 
@@ -207,4 +252,4 @@ Contributions are welcome! Please feel free to submit a Pull Request.
207
252
 
208
253
  ## License
209
254
 
210
- Working on licence - need to have confirmation from n8n team
255
+ MIT License
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "n8n-workflow-builder-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for building n8n workflows",
5
- "main": "src/index.js",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "n8n-workflow-builder-mcp": "dist/index.js"
8
+ },
6
9
  "repository": {
7
10
  "type": "git",
8
11
  "url": "https://github.com/ifmelate/n8n-workflow-builder-mcp.git"
@@ -36,6 +39,7 @@
36
39
  "express": "^4.18.2",
37
40
  "jsonwebtoken": "^9.0.2",
38
41
  "morgan": "^1.10.0",
42
+ "n8n-workflow-builder-mcp": "^0.1.0",
39
43
  "node-fetch": "^2.6.7",
40
44
  "uuid": "^9.0.1",
41
45
  "winston": "^3.10.0",