npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-mcp-enhanced

v1.0.11

Published

Enhanced MCP nodes for n8n with AI Agent support

Downloads

179

Readme

n8n-nodes-mcp-enhanced

Enhanced MCP Client for n8n with AI Agent Support

This is an enhanced version of the n8n community node that lets you interact with Model Context Protocol (MCP) servers in your n8n workflows, with special optimizations for AI Agent integration.

Key Enhancement: Tool Name and Tool Parameters are now fully JSON-compatible, allowing AI Agents to automatically select and configure MCP tools without manual intervention.

MCP is a protocol that enables AI models to interact with external tools and data sources in a standardized way. This node allows you to connect to MCP servers, access resources, execute tools, and use prompts.

n8n is a fair-code licensed workflow automation platform.

What's Enhanced

AI Agent Compatibility

  • Direct Field Control: AI Agents can now directly control both Tool Name and Tool Parameters fields
  • Automatic Tool Selection: Tool Name field now supports AI Agent "let the model define this parameter" feature
  • Flexible Parameter Formats: Support multiple input formats for maximum compatibility
  • Backward Compatibility: All existing workflows continue to work unchanged

Enhanced Parameter Handling

The node now supports multiple parameter formats with intelligent parsing:

// AI Agent Direct Control (v1.0.5+, recommended)
Tool Name: "search_arxiv"                    // AI Agent sets this directly
Tool Parameters: {                           // AI Agent sets this directly
  "query": "artificial intelligence",
  "max_results": 10
}

// Nested format (legacy, still supported)
Tool Name: ""                                // Can be empty
Tool Parameters: [{
  "Tool_Parameters": {
    "tool_name": "search_arxiv", 
    "parameters": {
      "query": "artificial intelligence",
      "max_results": 10
    }
  }
}]

// Direct nested format
Tool Name: ""                                // Can be empty  
Tool Parameters: {
  "Tool_Parameters": {
    "tool_name": "search_arxiv",
    "parameters": {...}
  }
}

Parsing Priority Logic

  1. Tool Name field priority: If Tool Name is set, it takes precedence
  2. Parameter extraction: Tool Parameters are parsed as direct parameters
  3. Nested fallback: If Tool Name is empty, extract from nested Tool_Parameters structure
  4. Legacy support: Maintains compatibility with all previous formats

Installation

Follow the installation guide in the n8n community nodes documentation.

Install via npm

npm install n8n-nodes-mcp-enhanced

Install in n8n

  1. Go to Settings > Community Nodes
  2. Enter package name: n8n-nodes-mcp-enhanced
  3. Click Install

Important: Set the N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE environment variable to true if you want to use the MCP Client node as a tool in AI Agents.

Credentials

The MCP Client node supports three types of credentials to connect to an MCP server:

Command-line Based Transport (STDIO)

  • Command: The command to start the MCP server
  • Arguments: Optional arguments to pass to the server command
  • Environment Variables: Variables to pass to the server in NAME=VALUE format

HTTP Streamable Transport (Recommended)

  • HTTP Streamable URL: The HTTP endpoint that supports streaming responses
  • Additional Headers: Optional headers to send with requests

Server-Sent Events (SSE) Transport (Legacy)

  • SSE URL: The URL of the SSE endpoint
  • Messages Post Endpoint: Optional custom endpoint for posting messages
  • Additional Headers: Optional headers to send with requests

Operations

  • Execute Tool - Execute a specific tool with parameters (Enhanced for AI Agents)
  • Get Prompt - Get a specific prompt template
  • List Prompts - Get a list of available prompts
  • List Resources - Get a list of available resources from the MCP server
  • List Tools - Get a list of available tools
  • Read Resource - Read a specific resource by URI

Using with AI Agents

Enable Tool Usage

Set environment variable:

export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true

AI Agent Integration

  1. Add MCP Client node to your workflow
  2. Configure credentials for your MCP server
  3. In AI Agent node, enable MCP Client as a tool
  4. AI Agent will automatically control both Tool Name and Tool Parameters fields

v1.0.5+ Enhanced AI Agent Experience

With the latest improvements, AI Agents can now:

  • Directly set Tool Name: "let the model define this parameter" option available
  • Directly set Tool Parameters: Full control over parameter structure
  • Intelligent parsing: Automatic handling of different input formats
  • Better UX: Cleaner separation between tool selection and parameters

Custom Tool Name (Hybrid input)

  • When to use: If the desired tool is not listed, or you want the AI to provide the exact name as text
  • How it works:
    1. In Tool Name or ID, choose Custom Tool Name... (listed after server tools)
    2. A new field Custom Tool Name appears
    3. Enter the exact tool name (or let the AI fill it when used as a tool)
    4. Provide Tool Parameters as JSON
  • Validation: The custom name is validated against the MCP server's available tools before execution. If it doesn't exist, the node returns a helpful error listing available tools.

Example AI Agent Prompt

Search for recent papers about "transformer architecture" using arXiv, 
then summarize the top 3 results.

The AI Agent will automatically:

  1. Set Tool Name to "search_arxiv" (directly in Tool Name field)
  2. Set Tool Parameters to {"query": "transformer architecture", "max_results": 3}
  3. Execute the search with proper MCP protocol handling
  4. Process and return results

Environment Variables

Support for Docker environment variables with MCP_ prefix:

version: '3'
services:
  n8n:
    image: n8nio/n8n
    environment:
      - MCP_BRAVE_API_KEY=your-api-key
      - MCP_OPENAI_API_KEY=your-openai-key
      - N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true

Compatibility

  • Requires n8n version 1.0.0 or later
  • Compatible with MCP Protocol version 1.0.0 or later
  • Supports STDIO, HTTP Streamable, and SSE transports
  • Fully backward compatible with existing workflows

Original Project

This is an enhanced version based on n8n-nodes-mcp by Jd Fiscus.

License

MIT License - See LICENSE.md for details.

Resources