From 4b1aaa936d93995a8b5036929f7a5c4736402095 Mon Sep 17 00:00:00 2001 From: czlonkowski <56956555+czlonkowski@users.noreply.github.com> Date: Sat, 2 Aug 2025 21:56:50 +0200 Subject: [PATCH] update documentation --- docs/N8N_DEPLOYMENT.md | 44 +++++++++++++++++++++++++++++++++++++- docs/RAILWAY_DEPLOYMENT.md | 21 +++++++++++++++++- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/docs/N8N_DEPLOYMENT.md b/docs/N8N_DEPLOYMENT.md index d23154f..0a1f459 100644 --- a/docs/N8N_DEPLOYMENT.md +++ b/docs/N8N_DEPLOYMENT.md @@ -1,6 +1,6 @@ # n8n-MCP Deployment Guide -This guide covers how to deploy n8n-MCP and connect it to your n8n instance. Whether you're testing locally or deploying to production, we'll show you how to set up n8n-MCP for use with n8n's MCP Client Tool node. +This guide covers how to deploy n8n-MCP and connect it to AI Agent nodes with the standard MCP Client Tool. Whether you're testing locally or deploying to production, we'll show you how to set it up. ## Table of Contents - [Overview](#overview) @@ -743,6 +743,48 @@ curl http://localhost:3001/mcp - **Response time**: Average 12ms for queries - **Caching**: Built-in 15-minute cache for repeated queries +## Railway Deployment for n8n Integration +[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/n8n-mcp?referralCode=n8n-mcp) + +If you're using the **Deploy to Railway** button, you'll need to modify some environment variables since Railway uses a different Docker image (`Dockerfile.railway`). + +### Required Environment Variable Changes + +When deploying with Railway for n8n integration, add these variables in your Railway dashboard: + +1. **Go to Railway dashboard** → Your service → **Variables tab** +2. **Add the following variables**: + +```bash +# Required for n8n integration mode +N8N_MODE=true + +# Already set by Railway template, but verify: +MCP_MODE=http # Required for HTTP mode +MCP_AUTH_TOKEN= # Must match AUTH_TOKEN +AUTH_TOKEN= # Same value as MCP_AUTH_TOKEN + +# Optional: For workflow management features +N8N_API_URL=https://your-n8n-instance.com +N8N_API_KEY=your-n8n-api-key +``` + +3. **Save changes** - Railway will automatically redeploy + +### Connecting n8n to Railway-deployed n8n-MCP + +In your n8n workflow, configure the MCP Client Tool with: + +``` +Server URL: https://your-app.up.railway.app/mcp +Auth Token: [Your AUTH_TOKEN value] +Transport: HTTP Streamable (SSE) +``` + +> **Note**: The Railway deployment automatically includes all required dependencies and uses the optimized `Dockerfile.railway` which is compatible with both Claude Desktop and n8n integrations. + +For more details on Railway deployment, see our [Railway Deployment Guide](./RAILWAY_DEPLOYMENT.md). + ## Next Steps - Test your setup with the [MCP Client Tool in n8n](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.mcpclienttool/) diff --git a/docs/RAILWAY_DEPLOYMENT.md b/docs/RAILWAY_DEPLOYMENT.md index 9328609..e323055 100644 --- a/docs/RAILWAY_DEPLOYMENT.md +++ b/docs/RAILWAY_DEPLOYMENT.md @@ -106,7 +106,26 @@ These are automatically set by the Railway template: | `HOST` | `0.0.0.0` | Listen on all interfaces | | `PORT` | (Railway provides) | Don't set manually | -### Optional: n8n API Integration +### Optional Variables + +| Variable | Default Value | Description | +|----------|--------------|-------------| +| `N8N_MODE` | `false` | Enable n8n integration mode for MCP Client Tool | +| `N8N_API_URL` | - | URL of your n8n instance (for workflow management) | +| `N8N_API_KEY` | - | API key from n8n Settings → API | + +### Optional: n8n Integration + +#### For n8n MCP Client Tool Integration + +To use n8n-MCP with n8n's MCP Client Tool node: + +1. **Go to Railway dashboard** → Your service → **Variables** +2. **Add this variable**: + - `N8N_MODE`: Set to `true` to enable n8n integration mode +3. **Save changes** - Railway will redeploy automatically + +#### For n8n API Integration (Workflow Management) To enable workflow management features: