Raja SQL MCP
An MCP (Model Context Protocol) server for interacting with SQLite databases. This server provides tools to inspect database schemas, execute SQL queries, and perform CRUD operations, making it easy to integrate databases with AI agents and LLM-powered applications.
Features
✅ Execute SQL queries
✅ List all tables in the database
✅ Inspect table schemas
✅ Execute SELECT queries
✅ Insert data dynamically
✅ Update existing records
✅ Delete records safely
✅ SQLite-based (no external database server required)
Installation
pip install raja-sql-mcp
Running the Server
sql-mcp
Or during development:
uv run python -m src.sql_mcp.main
MCP Inspector Configuration
Transport
STDIO
Command
uv
Arguments
run python -m src.sql_mcp.main
Working Directory
/path/to/SQL_MCP
Available Tools
list_tables()
Returns all tables in the database.
Example:
list_tables()
describe_table(table_name)
Returns the schema of the specified table.
Example:
describe_table("users")
execute_sql(query)
Executes SQL queries such as:
- CREATE TABLE
- INSERT
- UPDATE
- DELETE
- DROP TABLE
- ALTER TABLE
Example:
execute_sql("""
CREATE TABLE users(
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
)
""")
execute_select(query)
Executes SELECT queries and returns rows.
Example:
execute_select(
"SELECT * FROM users"
)
insert_data(table_name, data)
Insert records dynamically.
Example:
insert_data(
"users",
{
"name": "Raja",
"age": 21
}
)
update_data(table_name, data, condition)
Update existing records.
Example:
update_data(
"users",
{
"age": 22
},
"id = 1"
)
delete_data(table_name, condition)
Delete records matching a condition.
Example:
delete_data(
"users",
"id = 1"
)
Example Workflow
Create a table:
execute_sql("""
CREATE TABLE users(
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
)
""")
Insert data:
insert_data(
"users",
{
"name": "Raja",
"age": 20
}
)
Query data:
execute_select(
"SELECT * FROM users"
)
Update data:
update_data(
"users",
{
"age": 21
},
"id = 1"
)
Delete data:
delete_data(
"users",
"id = 1"
)
Project Structure
SQL_MCP/
│
├── src/
│ └── sql_mcp/
│ ├── __init__.py
│ ├── database.py
│ ├── tools.py
│ └── main.py
│
├── README.md
├── LICENSE
├── pyproject.toml
└── uv.lock
Use Cases
- AI Database Agents
- Cursor-like Coding Assistants
- LLM-powered CRUD Applications
- Database Automation
- Schema Inspection Tools
- SQL Learning and Experimentation
License
MIT License © 2026 Anna Vamsi Krishna Raja
Metadata
Release files for raja_sql_mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| raja_sql_mcp-0.1.0.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| raja_sql_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / raja_sql_mcp-0.1.0.tar.gz
| Download URL | raja_sql_mcp-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73caba3569d4b78b823368361d4bc283604dfae9a8b700a8780d382a3757d1de
|
|
BLAKE2b-256 checksum How to use checksums |
5b9c1d235134240a59b1db85e984f7e08778e0adb6371051ab8a193b82c272ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / raja_sql_mcp-0.1.0-py3-none-any.whl
| Download URL | raja_sql_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
999fc0802101a2430d5b57307847ba549dbfd31eb1be9bc45d2a5977adfb0e8c
|
|
BLAKE2b-256 checksum How to use checksums |
ca86d39bf5184cf87e66bc154d6f1e641a3ca41d01d1a96d046ab0ff2e3d9a83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for raja_sql_mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.