A Model Context Protocol (MCP) server that integrates with n8n, providing tools for workflow and execution management via the n8n API.
4.6 KiB
Troubleshooting Guide
This guide addresses common issues you might encounter when setting up and using the n8n MCP Server.
Connection Issues
Cannot Connect to n8n API
Symptoms:
- Error messages mentioning "Connection refused" or "Cannot connect to n8n API"
- Timeout errors when trying to use MCP tools
Possible Solutions:
-
Verify n8n is running:
- Ensure your n8n instance is running and accessible
- Try accessing the n8n URL in a browser
-
Check n8n API URL:
- Verify the
N8N_API_URLin your.envfile - Make sure it includes the full path (e.g.,
http://localhost:5678/api/v1) - Check for typos or incorrect protocol (http vs https)
- Verify the
-
Network Configuration:
- If running on a different machine, ensure there are no firewall rules blocking access
- Check if n8n is configured to allow remote connections
-
HTTPS/SSL Issues:
- If using HTTPS, ensure certificates are valid
- For self-signed certificates, you may need to set up additional configuration
Authentication Failures
Symptoms:
- "Authentication failed" or "Invalid API key" messages
- 401 or 403 HTTP status codes
Possible Solutions:
-
Verify API Key:
- Check that the
N8N_API_KEYin your.envfile matches the one in n8n - Create a new API key if necessary
- Check that the
-
Check API Key Permissions:
- Ensure the API key has appropriate scopes/permissions
- Required scopes:
workflow:read workflow:write workflow:execute
-
n8n API Settings:
- Verify that API access is enabled in n8n settings
- Check if there are IP restrictions on API access
MCP Server Issues
Server Crashes or Exits Unexpectedly
Symptoms:
- The MCP server stops running unexpectedly
- Error messages in logs or console output
Possible Solutions:
-
Check Node.js Version:
- Ensure you're using Node.js 18 or later
- Check with
node --version
-
Check Environment Variables:
- Ensure all required environment variables are set
- Verify the format of the environment variables
-
View Debug Logs:
- Set
DEBUG=truein your.envfile - Check the console output for detailed error messages
- Set
-
Memory Issues:
- If running on a system with limited memory, increase available memory
- Check for memory leaks or high consumption patterns
AI Assistant Cannot Communicate with MCP Server
Symptoms:
- AI assistant reports it cannot connect to the MCP server
- Tools are not available in the assistant interface
Possible Solutions:
-
Verify Server Registration:
- Ensure the server is properly registered with your AI assistant platform
- Check the configuration settings for the MCP server in your assistant
-
Server Running Check:
- Verify the MCP server is running
- Check that it was started with the correct environment
-
Restart Components:
- Restart the MCP server
- Refresh the AI assistant interface
- If using a managed AI assistant, check platform status
Tool-Specific Issues
Workflow Operations Fail
Symptoms:
- Cannot list, create, or update workflows
- Error messages about missing permissions
Possible Solutions:
-
API Key Scope:
- Ensure your API key has
workflow:readandworkflow:writepermissions - Create a new key with appropriate permissions if needed
- Ensure your API key has
-
n8n Version:
- Check if your n8n version supports all the API endpoints being used
- Update n8n to the latest version if possible
-
Workflow Complexity:
- Complex workflows with custom nodes may not work correctly
- Try with simpler workflows to isolate the issue
Execution Operations Fail
Symptoms:
- Cannot execute workflows or retrieve execution data
- Execution starts but fails to complete
Possible Solutions:
-
API Key Scope:
- Ensure your API key has the
workflow:executepermission - Create a new key with appropriate permissions if needed
- Ensure your API key has the
-
Workflow Status:
- Check if the target workflow is active
- Verify the workflow executes correctly in the n8n interface
-
Workflow Inputs:
- Ensure all required inputs for workflow execution are provided
- Check the format of input data
Getting More Help
If you're still experiencing issues after trying these troubleshooting steps:
-
Check GitHub Issues:
- Look for similar issues in the GitHub repository
- Create a new issue with detailed information about your problem
-
Submit Logs:
- Enable debug logging with
DEBUG=true - Include relevant logs when seeking help
- Enable debug logging with
-
Community Support:
- Ask in the n8n community forums
- Check MCP-related discussion groups