Mcp Sql Rust

io.github.rzlco666Published by GitHub account rzlco666v0.4.0Updated Oct 24, 2026

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

The publisher's own server: rust.wiki

VerifiedSTDIODesktop onlyDatabasesDeveloper Tools

Overview

AI-generated overview

A local, token-efficient MCP server that lets an assistant inspect and query MySQL, PostgreSQL and SQLite databases through a small set of SQL tools.

What you can do
Search database objects such as tables and schemas with search_objects, and run SQL through execute_sql with columnar results and row and byte caps to save tokens. Analyze query performance with analyze_query_performance, including timeouts and engine-level statement limits. Optionally enable extra tools with the full-tools flag, and DDL aliases only with the allow-DDL flag. Run over stdio or a local HTTP endpoint with health check.
When to use it
Useful when an assistant needs to explore or query a relational database during development, for example to look up schema objects, run read-only SQL, or check why a query is slow, without a heavyweight database client.
Requirements
Runs as a local process on the user's machine, installed from a platform-specific package or an install script; desktop only. Needs a DATABASE_URL connection string for real queries; without it the server starts against an in-memory SQLite database. Network access to the database host is required.
Before you install
DATABASE_URL typically embeds database credentials, so treat it as a secret. The server starts read-only, but the allow-writes flag enables write tiers and the allow-DDL flag enables schema changes, which can modify or delete data. The install script is fetched and piped to a shell, so review it before running.

Installation

In SourceWeft

  1. Open Mcp Sql Rust in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Strut Stack SQL

Light strut. Extreme load.

Token-efficient MCP server for MySQL, PostgreSQL, and SQLite — written in Rust. Part of the StrutStack ecosystem; usable standalone with any agent client.

[Latest release] [CI] [License: MIT]

Formerly published as mcp-sql-rust (compat binary alias still ships in v1.0).

Mission

  • Token thrift — default 3 tools, columnar {cols,rows,meta}, row/byte caps
  • Best-practice Rust — AST SQL guard before pool checkout, lean release binary
  • Multi-engine — PostgreSQL + MySQL + SQLite in one binary
  • Ship-ready — one-command install, stdio + Streamable HTTP, Cursor-friendly launcher

Install (one command)

bash
curl -fsSL https://raw.githubusercontent.com/rzlco666/strut-stack-sql/main/install.sh | bashstrut-stack-sql --version

Installs to ~/.local/bin (also creates mcp-sql-rust alias). Ensure ~/.local/bin is on your PATH.

Other channels (Homebrew, Scoop, winget, Docker, cargo): docs/INSTALL.md.

Quick start (Cursor)

json
{  "mcpServers": {    "strut-stack-sql": {      "command": "strut-stack-sql",      "args": ["--full-tools"],      "cwd": "${workspaceFolder}"    }  }}

Project .env:

env
DATABASE_URL=postgresql://user:[email protected]:5432/app

Without credentials the server still starts (ephemeral sqlite::memory:) so MCP initialize succeeds; set DATABASE_URL for real queries.

Official workspace launcher (loads nested apps/api/.env, never blocks start on dead DB):

json
{  "mcpServers": {    "strut-stack-sql": {      "command": "node",      "args": [        "/absolute/path/to/strut-stack-sql/packaging/cursor-mcp-launcher.mjs",        "${workspaceFolder}"      ]    }  }}

Why this shape

ChoiceDetail
Default toolssearch_objects, execute_sql, analyze_query_performance
Extra tools--full-tools (+ DDL aliases need --allow-ddl)
ResultsColumnar JSON only by default (token-efficient)
Guardsqlparser AST; multi-statement deny; write tiers; complexity limits
TimeoutsClient timeout + PG statement_timeout / MySQL max_execution_time
Transportsstdio · --http 127.0.0.1:8080 (/mcp, /healthz)

Measured RSS / cold-start vs Node rivals (same seed query): docs/BENCHMARKS.md. We do not invent QPS leaderboards.

CLI

bash
strut-stack-sql --versionstrut-stack-sql                          # stdio, read-onlystrut-stack-sql --allow-writesstrut-stack-sql --full-toolsstrut-stack-sql --http 127.0.0.1:8080

Docs

DocPurpose
docs/QUICKSTART.mdFirst run
docs/INSTALL.mdAll install channels
docs/SECURITY.mdGuard + write tiers
docs/TOOLS.mdTool schemas
docs/CONFIGURATION.md.env / TOML / CLI
docs/ARCHITECTURE.mdModules
docs/BENCHMARKS.mdReproducible harness

Agent clients

See AGENTS.md for Cursor / OMNI / CodeGraph conventions.

License

MIT

Source: README.md at commit 380a636

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.4.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Rust integrations