Raw SQL MCP server
Commit Nov 9, 2026Execute raw, parameterized, and scalar SQL queries against SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.
Also known as KifoPL/RawSqlMcp, rawsqlmcp
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.1.0
- Last commit
- Nov 9, 2026
- License
- AGPL-3.0
What is Raw SQL MCP?
Raw SQL is an MCP server. Execute raw, parameterized, and scalar SQL queries against SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.
Summary generated from the project's README
About Raw SQL MCP server
Running raw, parameterized, and scalar SQL queries against multiple database engines is what Raw SQL MCP enables for developers using MCP clients. It connects to SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB through a STDIO interface. Users set up their connections by defining environment variables using the RawSqlMcp__Databases__ prefix to specify the provider and connection string for each database instance.
This server provides specific tools to list configured database names and read schema metadata. It allows for direct interaction with data, though it requires users to manually review and approve queries because it does not provide protection against destructive actions, SQL injection, or expensive operations. You can also configure an optional command timeout in seconds via the RawSqlMcp__CommandTimeout variable to manage long-running tasks.
What you can do with it
- 1Exploring database structuresRequest the AI to examine the tables and columns available in a specific database instance.
- 2Executing specific data lookupsInstruct the AI to run a scalar query to retrieve a single value from a local SQLite file.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
RawSqlMcp__ConnectionStrings__DefaultSecretObsolete. Use provider and connection string database settings instead.
RawSqlMcp__Databases__Default__ConnectionStringSecretConnection string for the named database.
RawSqlMcp__Databases__Default__ProviderDatabase provider. Values: sqlserver, sqlite, postgres, postgresql, mysql, mariadb.
| Name | Description | |
|---|---|---|
| RawSqlMcp__ConnectionStrings__Default | Obsolete. Use provider and connection string database settings instead. | Secret |
| RawSqlMcp__Databases__Default__ConnectionString | Connection string for the named database. | Secret |
| RawSqlMcp__Databases__Default__Provider | Database provider. Values: sqlserver, sqlite, postgres, postgresql, mysql, mariadb. |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work
- Source repository linked and reachablekifopl/rawsqlmcp is public and reachablegithub.com/kifopl/rawsqlmcp ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)AGPL-3.0spdx.org/licenses/AGPL-3.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/kifopl/rawsqlmcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubRaw SQL MCP
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.

Installation
Run the server with dnx:
dnx RawSqlMcp
For a specific version:
dnx RawSqlMcp@0.0.2
Package: RawSqlMcp on NuGet
Configuration
Databases are configured with environment variables under RawSqlMcp__Databases__.
SQLite:
export RawSqlMcp__Databases__Local__Provider="sqlite"
export RawSqlMcp__Databases__Local__ConnectionString="Data Source=/absolute/path/app.db"
PostgreSQL:
export RawSqlMcp__Databases__Reporting__Provider="postgres"
export RawSqlMcp__Databases__Reporting__ConnectionString="Host=localhost;Port=5432;Database=reporting;Username=postgres;Password=postgres"
MySQL/MariaDB:
export RawSqlMcp__Databases__Shop__Provider="mysql"
export RawSqlMcp__Databases__Shop__ConnectionString="Server=localhost;Port=3306;Database=shop;User ID=mysql;Password=mysql"
SQL Server:
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:
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:
{
"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.

Raw SQL MCP questions
Which database engines are supported?
The server supports SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.
How do I configure multiple databases?
Databases are configured using environment variables following the pattern RawSqlMcp__Databases__[Name]__[Property].
What tools does the server provide?
The server allows you to list configured databases, read schema metadata, and execute raw, parameterized, or scalar SQL queries.