{"_id":"@davidfei/n8n-mcp","_rev":"2-32a0b987cabc48b0f02c3028b1684f59","name":"@davidfei/n8n-mcp","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@davidfei/n8n-mcp","version":"1.0.0","keywords":["mcp","n8n","workflow","automation"],"author":{"name":"davidfei"},"license":"MIT","_id":"@davidfei/n8n-mcp@1.0.0","maintainers":[{"name":"davidfei","email":"dvdfei@yahoo.ca"}],"homepage":"https://github.com/davidfei/n8n-mcp#readme","bugs":{"url":"https://github.com/davidfei/n8n-mcp/issues"},"bin":{"n8n-mcp-server":"build/index.js"},"dist":{"shasum":"2bd825e0ff5da0f57c97ac62518fddf9d02ca4dc","tarball":"https://registry.npmjs.org/@davidfei/n8n-mcp/-/n8n-mcp-1.0.0.tgz","fileCount":7,"integrity":"sha512-Ksw5XbLEVWEFOtnoXp4U0bBm9BxA5z1MWSQI8O2B9FtozTIGqE7XjRUHRazSedHoj1l17d9T4IFJtpPqvJslKg==","signatures":[{"sig":"MEUCICm4GBHQJnMIvAm0SJTexrPNsXsQ0ZLlMaCHQppkLZ3IAiEAjT6wuAcGG0Yd0bIZcUHJopm8x1KhIakQWKvRuCOIoMk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41505},"main":"build/index.js","type":"module","types":"./build/index.d.ts","scripts":{"dev":"tsc --watch","build":"tsc","start":"node build/index.js"},"_npmUser":{"name":"davidfei","email":"dvdfei@yahoo.ca"},"repository":{"url":"git+https://github.com/davidfei/n8n-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for managing n8n workflows","directories":{},"_nodeVersion":"20.19.5","dependencies":{"axios":"^1.7.9","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/n8n-mcp_1.0.0_1762447577038_0.04755309954674036","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@davidfei/n8n-mcp","version":"1.0.1","description":"MCP server for managing n8n workflows","type":"module","main":"build/index.js","bin":{"n8n-mcp-server":"build/index.js"},"scripts":{"build":"tsc","start":"node build/index.js","dev":"tsc --watch"},"keywords":["mcp","n8n","workflow","automation"],"author":{"name":"davidfei"},"repository":{"type":"git","url":"git+https://github.com/davidfei/n8n-mcp.git"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","axios":"^1.7.9"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2"},"_id":"@davidfei/n8n-mcp@1.0.1","gitHead":"749f5a0a56336a1a3852ea6eca7d18c7af4bd344","types":"./build/index.d.ts","bugs":{"url":"https://github.com/davidfei/n8n-mcp/issues"},"homepage":"https://github.com/davidfei/n8n-mcp#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-FyTGo2elke8H2uPLvS1ZSAiqUj8nPN5tbTP10LAzO3GVyZqjZ/5TNLk4TrGdSmx+tP10Q2aqNPn0uHOz+X7zYA==","shasum":"616ae92d241d35a5c8e0768fa02b945d2d1a2204","tarball":"https://registry.npmjs.org/@davidfei/n8n-mcp/-/n8n-mcp-1.0.1.tgz","fileCount":7,"unpackedSize":43116,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD2b38tVAW/r+ThN27QS5u7JlVf49znKccppbS813nOWQIgLfuXFqE+uf18paazl1A3WDMXvPBP4FxxQ7aE9SUuF40="}]},"_npmUser":{"name":"davidfei","email":"dvdfei@yahoo.ca"},"directories":{},"maintainers":[{"name":"davidfei","email":"dvdfei@yahoo.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-mcp_1.0.1_1762448491280_0.7761391551054451"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-06T16:46:16.917Z","modified":"2025-11-06T17:01:31.672Z","1.0.0":"2025-11-06T16:46:17.243Z","1.0.1":"2025-11-06T17:01:31.468Z"},"bugs":{"url":"https://github.com/davidfei/n8n-mcp/issues"},"author":{"name":"davidfei"},"license":"MIT","homepage":"https://github.com/davidfei/n8n-mcp#readme","keywords":["mcp","n8n","workflow","automation"],"repository":{"type":"git","url":"git+https://github.com/davidfei/n8n-mcp.git"},"description":"MCP server for managing n8n workflows","maintainers":[{"name":"davidfei","email":"dvdfei@yahoo.ca"}],"readme":"# n8n MCP Server\n\nA Model Context Protocol (MCP) server for managing n8n workflows on your self-hosted n8n instance. This server enables AI assistants like Claude to interact with your n8n workflows through a standardized interface.\n\n## Features\n\n- **Workflow Management**: List, create, update, and delete workflows\n- **Workflow Control**: Activate, deactivate, and execute workflows\n- **Execution Monitoring**: List and inspect workflow executions\n- **Credentials Access**: View available credentials (without sensitive data)\n- **Full API Coverage**: Comprehensive support for n8n API operations\n\n## Prerequisites\n\n- Node.js 18 or higher\n- A self-hosted n8n instance\n- n8n API key (generated from your n8n instance)\n\n## Installation\n\n1. Clone or download this repository\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Build the project:\n\n```bash\nnpm run build\n```\n\n## Configuration\n\nThe server requires two environment variables:\n\n- `N8N_BASE_URL`: The base URL of your n8n instance (e.g., `https://n8n.example.com/api/v1`)\n- `N8N_API_KEY`: Your n8n API key\n\n### Getting your n8n API Key\n\n1. Log in to your n8n instance\n2. Go to Settings → API\n3. Click \"Create API Key\"\n4. Copy the generated key\n\n## Usage with Claude Desktop\n\nAdd this to your Claude Desktop configuration file:\n\n**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"n8n\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/n8n-mcp-server/build/index.js\"],\n      \"env\": {\n        \"N8N_BASE_URL\": \"https://your-n8n-instance.com/api/v1\",\n        \"N8N_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n## Usage with Claude Code\n\nTo use this MCP server with Claude Code (the CLI tool), you can add it using the `claude mcp add` command.\n\n### Installation\n\nFirst, install the package from npm:\n\n```bash\nnpm install @davidfei/n8n-mcp\n```\n\nOr install globally:\n\n```bash\nnpm install -g @davidfei/n8n-mcp\n```\n\n### Adding to Claude Code\n\nUse the `claude mcp add` command to register this MCP server with Claude Code:\n\n```bash\nclaude mcp add n8n \\\n  --command node \\\n  --args \"node_modules/@davidfei/n8n-mcp/build/index.js\" \\\n  --env N8N_BASE_URL=\"https://your-n8n-instance.com/api/v1\" \\\n  --env N8N_API_KEY=\"your-api-key-here\"\n```\n\nOr if installed globally:\n\n```bash\nclaude mcp add n8n \\\n  --command n8n-mcp-server \\\n  --env N8N_BASE_URL=\"https://your-n8n-instance.com/api/v1\" \\\n  --env N8N_API_KEY=\"your-api-key-here\"\n```\n\n### Verifying Installation\n\nCheck that the MCP server was added successfully:\n\n```bash\nclaude mcp list\n```\n\nYou should see `n8n` in the list of available MCP servers.\n\n### Using with Claude Code\n\nOnce added, you can interact with your n8n workflows directly within Claude Code. Claude will automatically have access to all 13 tools provided by this MCP server:\n\n- **Workflow Management**: List, create, update, and delete workflows\n- **Workflow Control**: Activate, deactivate, and execute workflows\n- **Execution Monitoring**: List and inspect workflow executions\n- **Credentials Access**: View available credentials\n\nFor more information about managing MCP servers with Claude Code, see the [Claude Code documentation](https://docs.claude.com/en/docs/claude-code).\n\n## Available Tools\n\n### Workflow Management\n\n#### `list_workflows`\nList all workflows in your n8n instance.\n\n**Parameters**:\n- `active` (optional): Filter by active status (\"true\" or \"false\")\n\n**Example**:\n```\nList all active workflows\n```\n\n#### `get_workflow`\nGet details of a specific workflow.\n\n**Parameters**:\n- `workflow_id` (required): The workflow ID\n\n**Example**:\n```\nShow me workflow 123\n```\n\n#### `create_workflow`\nCreate a new workflow.\n\n**Parameters**:\n- `name` (required): Workflow name\n- `nodes` (required): JSON string of workflow nodes\n- `connections` (required): JSON string of workflow connections\n- `active` (optional): Whether to activate immediately (default: false)\n- `settings` (optional): JSON string of workflow settings\n\n**Example**:\n```\nCreate a new workflow called \"Data Sync\" with these nodes...\n```\n\n#### `update_workflow`\nUpdate an existing workflow.\n\n**Parameters**:\n- `workflow_id` (required): The workflow ID\n- `name` (optional): New workflow name\n- `nodes` (optional): JSON string of updated nodes\n- `connections` (optional): JSON string of updated connections\n- `active` (optional): Activation status\n- `settings` (optional): JSON string of workflow settings\n\n**Example**:\n```\nUpdate workflow 123 to change its name to \"New Name\"\n```\n\n#### `delete_workflow`\nDelete a workflow.\n\n**Parameters**:\n- `workflow_id` (required): The workflow ID\n\n**Example**:\n```\nDelete workflow 123\n```\n\n### Workflow Control\n\n#### `activate_workflow`\nActivate a workflow.\n\n**Parameters**:\n- `workflow_id` (required): The workflow ID\n\n**Example**:\n```\nActivate workflow 123\n```\n\n#### `deactivate_workflow`\nDeactivate a workflow.\n\n**Parameters**:\n- `workflow_id` (required): The workflow ID\n\n**Example**:\n```\nDeactivate workflow 123\n```\n\n#### `execute_workflow`\nManually execute a workflow.\n\n**Parameters**:\n- `workflow_id` (required): The workflow ID\n- `data` (optional): JSON string of input data\n\n**Example**:\n```\nExecute workflow 123 with this data: {\"name\": \"test\"}\n```\n\n### Execution Monitoring\n\n#### `list_executions`\nList workflow executions.\n\n**Parameters**:\n- `workflow_id` (optional): Filter by workflow ID\n- `status` (optional): Filter by status (\"success\", \"error\", \"waiting\", \"running\")\n- `limit` (optional): Maximum number of results (default: 20)\n\n**Example**:\n```\nShow me the last 10 failed executions\n```\n\n#### `get_execution`\nGet details of a specific execution.\n\n**Parameters**:\n- `execution_id` (required): The execution ID\n\n**Example**:\n```\nShow me execution 456\n```\n\n#### `delete_execution`\nDelete an execution.\n\n**Parameters**:\n- `execution_id` (required): The execution ID\n\n**Example**:\n```\nDelete execution 456\n```\n\n### Credentials\n\n#### `list_credentials`\nList all credentials (without sensitive data).\n\n**Example**:\n```\nShow me all available credentials\n```\n\n## Example Workflows\n\n### Simple HTTP Request Workflow\n\n```json\n{\n  \"name\": \"Simple HTTP Request\",\n  \"nodes\": [\n    {\n      \"parameters\": {},\n      \"name\": \"Start\",\n      \"type\": \"n8n-nodes-base.start\",\n      \"typeVersion\": 1,\n      \"position\": [250, 300]\n    },\n    {\n      \"parameters\": {\n        \"url\": \"https://api.example.com/data\",\n        \"options\": {}\n      },\n      \"name\": \"HTTP Request\",\n      \"type\": \"n8n-nodes-base.httpRequest\",\n      \"typeVersion\": 1,\n      \"position\": [450, 300]\n    }\n  ],\n  \"connections\": {\n    \"Start\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"HTTP Request\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    }\n  }\n}\n```\n\n## Development\n\n### Watch Mode\n\nFor development with auto-rebuild:\n\n```bash\nnpm run dev\n```\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Testing\n\nYou can test the server by running it directly:\n\n```bash\nN8N_BASE_URL=https://your-n8n-instance.com/api/v1 \\\nN8N_API_KEY=your-api-key \\\nnpm start\n```\n\n## Troubleshooting\n\n### Connection Issues\n\n- Verify your `N8N_BASE_URL` includes the `/api/v1` path\n- Check that your API key is valid\n- Ensure your n8n instance is accessible from the machine running the MCP server\n\n### Authentication Errors\n\n- Regenerate your API key in n8n settings\n- Verify the API key is correctly set in the environment variables\n\n### Workflow Execution Fails\n\n- Check that the workflow is properly activated\n- Verify all required credentials are configured in n8n\n- Review execution logs using `get_execution`\n\n## Security Notes\n\n- Keep your API key secure and never commit it to version control\n- Use environment variables or secure secret management\n- The `list_credentials` tool does not expose sensitive credential data\n- Consider using n8n's permission system to limit API key access\n\n## API Documentation\n\nFor more information about the n8n API, see:\n- [n8n API Documentation](https://docs.n8n.io/api/)\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n","readmeFilename":"README.md"}