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

@emit-ia/n8n-template-mcp

v1.1.0

Published

Model Context Protocol server for n8n templates - Enables AI agents to search, browse, and export n8n workflow templates via official APIs

Readme

N8N Template MCP Server

A Model Context Protocol (MCP) server that provides Claude Desktop with structured access to n8n workflow templates via n8n's official REST API. This server enables Claude to search, browse, and export n8n templates without web scraping, providing fast and stable access to the n8n community template ecosystem.

Features

= Template Search - Search n8n community templates by query, category, tags, or node types
=� Template Details - Get complete template information including workflow JSON
=� Category Browse - List all template categories and subcategories
=' Node Discovery - Find templates that use specific node types
=� Export Ready - Export templates in n8n-compatible JSON format
Smart Caching - Intelligent caching with configurable TTL for optimal performance
=� Error Handling - Robust error handling with retry logic and graceful degradation

Quick Start

Installation

# Install dependencies
npm install

# Build the project
npm run build

# Run with npx (recommended)
npx --package=@emit-ia/n8n-template-mcp n8n-template-mcp

NPX Usage

The easiest way to use this MCP server is with npx:

# Run the server directly
npx --package=@emit-ia/n8n-template-mcp n8n-template-mcp

# With Claude Desktop, add to your configuration:
{
  "mcpServers": {
    "n8n-templates": {
      "command": "npx",
      "args": ["@igoragoli/n8n-template-mcp"]
    }
  }
}

Available Tools

=

Template Discovery

n8n_search_templates

Search n8n community templates with flexible filtering options.

Parameters:

  • query (optional): Search term
  • page (optional): Page number (default: 1)
  • limit (optional): Results per page (default: 24, max: 100)
  • category (optional): Filter by category
  • subcategory (optional): Filter by subcategory
  • tags (optional): Array of tags to filter by
  • nodeTypes (optional): Array of node types to filter by
  • official (optional): Filter official templates only

Example:

{
  "query": "Google Sheets automation",
  "category": "Data Processing",
  "limit": 10,
  "official": true
}

n8n_list_categories

Get all available template categories and their counts.

Example Response:

{
  "success": true,
  "data": [
    {
      "name": "Data Processing",
      "count": 45,
      "subcategories": [
        {"name": "ETL", "count": 12},
        {"name": "Analytics", "count": 8}
      ]
    }
  ]
}

n8n_find_by_node

Find templates that use a specific node type.

Parameters:

  • nodeType: Node type to search for (e.g., "MySQL", "Slack", "Google Sheets")

Example:

{
  "nodeType": "MySQL"
}

=� Template Management

n8n_get_template

Get detailed information about a specific template including full workflow JSON.

Parameters:

  • templateId: Template ID from search results

Example Response:

{
  "success": true,
  "data": {
    "id": "123",
    "name": "MySQL to Google Sheets Sync",
    "description": "Automatically sync MySQL data to Google Sheets",
    "category": "Data Processing",
    "tags": ["mysql", "google-sheets", "sync"],
    "nodes": [
      {
        "name": "MySQL Node",
        "type": "mysql",
        "position": [100, 200]
      }
    ],
    "workflow": { /* Full n8n workflow JSON */ },
    "author": {
      "name": "Community User",
      "avatar": "https://..."
    }
  }
}

n8n_export_templates

Export multiple templates as n8n-compatible workflow JSON files.

Parameters:

  • templateIds: Array of template IDs to export
  • format (optional): Export format ("n8n" or "json", default: "n8n")

Example:

{
  "templateIds": ["123", "456", "789"],
  "format": "n8n"
}

Example Response:

{
  "success": true,
  "data": {
    "version": "1.0",
    "workflows": [
      {
        "name": "MySQL to Google Sheets Sync (imported from n8n community)",
        "nodes": [ /* workflow nodes */ ],
        "connections": { /* node connections */ },
        "meta": {
          "templateId": "123",
          "originalName": "MySQL to Google Sheets Sync",
          "category": "Data Processing",
          "importedAt": "2024-01-15T10:30:00Z"
        }
      }
    ],
    "exportedAt": "2024-01-15T10:30:00Z",
    "metadata": {
      "templateCount": 3,
      "nodeTypes": ["mysql", "googleSheets", "set"]
    }
  }
}

=� Utility Tools

n8n_health_check

Check the health and availability of the n8n community API and cache status.

n8n_clear_cache

Clear the template cache to force fresh data retrieval.

Configuration

Environment Variables

Copy .env.example to .env and configure:

# N8N API Configuration
N8N_API_BASE=https://api.n8n.io
ENABLE_GRAPHQL=false

# Cache Configuration (in seconds)
CACHE_SEARCH_TTL=900        # 15 minutes
CACHE_TEMPLATE_TTL=3600     # 1 hour
CACHE_CATEGORIES_TTL=86400  # 24 hours
CACHE_MAX_SIZE=1000

# Rate Limiting
RATE_LIMIT_MAX=10           # Max requests per minute
RATE_LIMIT_WINDOW=60000     # 1 minute window

Cache Strategy

The server implements intelligent caching to minimize API calls and improve performance:

  • Search Results: Cached for 15 minutes
  • Template Details: Cached for 1 hour
  • Categories: Cached for 24 hours
  • Memory Management: LRU eviction with configurable max size

Integration with Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "n8n-templates": {
      "command": "npx",
      "args": ["@igoragoli/n8n-template-mcp"],
      "env": {
        "N8N_API_BASE": "https://api.n8n.io",
        "CACHE_SEARCH_TTL": "900"
      }
    }
  }
}

Development

Local Development

# Install dependencies
npm install

# Start development server with hot reload
npm run dev

# Build for production
npm run build

# Start production server
npm start

Testing

# Run tests
npm test

# Test with MCP Inspector
npm run dev
# Open http://localhost:3001 for MCP Inspector

Project Structure

src/
�� index.ts              # Main server entry point
�� services/
   �� base.service.ts   # Base HTTP service class
   �� n8n.service.ts    # N8N API service
   �� index.ts          # Service exports
�� tools/
   �� template.tool.ts  # Template management tools
   �� workflow.tool.ts  # Workflow export tools
   �� index.ts          # Tool registration
�� types/
   �� index.ts          # TypeScript type definitions
�� utils/
    �� cache.ts          # Caching implementation
    �� tools.ts          # Tool creation utilities

API Endpoints

This MCP server uses the following n8n community API endpoints:

  • GET /templates/search - Search templates
  • GET /templates/workflows/{id} - Get template details
  • GET /templates/categories - List categories
  • GET /health - API health check

Error Handling

The server implements comprehensive error handling:

  • Network Errors: Automatic retry with exponential backoff
  • Rate Limiting: Respect API rate limits with delay
  • API Errors: Graceful degradation with meaningful error messages
  • Cache Errors: Fallback to direct API calls when cache fails

Performance

  • Sub-200ms response times for cached queries
  • Smart caching reduces API calls by 80%+
  • Memory efficient with configurable cache limits
  • Concurrent request handling for multiple operations

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

For issues and questions:

  • Create an issue on GitHub
  • Check the n8n community documentation
  • Review the MCP specification

Built for the 18-Agent Automated Income Ecosystem
Part of Igor's comprehensive automation framework targeting �2,500+/month by November 2025.