feat: SSE (Server-Sent Events) support for n8n integration
- Added SSE server implementation for real-time event streaming - Created n8n compatibility mode with strict schema validation - Implemented session management for concurrent connections - Added comprehensive SSE documentation and examples - Enhanced MCP tools with async execution support - Added Docker Compose configuration for SSE deployment - Included test scripts and integration tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
95
examples/n8n-mcp-sse-workflow.json
Normal file
95
examples/n8n-mcp-sse-workflow.json
Normal file
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"name": "MCP Server Trigger with SSE Example",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"eventSourceUrl": "http://localhost:3000/sse",
|
||||
"messageEndpoint": "http://localhost:3000/mcp/message",
|
||||
"authentication": "bearerToken",
|
||||
"options": {
|
||||
"reconnect": true,
|
||||
"reconnectInterval": 5000
|
||||
}
|
||||
},
|
||||
"id": "mcp-server-trigger",
|
||||
"name": "MCP Server Trigger",
|
||||
"type": "n8n-nodes-base.mcpServerTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [250, 300],
|
||||
"credentials": {
|
||||
"mcpApi": {
|
||||
"id": "1",
|
||||
"name": "MCP API"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "callTool",
|
||||
"toolName": "={{ $json.toolName }}",
|
||||
"toolArguments": "={{ JSON.stringify($json.arguments) }}"
|
||||
},
|
||||
"id": "mcp-client",
|
||||
"name": "MCP Client",
|
||||
"type": "n8n-nodes-base.mcp",
|
||||
"typeVersion": 1,
|
||||
"position": [450, 300],
|
||||
"credentials": {
|
||||
"mcpApi": {
|
||||
"id": "1",
|
||||
"name": "MCP API"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "response",
|
||||
"value": "={{ JSON.stringify($json) }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "set-response",
|
||||
"name": "Format Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 1,
|
||||
"position": [650, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"MCP Server Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "MCP Client",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"MCP Client": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"pinData": {},
|
||||
"versionId": "sse-example-v1",
|
||||
"triggerCount": 0,
|
||||
"tags": []
|
||||
}
|
||||
Reference in New Issue
Block a user