mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
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.
This commit is contained in:
parent
0c014f0028
commit
bbf66d9e16
3 changed files with 239 additions and 0 deletions
66
data/marketplace/README.md
Normal file
66
data/marketplace/README.md
Normal file
|
|
@ -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
|
||||
102
data/marketplace/mcps.yaml
Normal file
102
data/marketplace/mcps.yaml
Normal file
|
|
@ -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"
|
||||
71
scripts/validate-marketplace-data.js
Normal file
71
scripts/validate-marketplace-data.js
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Reference in a new issue