MCP.so
登录

n8n AI Agent with Local MCP Integration (Docker + npx)

@s1ds1ngh

基本信息

分类

推理

传输方式

stdio

作者

s1ds1ngh

关于 n8n AI Agent with Local MCP Integration

暂无概览

n8n AI Agent with Local MCP Integration 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "Case-Study-RAG-Workflow-automation-with-n8n-and-gdrive-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-it",
        "--rm",
        "--name",
        "n8n",
        "-p",
        "5678:5678",
        "\\"
      ]
    }
  }
}

n8n AI Agent with Local MCP Integration 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is n8n AI Agent with Local MCP Integration (Docker + npx)?

This repository provides an n8n workflow that integrates the Model Context Protocol (MCP) with a locally run n8n instance via Docker. It enables AI Agents to dynamically discover and use external tools (e.g., web search) by running MCP servers on‑the‑fly with the npx command, removing the need for persistent server installations. It targets n8n users who want to extend their AI Agents with modular, on‑demand tooling.

How to use n8n AI Agent with Local MCP Integration (Docker + npx)?

  1. Start n8n in Docker with the environment variable N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true.
  2. Install the community node n8n-nodes-mcp via n8n’s Settings → Community Nodes.
  3. Create an MCP Client credential using Command Line (STDIO), setting the command to npx and the arguments to the desired MCP server (e.g., run -y @modelcontextprotocol/server-brave-search). Add any required API keys as environment variables.
  4. Import the provided workflow JSON, configure the AI Agent’s chat model and memory, and activate the workflow.
  5. Use the n8n chat interface to send queries; the AI Agent will automatically list available MCP tools and execute the appropriate one.

Key features of n8n AI Agent with Local MCP Integration (Docker + npx)

  • On‑demand tool discovery and execution via MCP
  • Uses npx to run MCP servers without permanent installation
  • Runs n8n locally inside a Docker container
  • AI Agent intelligently selects tools based on schema
  • Supports API keys through credential environment variables
  • Easily swap MCP servers by changing the npx command

Use cases of n8n AI Agent with Local MCP Integration (Docker + npx)

  • Enable an AI Agent to perform web searches through Brave Search
  • List all available tools dynamically and let the AI choose one
  • Execute external APIs (e.g., weather, news) without a dedicated server
  • Quickly prototype AI workflows that require ephemeral tooling

常见问题

1

Why is the `N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE` flag required?

This environment variable lets the AI Agent node treat community nodes (like the MCP Client) as executable tools. Without it, the Agent cannot call the MCP Client operations.

2

How does the `npx` method work for running MCP servers?

`npx` runs Node.js packages from the npm registry without permanently installing them. Inside the MCP Client credential, you set the command to `npx` and provide the server’s package name and arguments. n8n executes this command via STDIO to communicate with the MCP server.

3

What are the system requirements?

Docker must be installed and running on your local machine. Node.js and npm are recommended for troubleshooting and ensuring `npx` is available. You also need a basic understanding of n8n workflows and credentials.

4

Can I use a different MCP server instead of Brave Search?

Yes. Find the `npx` command for any MCP server (e.g., `@modelcontextprotocol/server-everything`) and replace the arguments in the credential. Add any required environment variables (like API keys) as needed.

5

How do I provide API keys for authenticated MCP servers?

In the MCP Client credential, under **Environments**, click **Add Environment Variable**. Enter the exact name required by the MCP server (e.g., `BRAVE_API_KEY`) and your key as the value. The server will receive this variable when launched via `npx`.

评论

推理 分类下的更多 MCP 服务器