Skip to content
MCP server

Terno

Read-only SQL access to databases and business tools, with row-level access rules

Answers · sign-in required (OAuth)

The server answered 3 days ago with a sign-in request for OAuth (HTTP 401), so we could not list its tools.

Terno is an open-source MCP server for databases. It runs as a hosted remote server, so there is nothing to install locally.

Pricing
Open source
Platforms
Self-hosted, API, CLI
Runs
Remotely
What it can do
Can change data (1 tool)
Access
Needs sign-in (OAuth)

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add --transport http terno https://mcp.terno.ai/mcp/preview

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "terno": {
      "type": "http",
      "url": "https://mcp.terno.ai/mcp/preview"
    }
  }
}

Claude Code setup guide

In Customize → Connectors → Add → Add custom connector

https://mcp.terno.ai/mcp/preview

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "terno": {
      "url": "https://mcp.terno.ai/mcp/preview"
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "terno": {
      "type": "http",
      "url": "https://mcp.terno.ai/mcp/preview"
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

In chatgpt.com → Plugins → + → Add custom MCP server

https://mcp.terno.ai/mcp/preview

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

ChatGPT setup guide

Add with the CLI

Run in a terminal

codex mcp add terno --url https://mcp.terno.ai/mcp/preview

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.terno]
url = "https://mcp.terno.ai/mcp/preview"

Codex setup guide

Add to Grok Bot desktop app → Connect apps → Add a custom connector

https://mcp.terno.ai/mcp/preview

Enter a Name (for example "Terno"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin. When we checked, this server asked for OAuth sign-in. If its docs give you an OAuth client ID and secret, enter them in the form's OAuth Client ID and Client Secret fields.

Full Grok Bot setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "terno": {
      "type": "http",
      "url": "https://mcp.terno.ai/mcp/preview"
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "terno": {
          "httpUrl": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Or run: gemini mcp add -s user --transport http terno https://mcp.terno.ai/mcp/preview

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "terno": {
          "serverUrl": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "terno": {
          "url": "https://mcp.terno.ai/mcp/preview",
          "transport": "http"
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "terno": {
          "type": "streamableHttp",
          "url": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "terno": {
          "url": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "terno": {
          "url": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "terno": {
          "url": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "terno": {
          "url": "https://mcp.terno.ai/mcp/preview"
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Terno

Terno is the hosted face of TernoDBI, an Apache-2.0 data layer that gives agents one controlled route to databases (Postgres, MySQL, Snowflake, BigQuery, Databricks, Oracle, SQLite) and 17 business-tool connectors such as Google Ads, GA4, HubSpot, Salesforce and Shopify.

Safety is built into the query path. SQLShield parses and rewrites each query, accepting only SELECT and blocking writes and stacked statements, while row-level filters are injected per role and private tables and columns stay out of the model's context. Admins can give tables semantic names and descriptions, and the server stores memory and an organisation prompt that agents read before answering.

You can self-host with pip install terno-dbi, using separate read-only query and admin servers over stdio, or use the hosted server with OAuth 2.1. A preview channel carries all tools and a stable channel only released ones. Results cap at 10,000 rows by default.

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

Going by the tool names, 1 of 6 tools changes data; 1 name doesn't say.

From the server's own tool labels and tool names; not verified by us.

list_datasourcesName suggests: reads
Lists the datasources the connection can reach.
list_tablesName suggests: reads
Lists tables by public name.
list_table_columnsName suggests: reads
Lists columns and types for a table.
get_sample_dataName suggests: reads
Returns sample rows from a table.
execute_queryName suggests: changes
Runs SQL through SQLShield.
terno_guide
Gives a tour of the server or what is new.

What it does

SELECT-only queries
SQLShield rewrites queries and rejects writes and stacked statements.
Row-level security
Per-role SQL filters are applied to every query.
Semantic schema
Friendly table and column names with descriptions and statistics.
Shared memory
Durable facts and an organisation prompt agents read first.
Business connectors
17 sources including ads, analytics, CRM and commerce.

Good for

  • Chat with a Postgres or Snowflake warehouse safely
  • Limit a sales agent to its own department's rows
  • Query HubSpot or GA4 data through the same tools
  • Document tables so models write correct filters

Pricing

Open source

Apache-2.0 self-hosted; hosted plans not published

Terno FAQ

Can an agent change my data?

No. Only SELECT is accepted.

How do I connect?

Use the hosted server at mcp.terno.ai with OAuth, or self-host with pip install terno-dbi.

Which databases are supported?

Postgres, MySQL, Snowflake, BigQuery, Databricks, Oracle and SQLite.

Are there result limits?

Results cap at 10,000 rows with a 300-second timeout by default.

Is Terno free?

Yes. Terno is open source, so you can use and self-host it for free.

How do I add Terno to Claude Code?

Run this command in your terminal: claude mcp add --transport http terno https://mcp.terno.ai/mcp/preview

What are the best alternatives to Terno?

The closest alternatives to Terno are Midplane, Datatomcp, Gulliver, GaussDB Read-Only MCP and Zektor.

Where this comes from

  • Description: written from the project's README.
  • Status: checked automatically by AIPoweredBot on 24 November 2026.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers