Connect Gemini CLI
Add Terno AI to Google's Gemini CLI as a remote MCP server.
Use Terno from Gemini CLI in your terminal.
Server URL: https://mcp.terno.ai/mcp
Preview server URL: https://mcp.terno.ai/mcp/preview (adds app connectors such as Google Ads and GA4)
Before you start
Section titled “Before you start”- Gemini CLI installed, on a machine with a browser for sign-in.
- A Terno AI account. You don’t need to sign up first: when you connect, Terno takes you to sign up if you don’t have an account, or to sign in if you’re signed out, and then shows the consent screen.
- No data source is needed to connect. Ask your assistant to connect one and Terno gives it a link where you add the connection details in Terno. You can also add one in the app; see Connectors.
Connect Terno
Section titled “Connect Terno”-
Add Terno:
Terminal window gemini mcp add --transport http -s user terno https://mcp.terno.ai/mcpFor the preview server (app connectors such as Google Ads and GA4), use this instead:
Terminal window gemini mcp add --transport http -s user terno-preview https://mcp.terno.ai/mcp/previewOr add it to
~/.gemini/settings.jsonyourself:{"mcpServers": {"terno": { "httpUrl": "https://mcp.terno.ai/mcp" }}}For the preview server (app connectors such as Google Ads and GA4), use this instead:
{"mcpServers": {"terno-preview": { "httpUrl": "https://mcp.terno.ai/mcp/preview" }}} -
Start Gemini CLI and run
/mcp auth terno(or/mcp auth terno-preview). -
Sign in to Terno in the browser window that opens.
Run /mcp auth terno again if your sign-in expires. Use the httpUrl key, not url, which is for older SSE servers.
Check it works
Section titled “Check it works”Ask your assistant something like:
- “Which data sources do I have in Terno?”
- “Using Terno, show the top 10 customers by revenue this year.”
It should call Terno’s tools and answer from your data.
App connectors (preview)
Section titled “App connectors (preview)”The main server works with your databases and warehouses. To also use app connectors such as Google Ads and GA4, add the preview server in the same way, using https://mcp.terno.ai/mcp/preview. It will come to the main server soon.
Troubleshooting
Section titled “Troubleshooting”The sign-in window doesn’t open, or sign-in fails
Complete the sign-in in the browser window or tab your assistant opens, using your Terno account. If it times out, start the connection again.
Terno’s tools don’t show up
Check the server URL is exactly https://mcp.terno.ai/mcp (or https://mcp.terno.ai/mcp/preview for the preview server), and that the Terno server is switched on in your assistant.
”No data sources” or empty answers
Connect a data source in Terno first. The assistant only sees what’s connected in your Terno workspace, within your access rules.
Disconnect
Section titled “Disconnect”Remove the Terno connector or server in your assistant.