Raw SQL MCP

io.github.KifoPLPublished by GitHub account KifoPLv0.1.0Updated Oct 24, 2026

Execute raw SQL queries against SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.

VerifiedSTDIODesktop onlyDatabasesDeveloper Tools

Overview

AI-generated overview

A local STDIO MCP server that lets an assistant run raw SQL against SQL Server, SQLite, PostgreSQL, MySQL and MariaDB databases you configure.

What you can do
List the database names configured for the server and read their schema metadata, so the assistant knows what tables and columns exist before querying. Execute raw SQL statements against a chosen configured database. Run parameterized queries and scalar queries that return a single value. Databases are named through environment variables, so several connections can be exposed side by side.
When to use it
Useful when you want an assistant to inspect schemas and run ad-hoc SQL against your own databases during development, debugging or reporting, and you are willing to review each query before it runs.
Requirements
Runs locally as a STDIO process launched with dnx from the RawSqlMcp NuGet package, so the .NET tooling that provides dnx is needed. Each database needs a provider setting (sqlserver, sqlite, postgres, postgresql, mysql or mariadb) and a connection string supplied through environment variables such as RawSqlMcpDatabasesDefaultProvider and RawSqlMcpDatabasesDefaultConnectionString. Network access is needed for remote database servers. An optional command timeout can be set.
Before you install
Connection strings carry database credentials and are passed as environment variables such as RawSqlMcpDatabasesDefault__ConnectionString; keep them out of shared configuration. The README warns the server does not protect against destructive or expensive queries, SQL injection, missing pagination or unsafe data exposure, and asks you to review and approve queries before running them. Queries can write, change or delete data, and results may expose sensitive records to the assistant.

Installation

In SourceWeft

  1. Open Raw SQL MCP 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

Raw SQL MCP

[CI] [NuGet] [Latest release]

Raw SQL MCP is a STDIO MCP server for executing raw SQL against SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.

[!IMPORTANT] Use it carefully. The server does not protect you from destructive queries, expensive queries, SQL injection, missing pagination, or unsafe data exposure. Always review and approve queries before running them.

[Install and run demo]

Installation

Run the server with dnx:

bash
dnx RawSqlMcp

For a specific version:

Package: RawSqlMcp on NuGet

Configuration

Databases are configured with environment variables under RawSqlMcp__Databases__.

SQLite:

bash
export RawSqlMcp__Databases__Local__Provider="sqlite"export RawSqlMcp__Databases__Local__ConnectionString="Data Source=/absolute/path/app.db"

PostgreSQL:

bash
export RawSqlMcp__Databases__Reporting__Provider="postgres"export RawSqlMcp__Databases__Reporting__ConnectionString="Host=localhost;Port=5432;Database=reporting;Username=postgres;Password=postgres"

MySQL/MariaDB:

bash
export RawSqlMcp__Databases__Shop__Provider="mysql"export RawSqlMcp__Databases__Shop__ConnectionString="Server=localhost;Port=3306;Database=shop;User ID=mysql;Password=mysql"

SQL Server:

bash
export RawSqlMcp__Databases__Default__Provider="sqlserver"export RawSqlMcp__Databases__Default__ConnectionString="Server=localhost,1433;Database=master;User Id=sa;Password=Your_password123;TrustServerCertificate=True"

Optional command timeout, in seconds:

bash
export RawSqlMcp__CommandTimeout=30

[!INFO] The legacy RawSqlMcp__ConnectionStrings__Default="..." format is obsolete. It still works for compatibility and is interpreted as SQL Server.

Usage

Register the server in an MCP client as a STDIO server:

json
{  "servers": {    "raw-sql-mcp": {      "command": "dnx",      "args": ["RawSqlMcp"],      "env": {        "RawSqlMcp__Databases__Default__Provider": "sqlserver",        "RawSqlMcp__Databases__Default__ConnectionString": "Server=localhost,1433;Database=master;User Id=sa;Password=Your_password123;TrustServerCertificate=True"      }    }  }}

The server exposes tools for listing configured database names, reading schema metadata, and executing raw, parameterized, and scalar SQL queries.

[Short end-to-end demo]

Source: README.md at commit 41328c9

Tools

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

Version history

1
  1. v0.1.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