Strut Stack SQL
概览
作者提供的说明(英文原文)
Token-efficient MCP server for MySQL, PostgreSQL, SQLite, DuckDB, SQL Server, and ClickHouse
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 数据库与数据集
- 你需要填写:DATABASE_URL
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
DATABASE_URL
标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
链接指向作者自己的文件;我们不托管也不重新打包它。打开文件后,Claude Desktop 会进行安装。
在终端中运行这条命令
运行前请先填写空着的值。
浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
- Database connection URL
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 rzlco666 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“数据库与数据集”中的其他服务器比较i
- 星标数多于此分类中其他 1144 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 1144 个服务器的 95% 更新
- 基础检查结果等于或优于此分类中其他 1144 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Strut Stack SQL 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
你需要填写:DATABASE_URL
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(2.0.2)于前天进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 MCPB。
有什么可以替代它?
同一分类中有:Supabase, MongoDB MCP Server, Elasticsearch MCP Server
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Light strut. Extreme load.
A token-efficient MCP server that lets AI agents query PostgreSQL , MySQL , SQLite , DuckDB , ClickHouse , and SQL Server — safely, in one small Rust binary.
⭐ If this saves you tokens, star the repo — it is the single biggest thing that helps other people find it.
Install in one command — binary + AI setup included
This is the fastest path. It downloads the release binary (SHA256-verified), then configures every AI tool it finds on your machine — Claude Code, Cursor, VS Code, Claude Desktop, Codex, OpenCode, Windsurf, and Zed — so you do not hand-edit a single JSON file. Existing entries for other servers are kept, and every file it touches is backed up first.
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash -s -- --setup
With your database URL baked in (recommended):
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash -s -- --setup --database-url 'postgresql://user:pass@localhost:5432/mydb'
Other useful forms:
# Only specific tools
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash -s -- --setup --tools cursor,vscode,opencode
Project-local configs (.cursor/mcp.json, .vscode/mcp.json, .mcp.json, opencode.json, .codex/config.toml)
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash -s -- --setup --project
Binary already installed? Just do the setup step
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash -s -- --setup --skip-install
Install only, no setup
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash
Then restart your AI tool and ask it:
"List the tables in my database, then show me the 5 most recent orders."
You should see the tables listed, then the 5 most recent orders.
If you run the installer without a URL, configs reference ${env:DATABASE_URL} (or forward it, for Codex) — export DATABASE_URL in the environment that launches your editor before starting it. Full installer reference: docs/INSTALL.md.
One-click install
No terminal? These links open your editor with the server pre-filled. Replace the placeholder database URL with your own where prompted.
| Client | One-click |
|---|---|
| Cursor | Add to Cursor |
| VS Code | Install in VS Code |
| Claude Desktop | Download the .mcpb bundle for your platform from Releases and open it — it asks for DATABASE_URL and installs itself. |
GitHub does not render cursor:// / vscode: links clickable. If a button above does not open your editor, paste this into your browser's address bar instead:
vscode:mcp/install?%7B%22command%22%3A%22strut-stack-sql%22%2C%22args%22%3A%5B%22--url-env%22%2C%22DATABASE_URL%22%2C%22--full-tools%22%5D%2C%22env%22%3A%7B%22DATABASE_URL%22%3A%22%24%7Binput%3Adatabase_url%7D%22%7D%2C%22inputs%22%3A%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22database_url%22%2C%22description%22%3A%22DATABASE_URL%20for%20strut-stack-sql%20%28e.g.%20postgresql%3A%2F%2Fuser%3Apassword%40localhost%3A5432%2Fdbname%29%22%2C%22password%22%3Atrue%7D%5D%7D
Set up by hand (copy-paste)
Prefer the installer above. If you configure by hand, every block below is read-only by default: 13 tools (3 core + 10 introspection), no writes, no DDL. Replace DATABASE_URL with your real URL, or keep --url-env DATABASE_URL and export it. Every block is also machine-checked in docs/CLIENTS.md.
Claude Code
claude mcp add --scope user --transport stdio \
--env DATABASE_URL='postgresql://user:pass@localhost:5432/mydb' \ strut-stack-sql -- strut-stack-sql --url-env DATABASE_URL --full-tools
Or in .mcp.json (project) — Claude Code expands ${VAR} here:
{
"mcpServers": { "strut-stack-sql": { "type": "stdio", "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" } } } }
Check it with claude mcp get strut-stack-sql (or /mcp inside a session).
Cursor
Global ~/.cursor/mcp.json, or project .cursor/mcp.json. Cursor interpolates ${env:NAME}, so this works with an exported DATABASE_URL and no secret in the file:
{
"mcpServers": { "strut-stack-sql": { "type": "stdio", "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "${env:DATABASE_URL}" } } } }
VS Code
Workspace .vscode/mcp.json (or the user configuration via MCP: Open User Configuration). Note: VS Code uses a top-level servers object, not mcpServers — do not paste a Cursor block here unchanged:
{
"servers": { "strut-stack-sql": { "type": "stdio", "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "${env:DATABASE_URL}" } } } }
Claude Desktop
claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, ~/.config/Claude/ on Linux):
{
"mcpServers": { "strut-stack-sql": { "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" } } } }
Codex
~/.codex/config.toml (or project .codex/config.toml). Codex uses TOML, not JSON:
[mcp_servers.strut-stack-sql]
command = "strut-stack-sql" args = ["--url-env", "DATABASE_URL", "--full-tools"] env = { DATABASE_URL = "postgresql://user:pass@localhost:5432/mydb" } startup_timeout_sec = 20
No URL in the file? Use env_vars = ["DATABASE_URL"] instead of env to forward it from Codex's environment.
OpenCode
The CLI is the version-proof path (it writes the right shape for your OpenCode):
opencode mcp add strut-stack-sql --env DATABASE_URL='postgresql://user:pass@localhost:5432/mydb' -- strut-stack-sql --url-env DATABASE_URL --full-tools
Or in opencode.json (global ~/.config/opencode/opencode.json, or project root). command is one array and env vars go in environment, not env:
{
"$schema": "https://opencode.ai/config.json", "mcp": { "strut-stack-sql": { "type": "local", "command": ["strut-stack-sql", "--url-env", "DATABASE_URL", "--full-tools"], "enabled": true, "environment": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" }, "timeout": 30000 } } }
Verify with opencode mcp list. On OpenCode v2, if the server does not appear, nest it under mcp.servers instead of directly under mcp.
Windsurf
~/.config/devin/mcp_config.json (current builds; older builds read ~/.codeium/windsurf/mcp_config.json — use whichever Open MCP config file in Cascade opens):
{
"mcpServers": { "strut-stack-sql": { "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" } } } }
Press refresh in Cascade after editing.
Zed
~/.config/zed/settings.json (merged under context_servers, everything else kept):
{
"context_servers": { "strut-stack-sql": { "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" } } } }
Any other MCP client
This is the whole contract — stdio, one binary, one env var:
{
"mcpServers": { "strut-stack-sql": { "command": "strut-stack-sql", "args": ["--url-env", "DATABASE_URL", "--full-tools"], "env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" } } } }
Try it
Once your AI tool shows the server as connected, these prompts exercise the whole surface. Start read-only; writes and DDL stay off until you explicitly enable them (see Tools).
"List the tables in my database, with row counts."
"Show me the schema of the orders table, including its foreign keys." "Why is this query slow, and which index would fix it?" (paste any SELECT — analyze_query_performance returns an EXPLAIN tree, tiered findings, and index advice; the advice is text only, never executed) "Find every table that references customers.id."
What the agent sees: execute_sql returns columnar JSON — column names once, compact meta:
{
"ok": true, "data": { "cols": ["id", "email", "name"], "rows": [[42, "ada@example.com", "Ada"]], "meta": { "n": 1, "truncated": false, "limit_injected": true } } }
Smoke-test the binary itself (no database needed) — a JSON initialize response means the server speaks MCP:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
| strut-stack-sql --url 'sqlite::memory:' --full-tools
Connect your database
One URL, one flag. Credentials belong in the environment (or .env discovery in your project), never in a pasted config — prefer --url-env DATABASE_URL.
| Engine | URL format | Notes |
|---|---|---|
| PostgreSQL | postgresql://user:pass@host:5432/dbname | |
| MySQL / MariaDB | mysql://user:pass@host:3306/dbname | mariadb engine hint maps here |
| SQLite | sqlite:///absolute/path/app.db, sqlite::memory: | Constrain files with --sqlite-allowlist DIR[,DIR…] |
| DuckDB | duckdb:///absolute/path/analytics.duckdb, `duckdb::memory
只显示了开头部分;其余内容请在仓库中阅读