Implement n8n-MCP integration

This commit adds a complete integration between n8n workflow automation and the Model Context Protocol (MCP):

Features:
- MCP server that exposes n8n workflows as tools, resources, and prompts
- Custom n8n node for connecting to MCP servers from workflows
- Bidirectional bridge for data format conversion
- Token-based authentication and credential management
- Comprehensive error handling and logging
- Full test coverage for core components

Infrastructure:
- TypeScript/Node.js project setup with proper build configuration
- Docker support with multi-stage builds
- Development and production docker-compose configurations
- Installation script for n8n custom node deployment

Documentation:
- Detailed README with usage examples and API reference
- Environment configuration templates
- Troubleshooting guide

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-06-07 15:43:02 +00:00
parent b51591a87d
commit 1f8140c45c
28 changed files with 17543 additions and 0 deletions

34
src/mcp/resources.ts Normal file
View File

@@ -0,0 +1,34 @@
import { ResourceDefinition } from '../types';
export const n8nResources: ResourceDefinition[] = [
{
uri: 'workflow://active',
name: 'Active Workflows',
description: 'List of all active workflows in n8n',
mimeType: 'application/json',
},
{
uri: 'workflow://all',
name: 'All Workflows',
description: 'List of all workflows in n8n',
mimeType: 'application/json',
},
{
uri: 'execution://recent',
name: 'Recent Executions',
description: 'Recent workflow execution history',
mimeType: 'application/json',
},
{
uri: 'credentials://types',
name: 'Credential Types',
description: 'Available credential types in n8n',
mimeType: 'application/json',
},
{
uri: 'nodes://available',
name: 'Available Nodes',
description: 'List of all available n8n nodes',
mimeType: 'application/json',
},
];