- Implemented MCP server with 8 n8n tools - Added n8n API client for workflow operations - Configured VS Code settings with API authentication - Added comprehensive documentation and setup guides - Tested and verified connection to n8n instance
4.3 KiB
4.3 KiB
🎉 n8n VS Code Integration - Ready to Use!
Your n8n MCP (Model Context Protocol) server has been successfully set up and configured!
✅ What's Been Installed
- MCP Server - TypeScript-based server that connects VS Code to n8n
- n8n API Client - Handles all communication with your n8n instance
- Configuration Files - Pre-configured with your n8n instance and API key
- Documentation - Complete setup and usage guides
🔧 Current Configuration
- n8n Instance:
http://srvdocker02:8098 - API Key: Configured ✓
- Connection Status: ✅ Successfully connected
- Workflows Found: 1 workflow ("My workflow")
🚀 Next Steps
1. Restart VS Code
For the MCP server to be available in GitHub Copilot Chat, you need to restart VS Code:
- Close and reopen VS Code
- Or use
Cmd/Ctrl + Shift + P→ "Developer: Reload Window"
2. Start Using It!
Open GitHub Copilot Chat and try these commands:
List Workflows
@workspace List all my n8n workflows
Get Workflow Details
@workspace Show me the details of the workflow "My workflow"
Execute a Workflow
@workspace Execute the workflow with ID Zk4gbBzjxVppHiCB
View Executions
@workspace Show me recent executions
Update a Workflow
@workspace Update workflow Zk4gbBzjxVppHiCB to deactivate it
📋 Available Operations
The MCP server provides these tools to GitHub Copilot:
| Tool | Description |
|---|---|
list_workflows |
List all workflows in your n8n instance |
get_workflow |
Get complete workflow details including nodes |
update_workflow |
Modify workflow configuration |
activate_workflow |
Activate a workflow |
deactivate_workflow |
Deactivate a workflow |
execute_workflow |
Manually trigger a workflow |
get_execution |
Get details of a specific execution |
list_executions |
View execution history |
🧪 Testing
Test the connection anytime with:
node test-connection.js
Expected output:
✓ Successfully connected to n8n!
✓ Found 1 workflow(s)
📁 Project Structure
n8n_vscode_integration/
├── src/
│ ├── index.ts # Main MCP server
│ └── n8n-client.ts # n8n API client
├── dist/ # Compiled JavaScript
├── .vscode/
│ └── settings.json # VS Code MCP configuration
├── .env # Environment variables (API key)
├── package.json # Dependencies
├── README.md # Full documentation
├── SETUP.md # Setup guide
└── test-connection.js # Connection test script
🔒 Security Note
Your API key is stored in:
.envfile (for local testing).vscode/settings.json(for MCP server)
Both files are in .gitignore to prevent accidental commits. Keep your API key secure!
🛠️ Development
If you want to modify the server:
# Watch for changes and rebuild automatically
npm run watch
# Or build manually
npm run build
# After rebuilding, restart VS Code to reload the MCP server
📖 Documentation
- README.md - Complete documentation and API reference
- SETUP.md - Detailed setup instructions
- THIS FILE - Quick start guide
💡 Example Use Cases
- Workflow Development: Ask Copilot to help you understand and modify workflows
- Automation: Execute workflows directly from VS Code
- Monitoring: Check execution history and debug failures
- Documentation: Have Copilot explain what your workflows do
- Batch Operations: Use Copilot to perform operations on multiple workflows
🆘 Need Help?
If something doesn't work:
- Check that VS Code has been restarted
- Verify the connection:
node test-connection.js - Check VS Code Output panel: View → Output → GitHub Copilot Chat
- Review SETUP.md for troubleshooting steps
🎯 What You Can Ask Copilot
- "List all my n8n workflows"
- "Show me the most recent executions"
- "Execute workflow X"
- "What does workflow Y do?" (Copilot will fetch and analyze it)
- "Activate all inactive workflows"
- "Show me failed executions"
- "Update workflow X to change [setting]"
You're all set! Restart VS Code and start using n8n with GitHub Copilot Chat! 🚀