MCP Gmail Server does not connect to self-hosted n8n via Coolify

I’m having some issues configuring the Gmail MCP server in n8n. I followed the instructions from the Github repository: GitHub - GongRzhe/Gmail-MCP-Server: A Model Context Protocol (MCP) server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.

I followed the process to install server on Claude Desktop running on localhost:3000 and it works perfectly, but as I’m using self-hosted n8n in Coolify, I guess it might have some connection issues with the server.

This is the error message I’m getting:

After several trials with the docker config in Coolify, the issue persists.

Any help is more than appreciated! :pray:

My n8n setup

  • n8n version: 1.83.2
  • Running n8n via Coolify:
  • Operating system: MacOS
1 Like

Same here

N8N 1.84.3 running on Hostinger (Ubuntu)

Functional Solution:

  1. Using Gmail-MCP-Server:
  1. Environment Variable Configuration:
  • You need to add the following line to your environment variables for the Gmail-MCP server to function correctly:
    • "- /home/ari/.gmail-mcp:/home/node/.gmail-mcp:rw"
  • Important: Replace "ari" with your system’s username.
  • This line mounts a volume, allowing the container to access your user’s Gmail-MCP configuration files.
  • If you’re using Coolify, this variable should be added to the environment variable section of your application.

I am using elestio to host my n8n, need help in setting this mcp gmail server in my workflow. Please help!

I solved it here: https://github.com/nerding-io/n8n-nodes-mcp/issues/29#issuecomment-2778103745

can someone help me set it up ? i’m running self hosted on docker , when i tried it says that oath2 related issue, i have the my n8n set up on ngrok