# strut-stack-sql [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/rzlco666/strut-stack-sql  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/strut-stack-sql

## Description
Token-efficient MCP server for MySQL, PostgreSQL, and SQLite

## Tools
Capabilities this server exposes over MCP:

- **search_objects** — ranked progressive schema discovery (exact > prefix > substring > comment match).
- **execute_sql** — single statement, bound parameters, or a governed concurrent batch; columnar / rows / auto output; cursor pagination for large results.
- **analyze_query_performance** — normalized EXPLAIN tree, tiered findings, index advice (advice text only; never executed).

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "strut-stack-sql": {
    "url": "https://insiders.vscode.dev/redirect/mcp/install?name=strut-stack-sql&config=%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"
  }
}
```

## Documentation

## What strut-stack-sql does

strut-stack-sql gives MCP-compatible AI clients a database interface for MySQL, PostgreSQL, SQLite, DuckDB, SQL Server, and ClickHouse. It is designed to reduce the amount of schema and query-result text sent through the model context. The server runs as a single Rust binary and connects to a database using a database URL.

The default setup is read-only: it exposes 13 tools consisting of three core tools and ten introspection tools, while disabling writes and DDL. This makes the standard configuration suitable for agents that need to inspect a database, retrieve records, and investigate query behavior without changing the schema or data.

## How it works

The `search_objects` tool helps an agent locate database objects progressively. Results are ranked from strongest to weakest match: exact name, prefix, substring, and comment match. This lets an agent search for relevant tables or other schema objects instead of receiving a full schema dump up front.

`execute_sql` handles one SQL statement, bound parameters, or a governed concurrent batch. Results can use columnar, row-based, or automatic formatting. Cursor pagination is available for large result sets, helping agents retrieve data in manageable portions.

`analyze_query_performance` returns a normalized `EXPLAIN` tree, organizes findings by tier, and provides index advice as text. The advice is informational; the tool does not execute the suggested index changes.

## Setup and configuration

The installation script can download a release binary with SHA256 verification and configure detected AI clients. It can also limit setup to selected clients, create project-local configuration files, skip binary installation, or install without changing client configuration. Existing server entries are preserved and files modified by the setup process are backed up first.

A typical setup passes the database connection through `DATABASE_URL`:

```bash
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bash -s -- --setup --database-url 'postgresql://user:pass@localhost:5432/mydb'
```

Without a URL supplied during installation, configure the client to use `--url-env DATABASE_URL` and export `DATABASE_URL` in the environment that launches the editor or agent. The manual configurations use MCP stdio transport and pass `--full-tools` to enable the complete tool set. Claude Desktop users can install a platform-specific `.mcpb` bundle from the releases page; Cursor and VS Code also have one-click setup links.

## Tools and capabilities

- Ranked, progressive schema-object search.
- Single-statement SQL execution with bound parameters.
- Governed concurrent SQL batches.
- Columnar, row, and automatic result formats.
- Cursor-based pagination for large query results.
- Normalized query-plan output with tiered findings.
- Text-only index recommendations that are never applied automatically.
- Introspection tools available alongside the three core tools in the full configuration.

The server is licensed under MIT. It is listed in the official MCP Registry as `io.github.rzlco666/strut-stack-sql`.

## Limitations and notes

The standard setup does not permit writes or DDL, so it is intended for read-only database exploration and analysis unless a different operating mode is configured. Index advice from query analysis must be reviewed and applied separately. Client configuration syntax differs between tools: VS Code uses a top-level `servers` object, while several other clients use `mcpServers`; Codex uses TOML rather than JSON.

_Full upstream README: https://allmcps.com/mcp/strut-stack-sql/readme_

