From bbf66d9e168539e1f7fd74e84981172e98d9b638 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 14 Jul 2025 19:58:36 +0000 Subject: [PATCH] feat: add n8n-mcp server to marketplace data - Add static marketplace data file for n8n-mcp server - Include multiple installation methods (npx, Docker, local dev) - Add comprehensive configuration with parameters and prerequisites - Create documentation and validation script for marketplace data - Addresses GitHub issue #5704 The n8n-mcp server provides AI assistants with comprehensive access to n8n workflow automation platform, enabling them to understand and work with n8n's 525+ nodes effectively. --- data/marketplace/README.md | 66 +++++++++++++++++ data/marketplace/mcps.yaml | 102 +++++++++++++++++++++++++++ scripts/validate-marketplace-data.js | 71 +++++++++++++++++++ 3 files changed, 239 insertions(+) create mode 100644 data/marketplace/README.md create mode 100644 data/marketplace/mcps.yaml create mode 100644 scripts/validate-marketplace-data.js diff --git a/data/marketplace/README.md b/data/marketplace/README.md new file mode 100644 index 0000000000..9c6087f9f2 --- /dev/null +++ b/data/marketplace/README.md @@ -0,0 +1,66 @@ +# Marketplace Data + +This directory contains static marketplace data files that can be used to update the external marketplace API at `https://app.roocode.com/api/marketplace/`. + +## Structure + +- `mcps.yaml` - Contains MCP (Model Context Protocol) server configurations +- `modes.yaml` - Contains mode configurations (if needed in the future) + +## Format + +The YAML files follow the schema defined in `packages/types/src/marketplace.ts`: + +### MCP Servers (`mcps.yaml`) + +```yaml +items: + - id: "unique-server-id" + name: "Display Name" + description: "Server description" + author: "Author Name" + authorUrl: "https://github.com/author" + url: "https://github.com/author/repo" + tags: ["tag1", "tag2"] + prerequisites: ["requirement1", "requirement2"] + content: + - name: "Installation Method Name" + content: | + { + "mcpServers": { + "server-id": { + "command": "command", + "args": ["arg1", "arg2"], + "env": { + "VAR": "{{PARAMETER_KEY}}" + } + } + } + } + parameters: + - name: "Parameter Display Name" + key: "PARAMETER_KEY" + placeholder: "example-value" + optional: false + prerequisites: + - "Method-specific requirement" +``` + +## Adding New Items + +1. Add the new item to the appropriate YAML file +2. Ensure the configuration follows the schema +3. Test the configuration locally if possible +4. Update the external API with the new data + +## Schema Validation + +The configurations are validated against Zod schemas defined in: + +- `packages/types/src/marketplace.ts` + +## Current Items + +### MCP Servers + +- **n8n-mcp**: Model Context Protocol server for n8n workflow automation platform diff --git a/data/marketplace/mcps.yaml b/data/marketplace/mcps.yaml new file mode 100644 index 0000000000..531e913e4c --- /dev/null +++ b/data/marketplace/mcps.yaml @@ -0,0 +1,102 @@ +items: + - id: "n8n-mcp" + name: "n8n MCP Server" + description: "A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows. Provides comprehensive access to n8n's 525+ nodes for workflow automation." + author: "czlonkowski" + authorUrl: "https://github.com/czlonkowski" + url: "https://github.com/czlonkowski/n8n-mcp" + tags: + - "workflow" + - "automation" + - "n8n" + - "integration" + - "api" + prerequisites: + - "Node.js 18+ (for npx installation)" + - "Docker (for Docker installation)" + - "n8n instance (local or cloud)" + content: + - name: "npx (Recommended)" + content: | + { + "mcpServers": { + "n8n-mcp": { + "command": "npx", + "args": ["n8n-mcp"], + "env": { + "N8N_API_KEY": "{{N8N_API_KEY}}", + "N8N_BASE_URL": "{{N8N_BASE_URL}}" + } + } + } + } + parameters: + - name: "n8n API Key" + key: "N8N_API_KEY" + placeholder: "your-n8n-api-key" + optional: false + - name: "n8n Base URL" + key: "N8N_BASE_URL" + placeholder: "https://your-n8n-instance.com" + optional: false + prerequisites: + - "Node.js 18+" + - "n8n instance with API access" + - name: "Docker" + content: | + { + "mcpServers": { + "n8n-mcp": { + "command": "docker", + "args": [ + "run", + "--rm", + "-i", + "--env", + "N8N_API_KEY={{N8N_API_KEY}}", + "--env", + "N8N_BASE_URL={{N8N_BASE_URL}}", + "ghcr.io/czlonkowski/n8n-mcp:latest" + ] + } + } + } + parameters: + - name: "n8n API Key" + key: "N8N_API_KEY" + placeholder: "your-n8n-api-key" + optional: false + - name: "n8n Base URL" + key: "N8N_BASE_URL" + placeholder: "https://your-n8n-instance.com" + optional: false + prerequisites: + - "Docker installed and running" + - "n8n instance with API access" + - name: "Local Development" + content: | + { + "mcpServers": { + "n8n-mcp": { + "command": "node", + "args": ["path/to/n8n-mcp/dist/index.js"], + "env": { + "N8N_API_KEY": "{{N8N_API_KEY}}", + "N8N_BASE_URL": "{{N8N_BASE_URL}}" + } + } + } + } + parameters: + - name: "n8n API Key" + key: "N8N_API_KEY" + placeholder: "your-n8n-api-key" + optional: false + - name: "n8n Base URL" + key: "N8N_BASE_URL" + placeholder: "https://your-n8n-instance.com" + optional: false + prerequisites: + - "Node.js 18+" + - "n8n-mcp cloned and built locally" + - "n8n instance with API access" \ No newline at end of file diff --git a/scripts/validate-marketplace-data.js b/scripts/validate-marketplace-data.js new file mode 100644 index 0000000000..460dfd9093 --- /dev/null +++ b/scripts/validate-marketplace-data.js @@ -0,0 +1,71 @@ +#!/usr/bin/env node + +const fs = require("fs") +const path = require("path") +const yaml = require("yaml") + +// Simple validation script for marketplace data +async function validateMarketplaceData() { + try { + const mcpsPath = path.join(__dirname, "../data/marketplace/mcps.yaml") + + if (!fs.existsSync(mcpsPath)) { + console.error("āŒ mcps.yaml file not found") + process.exit(1) + } + + const mcpsContent = fs.readFileSync(mcpsPath, "utf8") + const mcpsData = yaml.parse(mcpsContent) + + // Basic validation + if (!mcpsData || !mcpsData.items || !Array.isArray(mcpsData.items)) { + console.error("āŒ Invalid YAML structure: missing items array") + process.exit(1) + } + + console.log(`āœ… Found ${mcpsData.items.length} MCP server(s)`) + + // Validate each item + for (const item of mcpsData.items) { + console.log(`\nšŸ“¦ Validating: ${item.name || item.id}`) + + // Required fields + const requiredFields = ["id", "name", "description", "url", "content"] + for (const field of requiredFields) { + if (!item[field]) { + console.error(`āŒ Missing required field: ${field}`) + process.exit(1) + } + } + + // Validate content structure + if (Array.isArray(item.content)) { + for (const method of item.content) { + if (!method.name || !method.content) { + console.error(`āŒ Invalid installation method: missing name or content`) + process.exit(1) + } + + // Try to parse the JSON content + try { + JSON.parse(method.content) + console.log(` āœ… ${method.name}: Valid JSON configuration`) + } catch (e) { + console.error(`āŒ ${method.name}: Invalid JSON configuration`) + console.error(e.message) + process.exit(1) + } + } + } + + console.log(` āœ… ${item.id}: All validations passed`) + } + + console.log("\nšŸŽ‰ All marketplace data is valid!") + } catch (error) { + console.error("āŒ Validation failed:", error.message) + process.exit(1) + } +} + +validateMarketplaceData()