{"_id":"@emit-ia/n8n-template-mcp","_rev":"2-5bb1716d76b25a69d692b8b9b95b3279","name":"@emit-ia/n8n-template-mcp","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@emit-ia/n8n-template-mcp","version":"1.0.0","keywords":["n8n","templates","workflow","mcp","automation","model-context-protocol","n8n-templates"],"author":{"name":"Igor Almeida","email":"igor.almeida1993@gmail.com"},"license":"MIT","_id":"@emit-ia/n8n-template-mcp@1.0.0","maintainers":[{"name":"emit-ia","email":"Igor.almeida1993@gmail.com"}],"homepage":"https://github.com/emit-ia/n8n-template-mcp#readme","bugs":{"url":"https://github.com/emit-ia/n8n-template-mcp/issues"},"bin":{"n8n-template-mcp":"build/index.js"},"dist":{"shasum":"7695940910c170c2776984f35ca0b77905a56fc2","tarball":"https://registry.npmjs.org/@emit-ia/n8n-template-mcp/-/n8n-template-mcp-1.0.0.tgz","fileCount":12,"integrity":"sha512-e1UggwRxIWKDGTGENhYtUNCTEQ3IWVcA59EkzP/TcjKYXnEVqdcB2S66qlt2WD30/hQiphJGCccymo9SfbwuVg==","signatures":[{"sig":"MEUCIQDls6VKVW4jqR7FleNB3eh97RWn5BE5D2cQYPEXWXNMWQIgY4JR5IkXJwnHpVD1lAsya9NFO/nfVWsuVr1agsDmXds=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42259},"main":"build/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"db727be20c97f90a7072cc1373aaba6bdc456d94","scripts":{"dev":"concurrently \"tsc --watch\" \"npx -y @modelcontextprotocol/inspector node build/index.js\"","init":"ts-patch install -s","test":"node --test build/**/*.test.js","build":"tsc && tsc-alias","start":"node build/index.js","postbuild":"chmod +x build/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"emit-ia","actor":{"name":"emit-ia","type":"user","email":"Igor.almeida1993@gmail.com"},"email":"Igor.almeida1993@gmail.com"},"repository":{"url":"git+https://github.com/emit-ia/n8n-template-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"Model Context Protocol server for n8n templates - Enables AI agents to search, browse, and export n8n workflow templates via official APIs","directories":{},"_nodeVersion":"20.19.2","dependencies":{"zod":"^3.24.2","quick-lru":"^7.0.0","@modelcontextprotocol/sdk":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-patch":"^3.3.0","tsc-alias":"^1.8.11","typescript":"^5.8.2","@types/node":"^20.17.22","concurrently":"^9.1.2","typescript-transform-paths":"^3.5.3"},"_npmOperationalInternal":{"tmp":"tmp/n8n-template-mcp_1.0.0_1750884404531_0.3479291176225674","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@emit-ia/n8n-template-mcp","version":"1.1.0","main":"build/index.js","type":"module","scripts":{"init":"ts-patch install -s","build":"tsc && tsc-alias","dev":"concurrently \"tsc --watch\" \"npx -y @modelcontextprotocol/inspector node build/index.js\"","postbuild":"chmod +x build/index.js","start":"node build/index.js","prepublishOnly":"npm run build","test":"node --test build/**/*.test.js"},"bin":{"n8n-template-mcp":"build/index.js"},"keywords":["n8n","templates","workflow","mcp","automation","model-context-protocol","n8n-templates"],"author":{"name":"Igor Almeida","email":"igor.almeida1993@gmail.com"},"license":"MIT","description":"Model Context Protocol server for n8n templates - Enables AI agents to search, browse, and export n8n workflow templates via official APIs","repository":{"type":"git","url":"git+https://github.com/emit-ia/n8n-template-mcp.git"},"dependencies":{"@modelcontextprotocol/sdk":"^1.6.0","quick-lru":"^7.0.0","zod":"^3.24.2"},"devDependencies":{"@types/node":"^20.17.22","concurrently":"^9.1.2","ts-patch":"^3.3.0","tsc-alias":"^1.8.11","typescript":"^5.8.2","typescript-transform-paths":"^3.5.3"},"engines":{"node":">=18.0.0"},"_id":"@emit-ia/n8n-template-mcp@1.1.0","gitHead":"db727be20c97f90a7072cc1373aaba6bdc456d94","bugs":{"url":"https://github.com/emit-ia/n8n-template-mcp/issues"},"homepage":"https://github.com/emit-ia/n8n-template-mcp#readme","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Pdz2lE19r5FHKPG1J4aj3FTBiM/jedceQCeb56fqM2jG+sv3sGR/o2nUz89uZEjN08v6aMzbGiuzro1vHZn+eA==","shasum":"8990922cda1c268ea58036e76e37d9cecb9527f9","tarball":"https://registry.npmjs.org/@emit-ia/n8n-template-mcp/-/n8n-template-mcp-1.1.0.tgz","fileCount":12,"unpackedSize":45422,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH6mvbXdCjvpJpKrtRec5RJpGk3eEgEVQ3ekV+IO3flMAiBIG69dQNDbcjf2tKjr18pbHN90jPor3vBh86mgJPmSTQ=="}]},"_npmUser":{"name":"emit-ia","email":"Igor.almeida1993@gmail.com","actor":{"name":"emit-ia","email":"Igor.almeida1993@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"emit-ia","email":"Igor.almeida1993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-template-mcp_1.1.0_1750884966766_0.48999977075322776"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-25T20:46:44.425Z","modified":"2025-06-25T20:56:07.105Z","1.0.0":"2025-06-25T20:46:44.730Z","1.1.0":"2025-06-25T20:56:06.928Z"},"bugs":{"url":"https://github.com/emit-ia/n8n-template-mcp/issues"},"author":{"name":"Igor Almeida","email":"igor.almeida1993@gmail.com"},"license":"MIT","homepage":"https://github.com/emit-ia/n8n-template-mcp#readme","keywords":["n8n","templates","workflow","mcp","automation","model-context-protocol","n8n-templates"],"repository":{"type":"git","url":"git+https://github.com/emit-ia/n8n-template-mcp.git"},"description":"Model Context Protocol server for n8n templates - Enables AI agents to search, browse, and export n8n workflow templates via official APIs","maintainers":[{"name":"emit-ia","email":"Igor.almeida1993@gmail.com"}],"readme":"# N8N Template MCP Server\n\nA 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.\n\n## Features\n\n=\r **Template Search** - Search n8n community templates by query, category, tags, or node types  \n=� **Template Details** - Get complete template information including workflow JSON  \n=� **Category Browse** - List all template categories and subcategories  \n=' **Node Discovery** - Find templates that use specific node types  \n=� **Export Ready** - Export templates in n8n-compatible JSON format  \n� **Smart Caching** - Intelligent caching with configurable TTL for optimal performance  \n=�\u000f **Error Handling** - Robust error handling with retry logic and graceful degradation  \n\n## Quick Start\n\n### Installation\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run with npx (recommended)\nnpx --package=@emit-ia/n8n-template-mcp n8n-template-mcp\n```\n\n### NPX Usage\n\nThe easiest way to use this MCP server is with npx:\n\n```bash\n# Run the server directly\nnpx --package=@emit-ia/n8n-template-mcp n8n-template-mcp\n\n# With Claude Desktop, add to your configuration:\n{\n  \"mcpServers\": {\n    \"n8n-templates\": {\n      \"command\": \"npx\",\n      \"args\": [\"@igoragoli/n8n-template-mcp\"]\n    }\n  }\n}\n```\n\n## Available Tools\n\n### =\r Template Discovery\n\n#### `n8n_search_templates`\nSearch n8n community templates with flexible filtering options.\n\n**Parameters:**\n- `query` (optional): Search term\n- `page` (optional): Page number (default: 1)\n- `limit` (optional): Results per page (default: 24, max: 100)\n- `category` (optional): Filter by category\n- `subcategory` (optional): Filter by subcategory\n- `tags` (optional): Array of tags to filter by\n- `nodeTypes` (optional): Array of node types to filter by\n- `official` (optional): Filter official templates only\n\n**Example:**\n```json\n{\n  \"query\": \"Google Sheets automation\",\n  \"category\": \"Data Processing\",\n  \"limit\": 10,\n  \"official\": true\n}\n```\n\n#### `n8n_list_categories`\nGet all available template categories and their counts.\n\n**Example Response:**\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"name\": \"Data Processing\",\n      \"count\": 45,\n      \"subcategories\": [\n        {\"name\": \"ETL\", \"count\": 12},\n        {\"name\": \"Analytics\", \"count\": 8}\n      ]\n    }\n  ]\n}\n```\n\n#### `n8n_find_by_node`\nFind templates that use a specific node type.\n\n**Parameters:**\n- `nodeType`: Node type to search for (e.g., \"MySQL\", \"Slack\", \"Google Sheets\")\n\n**Example:**\n```json\n{\n  \"nodeType\": \"MySQL\"\n}\n```\n\n### =� Template Management\n\n#### `n8n_get_template`\nGet detailed information about a specific template including full workflow JSON.\n\n**Parameters:**\n- `templateId`: Template ID from search results\n\n**Example Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"123\",\n    \"name\": \"MySQL to Google Sheets Sync\",\n    \"description\": \"Automatically sync MySQL data to Google Sheets\",\n    \"category\": \"Data Processing\",\n    \"tags\": [\"mysql\", \"google-sheets\", \"sync\"],\n    \"nodes\": [\n      {\n        \"name\": \"MySQL Node\",\n        \"type\": \"mysql\",\n        \"position\": [100, 200]\n      }\n    ],\n    \"workflow\": { /* Full n8n workflow JSON */ },\n    \"author\": {\n      \"name\": \"Community User\",\n      \"avatar\": \"https://...\"\n    }\n  }\n}\n```\n\n#### `n8n_export_templates`\nExport multiple templates as n8n-compatible workflow JSON files.\n\n**Parameters:**\n- `templateIds`: Array of template IDs to export\n- `format` (optional): Export format (\"n8n\" or \"json\", default: \"n8n\")\n\n**Example:**\n```json\n{\n  \"templateIds\": [\"123\", \"456\", \"789\"],\n  \"format\": \"n8n\"\n}\n```\n\n**Example Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"version\": \"1.0\",\n    \"workflows\": [\n      {\n        \"name\": \"MySQL to Google Sheets Sync (imported from n8n community)\",\n        \"nodes\": [ /* workflow nodes */ ],\n        \"connections\": { /* node connections */ },\n        \"meta\": {\n          \"templateId\": \"123\",\n          \"originalName\": \"MySQL to Google Sheets Sync\",\n          \"category\": \"Data Processing\",\n          \"importedAt\": \"2024-01-15T10:30:00Z\"\n        }\n      }\n    ],\n    \"exportedAt\": \"2024-01-15T10:30:00Z\",\n    \"metadata\": {\n      \"templateCount\": 3,\n      \"nodeTypes\": [\"mysql\", \"googleSheets\", \"set\"]\n    }\n  }\n}\n```\n\n### =�\u000f Utility Tools\n\n#### `n8n_health_check`\nCheck the health and availability of the n8n community API and cache status.\n\n#### `n8n_clear_cache`\nClear the template cache to force fresh data retrieval.\n\n## Configuration\n\n### Environment Variables\n\nCopy `.env.example` to `.env` and configure:\n\n```bash\n# N8N API Configuration\nN8N_API_BASE=https://api.n8n.io\nENABLE_GRAPHQL=false\n\n# Cache Configuration (in seconds)\nCACHE_SEARCH_TTL=900        # 15 minutes\nCACHE_TEMPLATE_TTL=3600     # 1 hour\nCACHE_CATEGORIES_TTL=86400  # 24 hours\nCACHE_MAX_SIZE=1000\n\n# Rate Limiting\nRATE_LIMIT_MAX=10           # Max requests per minute\nRATE_LIMIT_WINDOW=60000     # 1 minute window\n```\n\n### Cache Strategy\n\nThe server implements intelligent caching to minimize API calls and improve performance:\n\n- **Search Results**: Cached for 15 minutes\n- **Template Details**: Cached for 1 hour\n- **Categories**: Cached for 24 hours\n- **Memory Management**: LRU eviction with configurable max size\n\n## Integration with Claude Desktop\n\nAdd to your Claude Desktop configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"n8n-templates\": {\n      \"command\": \"npx\",\n      \"args\": [\"@igoragoli/n8n-template-mcp\"],\n      \"env\": {\n        \"N8N_API_BASE\": \"https://api.n8n.io\",\n        \"CACHE_SEARCH_TTL\": \"900\"\n      }\n    }\n  }\n}\n```\n\n## Development\n\n### Local Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Start development server with hot reload\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Start production server\nnpm start\n```\n\n### Testing\n\n```bash\n# Run tests\nnpm test\n\n# Test with MCP Inspector\nnpm run dev\n# Open http://localhost:3001 for MCP Inspector\n```\n\n### Project Structure\n\n```\nsrc/\n\u001c\u0000\u0000 index.ts              # Main server entry point\n\u001c\u0000\u0000 services/\n\u0002   \u001c\u0000\u0000 base.service.ts   # Base HTTP service class\n\u0002   \u001c\u0000\u0000 n8n.service.ts    # N8N API service\n\u0002   \u0014\u0000\u0000 index.ts          # Service exports\n\u001c\u0000\u0000 tools/\n\u0002   \u001c\u0000\u0000 template.tool.ts  # Template management tools\n\u0002   \u001c\u0000\u0000 workflow.tool.ts  # Workflow export tools\n\u0002   \u0014\u0000\u0000 index.ts          # Tool registration\n\u001c\u0000\u0000 types/\n\u0002   \u0014\u0000\u0000 index.ts          # TypeScript type definitions\n\u0014\u0000\u0000 utils/\n    \u001c\u0000\u0000 cache.ts          # Caching implementation\n    \u0014\u0000\u0000 tools.ts          # Tool creation utilities\n```\n\n## API Endpoints\n\nThis MCP server uses the following n8n community API endpoints:\n\n- `GET /templates/search` - Search templates\n- `GET /templates/workflows/{id}` - Get template details\n- `GET /templates/categories` - List categories\n- `GET /health` - API health check\n\n## Error Handling\n\nThe server implements comprehensive error handling:\n\n- **Network Errors**: Automatic retry with exponential backoff\n- **Rate Limiting**: Respect API rate limits with delay\n- **API Errors**: Graceful degradation with meaningful error messages\n- **Cache Errors**: Fallback to direct API calls when cache fails\n\n## Performance\n\n- **Sub-200ms response times** for cached queries\n- **Smart caching** reduces API calls by 80%+\n- **Memory efficient** with configurable cache limits\n- **Concurrent request handling** for multiple operations\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Submit a pull request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor issues and questions:\n- Create an issue on GitHub\n- Check the n8n community documentation\n- Review the MCP specification\n\n---\n\n**Built for the 18-Agent Automated Income Ecosystem**  \nPart of Igor's comprehensive automation framework targeting �2,500+/month by November 2025.","readmeFilename":"README.md"}