Terno
概览
作者提供的说明(英文原文)
Query, explore, and manage your databases through natural conversation.
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在云端运行
- 传输方式: Streamable HTTP
- 分类: 数据库与数据集
安装
选择你使用的 AI 应用,然后复制设置。
通过 5/5 项检查 · 你的提问会经过开发者的服务器(mcp.terno.ai)
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude · 约 2 分钟
不需要密钥,不用安装程序 · 在 claude.ai 或桌面应用设置一次,即可在聊天中使用 · 免费账户可添加 1 个
打开 Claude 的 Connectors 页面
CustomizeConnectors
点击“+ Add” → “Add custom connector”,填写这 2 项
把这里的内容复制到 Claude 中同名的输入框,然后点击 Continue
Name · 名称TernoRemote MCP server URL · 地址https://mcp.terno.ai/mcp/previewAuthentication 保持 Claude 检测到的设置,然后点击 Add
在聊天中开启
+ConnectorsTerno
试一试
用 Terno 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 Terno,或回答中出现 Terno 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
仅企业版 ChatGPT 可连接
适用于网页版 ChatGPT Business、Enterprise 或 Edu,需由工作区管理员或所有者添加 · 使用 Free、Plus 或 Pro:你的 ChatGPT 方案暂时无法自行连接 MCP
在网页版 ChatGPT 打开添加 MCP 的页面
Plugins+Add custom MCP server
填写名称和地址
输入名称,在 Connection 下粘贴地址,勾选风险提示,然后点击 Create as a plugin
Name · 名称TernoConnection · 地址https://mcp.terno.ai/mcp/preview在聊天中选择 Terno
开启新聊天,输入前先从插件列表中选择 Terno
试一试
用 Terno 告诉我你能帮我做什么,然后做一件给我看✓ 如果 ChatGPT 说正在使用 Terno,或回答中出现 Terno 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 OpenAI 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Claude Code · 约 2 分钟
不需要密钥,不用安装程序
打开终端
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
粘贴这条命令并按 Enter
claude mcp add --transport http terno https://mcp.terno.ai/mcp/preview在 Claude Code 中输入 /mcp
应能看到 Terno 在列表中并显示已连接
试一试
用 Terno 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 Terno,或回答中出现 Terno 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor · 约 2 分钟
不需要密钥,不用安装程序
在 Cursor 中以 Agent 模式打开 AI 聊天
试一试
用 Terno 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 Terno,或回答中出现 Terno 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code · 约 2 分钟
不需要密钥,不用安装程序
在 VS Code 中以 Agent 模式打开 AI 聊天
试一试
用 Terno 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 Terno,或回答中出现 Terno 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看
通过网页连接的应用使用的地址
https://mcp.terno.ai/mcp/previewJSON 设置在下方“开发者专用”中
开发者专用:终端命令和 JSON 设置
通过网页连接
Claude Code
claude mcp add --transport http terno https://mcp.terno.ai/mcp/previewCursor (~/.cursor/mcp.json)
{
"mcpServers": {
"terno": {
"url": "https://mcp.terno.ai/mcp/preview"
}
}
}VS Code (mcp.json)
{
"servers": {
"terno": {
"type": "http",
"url": "https://mcp.terno.ai/mcp/preview"
}
}
}这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
一览
哪些应用可以使用它
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
通过互联网连接,适用于
ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast
它能做什么
服务器要求先登录,才会列出它的工具。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月11日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 terno-ai 验证,该账户拥有此仓库
- ✓ 通过
仍在维护
代码最后更新于今天
- ✓ 通过
有许可证
使用 Apache-2.0
- ✓ 通过
端点有响应
在 615 毫秒内响应(HTTP 401)
- ✓ 通过
使用 OAuth 登录
声明支持 OAuth 登录,你的 AI 应用可以带你去登录
- … 尚未检查
工具描述中没有隐藏指令
尚未检查;我们会在检查端点时读取工具列表
讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
用户评价
还没有评价
与“数据库与数据集”中的其他服务器比较i
- 星标数多于此分类中其他 1163 个服务器的 92%
- 发布到注册中心的时间比此分类中其他 1163 个服务器的 100% 更新
- 基础检查结果等于或优于此分类中其他 1163 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Terno 安全吗?
它在 5 项适用的基础检查中通过了 5 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在我的电脑上运行还是在云端?
它在作者的云端运行。通过互联网连接,无需安装,但你发送的内容会经过作者的服务器。
它还在维护吗?
GitHub 仓库最后更新于今天,最新版本(1.0.2)于今天进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,因此也能用于支持远程 MCP 的应用,例如 ChatGPT Business 及以上方案。
有什么可以替代它?
同一分类中有:Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
TernoDBI: Database Intelligence Layer
TernoDBI is a data layer for AI agents, built for security and accuracy. It gives agents one controlled way to read your databases (Postgres, MySQL, Snowflake, BigQuery, Databricks, Oracle, SQLite) and your business tools (Google Ads, GA4, HubSpot, Salesforce, Shopify and more), with access rules enforced on every query.
Run it as a standalone Model Context Protocol (MCP) server — locally over stdio, or hosted over HTTP with OAuth — or embed it in an existing Django project.
Quick Start: Chat with your DB in 5 Minutes
- Install TernoDBI
pip install terno-dbi
- Start the server
ternodbi start [port]
By default this starts on 127.0.0.1:8376. On first boot it runs migrations, creates an admin / admin user and a default organisation. It runs in development mode, which is fine on your own machine — see Configuration before exposing it anywhere.
- Add your database Open the admin panel at http://127.0.0.1:8376/admin and add a datasource. Credentials are encrypted at rest.
- Generate an access token, bound to your organisation and a user (
--org/--user) — an unbound token can't use organisation features such as memory:
# Query token (read-only, for AI agents)
ternodbi manage issue_token --name "My Agent" --type query --org default --user admin
Admin token (schema metadata, memory, organisation prompt)
ternodbi manage issue_token --name "System Admin" --type admin --org default --user admin
5. **Connect your MCP client** — see [TernoDBI as an MCP Server](#ternodbi-as-an-mcp-server). To skip self-hosting, use the hosted server instead: [Connect to mcp.terno.ai](#connect-to-the-hosted-server-mcpternoai).
- Start chatting with your data.
Key Features
- Databases: Postgres, MySQL, Snowflake, BigQuery, Databricks, Oracle and SQLite through one API.
- Business tools (API connectors): 17 sources — ads, analytics, CRM, commerce and documents — queried through the same agent tools. See API Connectors.
- Security by default:
- SQLShield: every query is parsed and rewritten before it runs. Only
SELECTis accepted; writes and stacked statements never reach your database. - Row-level security: SQL filters (e.g.
department_id = 5) are injected into every query, per role. - Private tables and columns: hidden from the model's context unless a role is allowed to see them.
- Scoped tokens: per organisation, per datasource, with expiry; OAuth scopes and an Org Admin check for anything that writes.
- LLM-ready schema:
- Semantic names: expose
Customersinstead oft_users_v2_fnl; descriptions for tables and columns. - Column statistics: row and null counts, cardinality and common values, to help models write correct filters.
- Memory and organisation prompt: durable facts and instructions that agents read before answering, per organisation and per user.
- MCP, two ways:
- stdio: separate *query* (read-only) and *admin* servers, each with its own token.
- Hosted HTTP: one server with OAuth 2.1 (dynamic client registration, PKCE, consent screen), plus a
previewchannel for unreleased tools. - Large results: server-side cursors stream rows as NDJSON or download them as CSV.
Usage & Core APIs
Running the server
ternodbi start # default port 8376
ternodbi start 9000 # custom port
`ternodbi start` runs the REST API and admin panel. To also serve MCP over HTTP (`/mcp`), run the ASGI app — see [Hosted over HTTP](#hosted-over-http-with-oauth).
Sharing the database with an existing Django project
If your Django project embeds terno_dbi.core and uses SQLite, the standalone server can read and write the same database file:
DJANGO_PROJECT_PATH=/path/to/your/django/project ternodbi start
This uses /path/to/your/django/project/db.sqlite3.
Management commands
Always pass --org / --user so the token has an identity:
# Query token that expires in 30 days
ternodbi manage issue_token --name "Claude Agent" --type query --expires 30 --org acme --user alice
Admin token
ternodbi manage issue_token --name "System Admin" --type admin --org acme --user alice
Token restricted to one datasource
ternodbi manage issue_token --name "Finance Data Only" --type query --datasource 1 --org acme --user alice
`ternodbi manage` runs any Django management command (`migrate`, `createsuperuser`, …).
Query API
Every request carries Authorization: Bearer . Datasources can be addressed by ID or display name.
| Endpoint | Purpose |
|---|---|
GET /api/query/datasources/ | Datasources this token can reach |
GET /api/query/datasources/{ds}/tables/ | Tables, by public name |
GET /api/query/datasources/{ds}/tables/{table}/columns/ | Columns and types |
GET /api/query/tables/{table_id}/sample/?rows=10 | Sample rows (max 100) |
POST /api/query/datasources/{ds}/query/ | Run a query, results as JSON |
POST /api/query/datasources/{ds}/stream/ | Run a query, results streamed as NDJSON |
POST /api/query/datasources/{ds}/export/ | Run a query, results as a CSV download |
POST /api/query/datasources/1/query/
{ "sql": "SELECT name, email FROM Customers WHERE country = 'DE'", "max_rows": 500 }
Queries use public (semantic) names and are rewritten by SQLShield for the caller's role. Results are capped at `MAX_QUERY_ROWS` (10,000 by default) with a 300-second timeout; both are configurable in `DBI_LAYER`.
TernoDBI as an MCP Server
Query tools (read-only)
| Tool | What it does |
|---|---|
list_datasources | Datasources this connection can reach |
list_tables, list_table_columns | Schema, by public name |
get_sample_data | Sample rows from a table |
execute_query | Run SQL through SQLShield |
list_memories, get_memory, grep_memory | Read stored memory |
get_org_prompt, grep_org_prompt | Read the organisation prompt |
terno_guide | A tour of the server, or what's new |
Admin tools
| Tool | What it does |
|---|---|
connect_datasource | Returns a link where the user adds a datasource — credentials never pass through the chat |
add_datasource, validate_connection | Add or test a connection string (stdio only; never offered over OAuth) |
delete_datasource | Remove a database connection; an API connector is disconnected instead, keeping its settings |
sync_metadata | Refresh the schema from the database |
rename_table, rename_column | Set public names |
update_table_description, update_column_description, get_table_info | Write descriptions, with column statistics to inform them |
save_memory, edit_memory, delete_memory | Manage memory |
update_org_prompt, edit_org_prompt | Manage the organisation prompt |
The server also provides prompts (explore-datasources, build-a-query, schema-health) and resources (ternodbi://docs, ternodbi://changelog). The API-connector tools are listed under API Connectors.
Connect to the hosted server (mcp.terno.ai)
No install needed: point any MCP client that supports Streamable HTTP at the hosted server. The first time you connect, your client opens a browser to sign in with your Terno account and choose an organisation (OAuth 2.1); no API key is pasted anywhere.
| Channel | URL |
|---|---|
| Preview (all tools, including API connectors) | https://mcp.terno.ai/mcp/preview |
| Stable (released tools only) | https://mcp.terno.ai/mcp |
It is also listed in the official MCP Registry as io.github.terno-ai/terno.
Claude Code
claude mcp add --transport http terno https://mcp.terno.ai/mcp/preview
Claude (Desktop or claude.ai): Settings → Connectors → Add custom connector, and paste https://mcp.terno.ai/mcp/preview.
VS Code (GitHub Copilot): add to .vscode/mcp.json:
{
"servers": { "terno": { "type": "http", "url": "https://mcp.terno.ai/mcp/preview" } } }
Cursor: add to ~/.cursor/mcp.json:
{
"mcpServers": { "terno": { "url": "https://mcp.terno.ai/mcp/preview" } } }
Then ask: *"Show me the available datasources."*
Local (stdio): connecting Claude Desktop
- Install Claude Desktop and open Settings → Developer → Edit Config.
- Mint a query and an admin token (see Management commands) and add:
{
"mcpServers": { "ternodbi-query": { "command": "uvx", "args": ["--from", "terno-dbi", "dbi-mcp", "query"], "env": { "TERNODBI_API_URL": "http://127.0.0.1:8376", "TERNODBI_API_KEY": "dbi_query_YOUR_TOKEN_HERE" } }, "ternodbi-admin": { "command": "uvx", "args": ["--from", "terno-dbi", "dbi-mcp", "admin"], "env": { "TERNODBI_API_URL": "http://127.0.0.1:8376", "TERNODBI_API_KEY": "dbi_admin_YOUR_TOKEN_HERE" } } } }
3. Restart Claude Desktop and ask: *"Show me the available datasources."*
If you started TernoDBI on another port, update TERNODBI_API_URL.
Hosted over HTTP with OAuth
Hosted, both tool sets are one server over Streamable HTTP. Users sign in with OAuth 2.1 — dynamic client registration, PKCE, and a consent screen where they pick the organisation — so no API key is pasted into the client. Write access needs both a write scope and the Org Admin role, re-checked on every request.
pip install 'terno-dbi[http]'
uvicorn terno_dbi.server.asgi:application --port 8376
This serves two release channels: /mcp (stable: released tools, changes only on purpose) and /mcp/preview (everything, including tools not yet released on stable). See the MCP guide for OAuth discovery, scopes and releasing tools.
API Connectors
Besides databases, TernoDBI connects to business tools and queries them through the same agent workflow:
| Category | Sources |
|---|---|
| Advertising | Google Ads, Meta Ads, LinkedIn Ads, Microsoft Ads, Amazon Ads, TikTok Ads, X Ads |
| Analytics | Google Analytics 4, Google Search Console, YouTube |
| Social | Instagram Insights, Instagram Public Data, X Analytics |
| CRM | HubSpot, Salesforce, Pipedrive, Zoho CRM |
| Commerce | Shopify |
| Payments | Stripe |
| Documents | Google Sheets, Google Drive |
Connecting a source. An organisation admin opens /connect?connector= (for example google_ads), signs in with the provider, and chooses which of their accounts TernoDBI may query. Tokens are stored encrypted and refreshed automatically. The server needs an OAuth app for each provider you enable:
| Provider | Environment variables |
|---|---|
| Google (Ads, GA4, Search Console, YouTube, Sheets, Drive) | TERNO_GOOGLE_OAUTH_CLIENT_ID, TERNO_GOOGLE_OAUTH_CLIENT_SECRET |
| Meta (Meta Ads, Instagram via Facebook Login) | TERNO_META_APP_ID, TERNO_META_APP_SECRET |
| Instagram (Instagram Login) | TERNO_INSTAGRAM_APP_ID, TERNO_INSTAGRAM_APP_SECRET |
| LinkedIn | TERNO_LINKEDIN_CLIENT_ID, `TERNO_LINKEDIN_CLIENT