fix: Docker configuration for Claude Desktop compatibility

Fixed multiple issues preventing n8n-MCP from working with Claude Desktop:

1. Removed --pull always flag that caused:
   - Multiple simultaneous container starts
   - Image pulling during JSON-RPC communication
   - Timeout errors and connection failures

2. Added --name flag to prevent duplicate containers

3. Added explicit docker pull step to ensure image is ready

4. Proper step numbering for clear setup flow

The logs showed 'Shutting down...' breaking JSON-RPC communication and
multiple containers trying to start simultaneously. This configuration
ensures single, stable container execution.

Tested configuration now works reliably with Claude Desktop.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-06-16 23:46:08 +02:00
parent d332a03e4f
commit 4d262ca8c8

View File

@@ -39,15 +39,22 @@ Get n8n-MCP running in 5 minutes:
### For Claude Desktop
Add this to your Claude Desktop config:
1. First, pull the Docker image:
```bash
docker pull ghcr.io/czlonkowski/n8n-mcp:latest
```
2. Add this to your Claude Desktop config:
```json
{
"mcpServers": {
"n8n-mcp": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--pull", "always",
"run",
"--rm",
"-i",
"--name", "claude-n8n-mcp",
"-e", "MCP_MODE=stdio",
"-e", "LOG_LEVEL=error",
"-e", "DISABLE_CONSOLE_OUTPUT=true",
@@ -58,12 +65,12 @@ Add this to your Claude Desktop config:
}
```
**Configuration file locations:**
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
3. **Configuration file locations:**
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
**Restart Claude Desktop** - That's it! 🎉
4. **Restart Claude Desktop** - That's it! 🎉
### For HTTP Server (Teams)