n8n-nodes-mcp-local 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +118 -0
- package/dist/credentials/McpServerApi.credentials.d.ts +14 -0
- package/dist/credentials/McpServerApi.credentials.d.ts.map +1 -0
- package/dist/credentials/McpServerApi.credentials.js +38 -0
- package/dist/credentials/McpServerApi.credentials.js.map +1 -0
- package/dist/credentials/index.d.ts +2 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +6 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/McpToolsProvider/McpToolsProvider.node.d.ts +26 -0
- package/dist/nodes/McpToolsProvider/McpToolsProvider.node.d.ts.map +1 -0
- package/dist/nodes/McpToolsProvider/McpToolsProvider.node.js +536 -0
- package/dist/nodes/McpToolsProvider/McpToolsProvider.node.js.map +1 -0
- package/dist/nodes/McpToolsProvider/mcp.svg +7 -0
- package/dist/types.d.ts +71 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/schemaConverter.d.ts +83 -0
- package/dist/utils/schemaConverter.d.ts.map +1 -0
- package/dist/utils/schemaConverter.js +203 -0
- package/dist/utils/schemaConverter.js.map +1 -0
- package/dist/utils/toolsCache.d.ts +57 -0
- package/dist/utils/toolsCache.d.ts.map +1 -0
- package/dist/utils/toolsCache.js +262 -0
- package/dist/utils/toolsCache.js.map +1 -0
- package/package.json +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Philflow
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# n8n-nodes-mcp-local
|
|
2
|
+
|
|
3
|
+
**Transform any MCP server into native AI Agent tools.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/n8n-nodes-mcp-local)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
1. **Install**: Settings → Community Nodes → `n8n-nodes-mcp-local`
|
|
13
|
+
2. **Workflow**: Add AI Agent + MCP Local Provider → Connect via tool
|
|
14
|
+
3. **Credentials**: Create "MCP Server (STDIO)" → Package: `wikipedia-mcp` → **Save** triggers `npx` and discovers tools
|
|
15
|
+
4. **Done.** All MCP tools appear at your Agent.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Why This Node?
|
|
20
|
+
|
|
21
|
+
Most MCP servers are **STDIO-based** — designed to run locally via `npx`. n8n has two existing options, but neither gives you direct access:
|
|
22
|
+
|
|
23
|
+
| | [n8n Native MCP](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolmcp/) | [nerding.io MCP](https://github.com/nerding-io/n8n-nodes-mcp) | **This Node** |
|
|
24
|
+
|--|:--------------:|:--------------:|:-------------:|
|
|
25
|
+
| **STDIO / npx** | ❌ | ✅ | ✅ |
|
|
26
|
+
| **SSE / HTTP** | ✅ | ✅ | ❌ |
|
|
27
|
+
| **Agent sees individual tools** | ✅ | ❌ | ✅ |
|
|
28
|
+
| **Tool selection (include/exclude)** | ✅ | ❌ | ✅ |
|
|
29
|
+
|
|
30
|
+
### What's Missing
|
|
31
|
+
|
|
32
|
+
**n8n Native** gives you clean Agent integration, but no STDIO. You'd need to host MCP servers yourself.
|
|
33
|
+
|
|
34
|
+
**nerding.io** has STDIO, but requires two separate nodes for every call. The Agent never sees actual tools — just a "List Tools" and "Execute Tool" wrapper. More indirection, less reliable tool calls.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Direct Access
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
nerding.io: Agent → "List Tools" → "Execute Tool" → Result
|
|
43
|
+
This node: Agent → tool_name() → Result
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
No detours. The Agent sees every tool, reads its description, and calls it like any native function.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Built for Flow
|
|
51
|
+
|
|
52
|
+
This node uses `npx` — the MCP server is fetched on every execution
|
|
53
|
+
|
|
54
|
+
No setup friction. Test ideas, iterate fast, ship when it works.
|
|
55
|
+
|
|
56
|
+
When you're ready for production scale with high-frequency calls, host your MCP server and switch to the native n8n MCP Client.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## How It Works
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
┌──────────────────┐ ┌──────────────────┐
|
|
64
|
+
│ MCP Local │──────►│ AI Agent │
|
|
65
|
+
│ Provider │ │ │
|
|
66
|
+
└──────────────────┘ └──────────────────┘
|
|
67
|
+
│
|
|
68
|
+
▼
|
|
69
|
+
npx wikipedia-mcp
|
|
70
|
+
│
|
|
71
|
+
▼
|
|
72
|
+
Tools discovered & registered:
|
|
73
|
+
• store_memory
|
|
74
|
+
• retrieve_memory
|
|
75
|
+
• list_memories
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Configuration
|
|
81
|
+
|
|
82
|
+
### Credentials
|
|
83
|
+
|
|
84
|
+
| Field | Description | Example |
|
|
85
|
+
|-------|-------------|---------|
|
|
86
|
+
| **MCP Package** | npm package name | `wikipedia-mcp` |
|
|
87
|
+
| **Environment Variables** | Optional config | `API_KEY=xxx` |
|
|
88
|
+
|
|
89
|
+
### Node Options
|
|
90
|
+
|
|
91
|
+
| Option | Description |
|
|
92
|
+
|--------|-------------|
|
|
93
|
+
| **Tools Mode** | all / selected / exclude |
|
|
94
|
+
| **Include/Exclude Tools** | Filter which tools the Agent sees |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Troubleshooting
|
|
99
|
+
|
|
100
|
+
**First run slow?**
|
|
101
|
+
`npx` downloads the package. Subsequent runs use npm cache.
|
|
102
|
+
|
|
103
|
+
**No tools discovered?**
|
|
104
|
+
Check package name. Some servers need environment variables.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT
|
|
111
|
+
|
|
112
|
+
## Credits
|
|
113
|
+
|
|
114
|
+
[Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic • [n8n](https://n8n.io/)
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
Build something. Ship it.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server API Credentials
|
|
3
|
+
*
|
|
4
|
+
* Stores MCP Server connection configuration for reuse across workflows.
|
|
5
|
+
* Simplified: Just enter the MCP package name, we handle the rest.
|
|
6
|
+
*/
|
|
7
|
+
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
8
|
+
export declare class McpServerApi implements ICredentialType {
|
|
9
|
+
name: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
documentationUrl: string;
|
|
12
|
+
properties: INodeProperties[];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=McpServerApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerApi.credentials.d.ts","sourceRoot":"","sources":["../../src/credentials/McpServerApi.credentials.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAErE,qBAAa,YAAa,YAAW,eAAe;IAClD,IAAI,SAAkB;IACtB,WAAW,SAAwB;IACnC,gBAAgB,SAAsC;IAEtD,UAAU,EAAE,eAAe,EAAE,CAuB3B;CACH"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Server API Credentials
|
|
4
|
+
*
|
|
5
|
+
* Stores MCP Server connection configuration for reuse across workflows.
|
|
6
|
+
* Simplified: Just enter the MCP package name, we handle the rest.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.McpServerApi = void 0;
|
|
10
|
+
class McpServerApi {
|
|
11
|
+
name = 'mcpServerApi';
|
|
12
|
+
displayName = 'MCP Server (STDIO)';
|
|
13
|
+
documentationUrl = 'https://modelcontextprotocol.io/';
|
|
14
|
+
properties = [
|
|
15
|
+
{
|
|
16
|
+
displayName: 'MCP Package',
|
|
17
|
+
name: 'mcpPackage',
|
|
18
|
+
type: 'string',
|
|
19
|
+
default: '',
|
|
20
|
+
required: true,
|
|
21
|
+
placeholder: '@anthropic/mcp-server-memory',
|
|
22
|
+
description: 'NPM package name of the MCP server (e.g., firecrawl-mcp, @anthropic/mcp-server-memory)',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Environment Variables',
|
|
26
|
+
name: 'envVars',
|
|
27
|
+
type: 'string',
|
|
28
|
+
default: '',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
password: true,
|
|
31
|
+
},
|
|
32
|
+
placeholder: 'API_KEY=xxx,SECRET=yyy',
|
|
33
|
+
description: 'Environment variables in NAME=VALUE format, comma-separated. Values are stored securely.',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
exports.McpServerApi = McpServerApi;
|
|
38
|
+
//# sourceMappingURL=McpServerApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerApi.credentials.js","sourceRoot":"","sources":["../../src/credentials/McpServerApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH,MAAa,YAAY;IACvB,IAAI,GAAG,cAAc,CAAC;IACtB,WAAW,GAAG,oBAAoB,CAAC;IACnC,gBAAgB,GAAG,kCAAkC,CAAC;IAEtD,UAAU,GAAsB;QAC9B;YACE,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EACT,wFAAwF;SAC3F;QACD;YACE,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD,WAAW,EAAE,wBAAwB;YACrC,WAAW,EACT,0FAA0F;SAC7F;KACF,CAAC;CACH;AA7BD,oCA6BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McpServerApi = void 0;
|
|
4
|
+
var McpServerApi_credentials_js_1 = require("./McpServerApi.credentials.js");
|
|
5
|
+
Object.defineProperty(exports, "McpServerApi", { enumerable: true, get: function () { return McpServerApi_credentials_js_1.McpServerApi; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":";;;AAAA,6EAA6D;AAApD,2HAAA,YAAY,OAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,mDAAmD,CAAC;AAClE,cAAc,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// n8n-nodes-mcp-tools
|
|
3
|
+
// MCP Tools Provider - STDIO MCP Server with Auto-Tool-Listing
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
__exportStar(require("./nodes/McpToolsProvider/McpToolsProvider.node.js"), exports);
|
|
20
|
+
__exportStar(require("./types.js"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+DAA+D;;;;;;;;;;;;;;;;AAE/D,oFAAkE;AAClE,6CAA2B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools Provider Node
|
|
3
|
+
*
|
|
4
|
+
* Lädt Tools von einem MCP Server via STDIO und stellt sie
|
|
5
|
+
* dem AI Agent als LangChain Tools zur Verfügung.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Tool caching for instant dropdown loading
|
|
9
|
+
* - Tool selection (all, selected, except)
|
|
10
|
+
* - Debug mode for troubleshooting
|
|
11
|
+
*/
|
|
12
|
+
import type { INodeType, INodeTypeDescription, ISupplyDataFunctions, IExecuteFunctions, INodeExecutionData, SupplyData, ILoadOptionsFunctions, INodePropertyOptions, ICredentialTestFunctions, ICredentialsDecrypted, ICredentialDataDecryptedObject, INodeCredentialTestResult } from 'n8n-workflow';
|
|
13
|
+
export declare class McpToolsProvider implements INodeType {
|
|
14
|
+
description: INodeTypeDescription;
|
|
15
|
+
methods: {
|
|
16
|
+
credentialTest: {
|
|
17
|
+
mcpServerConnectionTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted<ICredentialDataDecryptedObject>): Promise<INodeCredentialTestResult>;
|
|
18
|
+
};
|
|
19
|
+
loadOptions: {
|
|
20
|
+
getTools(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
24
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=McpToolsProvider.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpToolsProvider.node.d.ts","sourceRoot":"","sources":["../../../src/nodes/McpToolsProvider/McpToolsProvider.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EAEV,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AA4KtB,qBAAa,gBAAiB,YAAW,SAAS;IAChD,WAAW,EAAE,oBAAoB,CA+E/B;IAGF,OAAO;;0CAGK,wBAAwB,cAClB,qBAAqB,CAAC,8BAA8B,CAAC,GAChE,OAAO,CAAC,yBAAyB,CAAC;;;2BAoChB,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAmC9E;IAEI,UAAU,CAAC,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IA+I9E,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA2JxE"}
|