Skip to content

Failed to connect to MCP server: MCP error -32000: #1

@treesdoficial

Description

@treesdoficial

Image

version: "3.7"
services:

--------------------------- ORION ---------------------------

n8n_editor:
image: n8nio/n8n:latest ## Versão do N8N
command: start

networks:
  - VivaNet ## Nome da rede interna

environment:
  ## Dados do postgres
  - DB_TYPE=postgresdb
  - DB_POSTGRESDB_DATABASE=n8n_queue
  - DB_POSTGRESDB_HOST=postgres
  - DB_POSTGRESDB_PORT=5432
  - DB_POSTGRESDB_USER=postgres
  - DB_POSTGRESDB_PASSWORD=**
  - N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true

  ## Encryption Key
  - N8N_ENCRYPTION_KEY=32236f5a7d2eb7ff30420c86e0a14f19

  ## Url do N8N
  - N8N_HOST=n8n.vivaverdeatacarejo.com.br
  - N8N_EDITOR_BASE_URL=https://n8n.vivaverdeatacarejo.com.br/
  - WEBHOOK_URL=https://webhook.vivaverdeatacarejo.com.br/
  - N8N_PROTOCOL=https

  ## Modo do Node
  - NODE_ENV=production

  ## Modo de execução (deletar caso deseje em modo regular)
  - EXECUTIONS_MODE=queue

  ## Community Nodes
  - N8N_REINSTALL_MISSING_PACKAGES=true
  - N8N_COMMUNITY_PACKAGES_ENABLED=true
  - N8N_NODE_PATH=/home/node/.n8n/nodes

  ## Dados SMTP
  - N8N_SMTP_SENDER=contato@vivaverdeatacarejo.com.br
  - N8N_SMTP_USER=contato@vivaverdeatacarejo.com.br
  - N8N_SMTP_PASS=@*
  - N8N_SMTP_HOST=smtp.zoho.com
  - N8N_SMTP_PORT=465
  - N8N_SMTP_SSL=true

  ## Dados do Redis
  - QUEUE_BULL_REDIS_HOST=redis
  - QUEUE_BULL_REDIS_PORT=6379
  - QUEUE_BULL_REDIS_DB=2
  - NODE_FUNCTION_ALLOW_EXTERNAL=moment,lodash,moment-with-locales
  - EXECUTIONS_DATA_PRUNE=true
  - EXECUTIONS_DATA_MAX_AGE=336

  ## Timezone
  - GENERIC_TIMEZONE=America/Sao_Paulo
  - TZ=America/Sao_Paulo
  # Novas variáveis para o MCP Server
  - WORDPRESS_SITE_URL=https://loja.vivaverdeatacarejo.com.br
  - WOOCOMMERCE_CONSUMER_KEY=*
  - WOOCOMMERCE_CONSUMER_SECRET=*
  - WORDPRESS_USERNAME=*
  - WORDPRESS_PASSWORD=*
  - MCP_LOG_LEVEL=debug
  - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
  - N8N_RUNNERS_ENABLED=true
  - OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true
    # Temporário para testes SSL
  - MCP_SOCKET_TIMEOUT=300000
  - NODE_OPTIONS=--tls-max-v1.3  # Forçar TLS 1.3
  - MCP_HTTP_VERSION=2  # Usar HTTP/2
  - MCP_KEEP_ALIVE=true

I am using https://github.com/oriondesign2015/setuporion to configure stacks and get the use of MCP on N8N.
Please send me more information on how to do it at N8N, I'm using the ENV data directly from Docker but I can't list and get error in the log belo
root@VivaVerde:~# docker service logs n8n_n8n_editor --since 2025
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set

N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Initializing n8n process
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | n8n ready on 0.0.0.0, port 5678
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde |
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | - N8N_RUNNERS_ENABLED -> Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set N8N_RUNNERS_ENABLED=true to enable task runners now and avoid potential issues in the future. Learn more: https://docs.n8n.io/hosting/configuration/task-runners/
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | - OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS -> Running manual executions in the main instance in scaling mode is deprecated. Manual executions will be routed to workers in a future version. Please set OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true to offload manual executions to workers and avoid potential issues in the future. Consider increasing memory available to workers and reducing memory available to main.
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde |
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Attempting to reinstall missing packages
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Community package installed: n8n-nodes-evolution-api
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Community package installed: n8n-nodes-mcp
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Packages reinstalled successfully. Resuming regular initialization.
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Version: 1.83.2
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | ================================
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Start Active Workflows:
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | ================================
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | - "update_rag_produtoecommerce" (ID: pSspdilAbqXwKkLe))
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | => Started
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde |
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Editor is now accessible via:
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | https://n8n.vivaverdeatacarejo.com.br
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | MCP client connection error: MCP error -32000: Connection closed
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Failed to execute operation: Failed to connect to MCP server: MCP error -32000: Connection closed
n8n_n8n_editor.1.vjteqx332pp3@VivaVerde | Failed to execute operation: Failed to connect to MCP server: MCP error -32000: Connection closed

Follow the settings I used within N8N

Image

Thank you so much for your attention!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions