Troubleshooting
Common issues and solutions
Troubleshooting
Solutions to common issues when using n8n MCP Bridge.
Connection Issues
MCP Server Not Responding
Symptoms:
- "Connection refused" errors
- "Server not responding"
- Cannot reach http://localhost:3001
Solutions:
-
Check if MCP server is running:
curl http://localhost:3001/healthExpected:
{"status":"ok"} -
Check Docker containers:
docker psShould show
n8n-mcp-serverrunning -
View server logs:
docker logs n8n-mcp-server -
Restart services:
task dev # or docker compose restart
Invalid API Key
Symptoms:
- "Invalid API key" error
- "Authentication failed"
- 401 Unauthorized
Solutions:
-
Verify API key format:
- Must start with
mcp_ - Check for extra spaces
- Ensure complete key was copied
- Must start with
-
Test in dashboard:
- Go to Dashboard → API Keys
- Find your key
- Click "Test Connection"
-
Check key hasn't been deleted:
- Verify key exists in dashboard
- If not, create new key
-
Update configuration:
- Update Claude Desktop config
- Restart Claude
- Test again
n8n Connection Failed
Symptoms:
- "Cannot connect to n8n"
- "n8n instance not responding"
ping_n8ntool fails
Solutions:
-
Verify n8n is running:
- Open n8n URL in browser
- Should show n8n interface
-
Check n8n API key:
- Go to n8n → Settings → API
- Verify key is active
- Try regenerating key
-
Test from dashboard:
- Dashboard → Overview
- Find n8n connection
- Click "Test Connection"
-
Check network:
# Test n8n URL curl https://n8n.example.com/health
Authentication Issues
Can't Sign In
Symptoms:
- OAuth error messages
- "Sign in failed"
- Redirect loop
Solutions:
-
Check OAuth credentials:
- Verify
GOOGLE_CLIENT_IDin.env - Verify
GOOGLE_CLIENT_SECRETin.env - Same for GitHub if using
- Verify
-
Verify redirect URIs:
- Google: Must be
http://localhost:3000/api/auth/callback/google - GitHub: Must be
http://localhost:3000/api/auth/callback/github
- Google: Must be
-
Clear browser cookies:
- Clear cookies for localhost:3000
- Try incognito/private window
-
Check environment:
# Verify NEXTAUTH_URL echo $NEXTAUTH_URL # Should be: http://localhost:3000
Session Expired
Symptoms:
- "Session expired" message
- Redirected to sign in repeatedly
Solutions:
-
Sign in again:
- Sessions last 30 days
- Simply sign in again
-
Check browser cookies:
- Ensure cookies are enabled
- Check cookie settings
-
Verify time sync:
- Ensure system clock is accurate
- JWT tokens are time-sensitive
Database Issues
Database Connection Failed
Symptoms:
- "Cannot connect to database"
- "Database unavailable"
- Application won't start
Solutions:
-
Check PostgreSQL container:
docker ps | grep postgres -
Verify DATABASE_URL:
# In .env DATABASE_URL="postgresql://postgres:postgres@localhost:5432/n8nmcp" -
Test database connection:
psql postgresql://postgres:postgres@localhost:5432/n8nmcp -
Check database logs:
docker logs n8n-mcp-db
Migration Errors
Symptoms:
- "Migration failed"
- "Schema mismatch"
- Database errors on startup
Solutions:
-
Run migrations:
cd packages/web task db:migrate -
Reset database (development only):
docker compose down -v docker compose up -d task db:migrate -
Check migration status:
task db:studio # View migrations table
Build Issues
Build Failed
Symptoms:
npm run buildfails- TypeScript errors
- Missing dependencies
Solutions:
-
Clean install:
rm -rf node_modules rm -rf .next npm install npm run build -
Check Node version:
node --version # Should be 20+ -
Fix TypeScript errors:
npm run type-check -
Check dependencies:
npm audit npm update
Fumadocs Build Error
Symptoms:
- "fumadocs-mdx" build fails
- Missing
.sourcedirectory - MDX parsing errors
Solutions:
-
Run postinstall:
cd packages/web pnpm postinstall -
Check MDX files:
- Ensure all MDX files have valid frontmatter
- Check for syntax errors
- Verify meta.json files exist
-
Clean build:
rm -rf .source rm -rf .next pnpm build
Performance Issues
Slow Response Times
Symptoms:
- Requests take > 5 seconds
- Timeouts
- Laggy UI
Solutions:
-
Check system resources:
docker stats -
Check n8n performance:
- Verify n8n instance isn't overloaded
- Check workflow complexity
-
Optimize database:
# Clean up old logs DELETE FROM mcp_access_logs WHERE timestamp < NOW() - INTERVAL '30 days'; -
Increase Docker resources:
- Docker Desktop → Settings → Resources
- Increase memory/CPU allocation
High Memory Usage
Symptoms:
- Docker containers using too much memory
- System slowdown
- Out of memory errors
Solutions:
-
Check container memory:
docker stats --no-stream -
Restart containers:
docker compose restart -
Limit container memory:
# docker-compose.yml services: app: mem_limit: 512m
Tool Issues
Tool Not Found
Symptoms:
- "Tool not available"
- AI can't use tools
- Tool list is empty
Solutions:
-
Check MCP server is loaded:
- Verify in Claude Desktop settings
- Should show "n8n" server
-
Restart AI client:
- Quit Claude Desktop
- Start again
-
Verify API key:
- Test API key in dashboard
- Ensure it's valid
Tool Execution Failed
Symptoms:
- Tool call returns error
- Unexpected results
- Timeout errors
Solutions:
-
Check tool parameters:
- Verify parameter format
- Check required vs optional
-
Test manually:
curl -X POST http://localhost:3001/mcp?apiKey=mcp_key \ -H "Content-Type: application/json" \ -d '{"method":"tools/call","params":{"name":"ping_n8n"}}' -
Check logs:
docker logs n8n-mcp-server
Getting More Help
Enable Debug Logging
Add to .env:
LOG_LEVEL=debug
Restart services:
task dev
Check Logs
# All services
docker compose logs -f
# Specific service
docker logs -f n8n-mcp-server
docker logs -f n8n-mcp-app
docker logs -f n8n-mcp-db
Report an Issue
If you've tried everything:
-
Gather information:
- Error messages
- Logs
- Configuration (remove secrets!)
- Steps to reproduce
-
Check existing issues:
-
Create new issue:
- Describe problem
- Include error logs
- Explain what you've tried
Common Error Messages
| Error | Meaning | Solution |
|---|---|---|
ECONNREFUSED | Can't connect to service | Check service is running |
Invalid API key | API key not recognized | Verify key in dashboard |
Database unavailable | PostgreSQL not running | Check database container |
n8n connection failed | Can't reach n8n | Verify n8n URL and API key |
Session expired | Login session ended | Sign in again |
CORS error | Cross-origin issue | Check NEXTAUTH_URL setting |
Build failed | Compilation error | Check TypeScript errors |