mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-23 10:53:07 +00:00
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:
51
src/n8n/MCPApi.credentials.ts
Normal file
51
src/n8n/MCPApi.credentials.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class MCPApi implements ICredentialType {
|
||||
name = 'mcpApi';
|
||||
displayName = 'MCP API';
|
||||
documentationUrl = 'mcp';
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Server URL',
|
||||
name: 'serverUrl',
|
||||
type: 'string',
|
||||
default: 'http://localhost:3000',
|
||||
placeholder: 'http://localhost:3000',
|
||||
description: 'The URL of the MCP server',
|
||||
},
|
||||
{
|
||||
displayName: 'Authentication Token',
|
||||
name: 'authToken',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
description: 'Authentication token for the MCP server (if required)',
|
||||
},
|
||||
{
|
||||
displayName: 'Connection Type',
|
||||
name: 'connectionType',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'HTTP',
|
||||
value: 'http',
|
||||
},
|
||||
{
|
||||
name: 'WebSocket',
|
||||
value: 'websocket',
|
||||
},
|
||||
{
|
||||
name: 'STDIO',
|
||||
value: 'stdio',
|
||||
},
|
||||
],
|
||||
default: 'http',
|
||||
description: 'How to connect to the MCP server',
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user