# terno

The terno MCP server for Claude Code connects an agent to databases and business tools. Ask it to inspect schemas or query connected data.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8 repo stars
- Author: terno-ai
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/terno-ai/ternodbi
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/terno

## What it does

terno gives an AI agent tools to inspect schemas and query connected databases. It supports Postgres, MySQL, Snowflake, BigQuery, Databricks, Oracle, and SQLite; business integrations include Google Ads, GA4, HubSpot, Salesforce, and Shopify.

SQLShield checks each query and allows `SELECT` statements only. Access rules apply to every request. Connect through the hosted HTTP endpoint `https://mcp.terno.ai/mcp/preview`; data access depends on configured sources and an access token. A self-hosted setup requires Python 3.10+ and Django 4.2+; install the package with `pip install terno-dbi`.

## Requirements
- Remote server: `https://mcp.terno.ai/mcp/preview`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http terno https://mcp.terno.ai/mcp/preview
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add terno --url https://mcp.terno.ai/mcp/preview
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "terno": {
            "url": "https://mcp.terno.ai/mcp/preview"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "terno": {
            "type": "http",
            "url": "https://mcp.terno.ai/mcp/preview"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http terno https://mcp.terno.ai/mcp/preview
```

## When to use it
- inspect tables and columns in a connected database
- sample rows from a table
- run a SQL query against connected data
- connect a data source to the server

## Example prompts
- Show the tables and columns in the connected database.
- Run a query on the `Customers` table and show the results.
- Connect a data source to the server.

## Similar
- [database-attacker](https://affpapa.org/en/nevibecode/agents/database-attacker.md) — subagent · ★ 2482 repo stars
- [safedb-mcp](https://affpapa.org/en/nevibecode/mcp/safedb-mcp.md) — MCP server · ★ 9 repo stars
- [quarry](https://affpapa.org/en/nevibecode/mcp/quarry.md) — MCP server · ★ 5 repo stars
- [DataLink](https://affpapa.org/en/nevibecode/mcp/datalink.md) — MCP server · ★ 5 repo stars
- [database-optimization](https://affpapa.org/en/nevibecode/agents/database-optimization.md) — subagent · 3924 installs
- [planetscale-customer-report-template](https://affpapa.org/en/nevibecode/skills/planetscale-customer-report-template.md) — skill · 1900 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
