# n8n-nodes-mcp-local

**Transform any MCP server into native AI Agent tools.**

[![npm version](https://badge.fury.io/js/n8n-nodes-mcp-local.svg)](https://www.npmjs.com/package/n8n-nodes-mcp-local)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## Quick Start

1. **Install**: Settings → Community Nodes → `n8n-nodes-mcp-local`
2. **Workflow**: Add AI Agent + MCP Local Provider → Connect via tool
3. **Credentials**: Create "MCP Server (STDIO)" → Package: `wikipedia-mcp` → **Save** triggers `npx` and discovers tools
4. **Done.** All MCP tools appear at your Agent.

---

## Why This Node?

Most MCP servers are **STDIO-based** — designed to run locally via `npx`. n8n has two existing options, but neither gives you direct access:

|  | [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** |
|--|:--------------:|:--------------:|:-------------:|
| **STDIO / npx** | ❌ | ✅ | ✅ |
| **SSE / HTTP** | ✅ | ✅ | ❌ |
| **Agent sees individual tools** | ✅ | ❌ | ✅ |
| **Tool selection (include/exclude)** | ✅ | ❌ | ✅ |

### What's Missing

**n8n Native** gives you clean Agent integration, but no STDIO. You'd need to host MCP servers yourself.

**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.

---


### Direct Access

```
nerding.io:   Agent → "List Tools" → "Execute Tool" → Result
This node:    Agent → tool_name() → Result
```

No detours. The Agent sees every tool, reads its description, and calls it like any native function.

---

## Built for Flow

This node uses `npx` — the MCP server is fetched on every execution

No setup friction. Test ideas, iterate fast, ship when it works.

When you're ready for production scale with high-frequency calls, host your MCP server and switch to the native n8n MCP Client.

---

## How It Works

```
┌──────────────────┐       ┌──────────────────┐
│  MCP Local       │──────►│    AI Agent      │
│  Provider        │       │                  │
└──────────────────┘       └──────────────────┘
         │
         ▼
    npx wikipedia-mcp
         │
         ▼
    Tools discovered & registered:
    • store_memory
    • retrieve_memory
    • list_memories
```

---

## Configuration

### Credentials

| Field | Description | Example |
|-------|-------------|---------|
| **MCP Package** | npm package name | `wikipedia-mcp` |
| **Environment Variables** | Optional config | `API_KEY=xxx` |

### Node Options

| Option | Description |
|--------|-------------|
| **Tools Mode** | all / selected / exclude |
| **Include/Exclude Tools** | Filter which tools the Agent sees |

---

## Troubleshooting

**First run slow?**
`npx` downloads the package. Subsequent runs use npm cache.

**No tools discovered?**
Check package name. Some servers need environment variables.

---

## License

MIT

## Credits

[Model Context Protocol](https://modelcontextprotocol.io/) by Anthropic • [n8n](https://n8n.io/)

---

Build something. Ship it.