Connectors
Add a custom MCP connector on grok.com
Add a custom MCP connector on grok.com
When a service sits outside the built-in and catalog connectors, Grok lets you bring your own Model Context Protocol (MCP) server. On the consumer surface, open grok.com/connectors, choose New Connector, then Custom, and paste a public MCP server URL. Grok discovers the tools that server exposes and offers them in chat like other connectors. API remote MCP setup is a separate path: Connect a remote MCP server in the Grok API.
Add the connector
- Go to grok.com/connectors.
- Click New Connector, then select Custom.
- Enter the MCP server URL (HTTPS on the public internet).
- Complete any OAuth or API-key authentication the server requires.
On Grok Business and Enterprise, a team admin may need to add the custom server in console.x.ai under Connectors (docs: + Add Connector → Other + URL) before members can connect it on grok.com.
Public URL or tunnel
Grok’s servers must reach your MCP endpoint. Docs reject localhost, 127.0.0.1, and private ranges such as 10.x, 172.16.x, and 192.168.x. If the server runs on your machine, expose it with a tunnel, then paste the public forwarding URL into Custom.
Official tunneling examples (Custom MCP Server Tunneling):
- ngrok: install, authenticate, run
ngrok http 3001(or your MCP port), copy theForwardingHTTPS URL. - Cloudflare Tunnel:
cloudflared tunnel --url http://localhost:3001, copy the*.trycloudflare.comURL.
Caution from docs: Cloudflare quick tunnels do not support Server-Sent Events (SSE). If your MCP server uses SSE, use ngrok. Streamable HTTP works with Cloudflare quick tunnels.
Keep the endpoint alive
- Free-tier tunnel URLs often change on restart — remove the old connector and add a new one with the updated URL.
- Keep the local MCP process and the tunnel running while you chat; stopped tunnels make tool calls fail.
- Authentication still runs in Grok after you paste the URL; the tunnel only handles reachability.
Pitfalls
- A private LAN URL will be rejected; use a public host or tunnel.
- Temporary tunnel URLs break silently after restart until you update the connector.
- Hung or invisible custom remotes inside Grok Bot Plugins are a different surface — see Clear hung custom MCP remotes in Grok Bot.