AutoMCP-SQL
Provides tools for interacting with SQLite databases, enabling automatic CRUD operations on any table in the database via pre-validated parameterized templates.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AutoMCP-SQL Can you show me the orders with pending status?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AutoMCP-SQL — Zero-Knowledge MCP Server
An MCP server that autonomously scans any SQLite database, generates typed CRUD tools for every table it discovers, builds a schema-aware prompt explaining joins/relationships, and enforces Zero-Knowledge security — the LLM never writes raw SQL, only calls pre-validated parameterized templates.
What It Does
Feature | Detail |
Auto-Discovery | Scans |
CRUD Generation | Creates |
Schema Prompt | Injects table columns + foreign-key relationships as MCP instructions |
Zero-Knowledge SQL | Instead of allowing the LLM to write arbitrary SQL (which risks SQL injection and destructive operations), the server generates isolated CRUD tools (Create, Read, Update, Delete) in memory for each table. The LLM interacts with these safe, pre-validated python templates |
Configurable DB | Point at any SQLite file via |
Related MCP server: Manual SQLite MCP Server
Project Structure
AutoMCP-SQL/
├── server.py # MCP server — scans DB, generates tools, starts server
├── setupdb.py # One-time script to create and seed legacy.db for testing
├── legacy.db # SQLite database (auto-created by setupdb.py)
├── pyproject.toml # Dependencies managed by uv
├── uv.lock # Lockfile — guarantees reproducible installs
└── README.mdTech Stack
Tool | Why |
Minimal decorator-based MCP server; zero boilerplate for tool registration | |
sqlite3 (stdlib) | No extra dependency; sufficient for parameterized CRUD on any SQLite file |
uv | 10-100× faster than pip; lockfile guarantees reproducible installs across machines |
MCP (Model Context Protocol) | Standard protocol for giving LLMs structured, auditable tool access |
Prerequisites
Python 3.11+
uv — fast Python package/project manager
Claude Desktop — to connect the MCP server (optional)
Install uv if you don't have it:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Setup
1. Clone the repository
git clone https://github.com/Mav977/AutoMCP-SQL.git
cd AutoMCP-SQL2. Install dependencies
uv syncThis reads uv.lock and recreates the exact virtual environment.
3. Seed the demo database
uv run setupdb.pyThis creates legacy.db in the project root with sample tables (users, orders, products, etc.) so you can test immediately.
Using your own database? Skip this step and point
DB_PATHat your existing.dbfile (see Configuration below).
Example: Claude Desktop Configuration
You can access the configuration file directly from within the app:
Open Claude Desktop.
Navigate to Settings.
Select the Developer tab.
Click Edit Config to open the
claude_desktop_config.jsonfile in your default text editor.
2. Add the MCP server entry
Replace the path below with the absolute path to your cloned server.py:
Windows:
{
"mcpServers": {
"AutoMCP-SQL": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\YourName\\Desktop\\Projects\\AutoMCP-SQL\\server.py"
],
"env": {
"DB_PATH": "C:\\Users\\YourName\\Desktop\\Projects\\AutoMCP-SQL\\legacy.db"
}
}
}
}macOS / Linux:
{
"mcpServers": {
"AutoMCP-SQL": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"/home/yourname/projects/AutoMCP-SQL/server.py"
],
"env": {
"DB_PATH": "/home/yourname/projects/AutoMCP-SQL/legacy.db"
}
}
}
}Important: Use double backslashes (
\\) in Windows paths inside JSON.
3. Restart Claude Desktop
Fully quit and reopen Claude Desktop. The MCP server starts automatically when Claude launches.
4. Verify the connection
Open a new conversation in Claude Desktop. Click the plus icon (+) in the chat input area, select Connectors, and then click Manage connectors. Here, you will see AutoMCP-SQL listed along with all the tools the MCP has access to (like get_users, create_orders, etc.).
You can also just ask Claude:
"What tables do you have access to?"
Claude will use the injected schema prompt to describe the database structure without querying it.
Using Your Own Database
Set DB_PATH in the config to point at any existing SQLite file:
"env": {
"DB_PATH": "C:\\path\\to\\your\\database.db"
}The server will scan it on startup and auto-generate tools for every table it finds — no code changes needed.
Configuration
Environment Variable | Default | Description |
|
| Path to the SQLite database file |
How Zero-Knowledge Security Works
The server never exposes raw SQL execution to the LLM. Instead:
On startup,
scan_db()reads the schema and builds a natural-language prompt describing tables and relationships.For each table, four tool functions are registered with hard-coded SQL templates:
get_<table>→SELECT * FROM <table> WHERE col = ?create_<table>→INSERT INTO <table> (cols) VALUES (?)update_<table>→UPDATE <table> SET col = ? WHERE id = ?delete_<table>→DELETE FROM <table> WHERE id = ?
All values are passed as parameterized arguments — never string-interpolated into queries.
Claude can only call these named tools; it has no mechanism to execute arbitrary SQL.
This means even a prompt-injected or jailbroken model cannot run DROP TABLE or exfiltrate data via UNION — the attack surface is limited to the four CRUD templates.
Troubleshooting
Server doesn't appear in Claude Desktop
Wait a few seconds; it may take some time to load.
Double-check the path in
claude_desktop_config.json— it must be the absolute path toserver.py, not a folder.Make sure
uvis on your system PATH (open a new terminal and runuv --versionto verify).Fully quit Claude Desktop (system tray on Windows, Cmd+Q on Mac) and reopen it.
DB_PATH does not exist error
Run uv run setupdb.py first to create legacy.db, or update DB_PATH in the config to point at an existing database.
Tools not showing up after config change Claude Desktop only reads the config on launch. Fully restart it after any config edits.
Available Tools
12 toolscreate_ordersA
Insert a new row into orders. data = JSON string like '{"col":"val"}'.
Inputs: data (required). Returns: result
create_productsA
Insert a new row into products. data = JSON string like '{"col":"val"}'.
Inputs: data (required). Returns: result
create_usersA
Insert a new row into users. data = JSON string like '{"col":"val"}'.
Inputs: data (required). Returns: result
delete_ordersB
Delete a row from orders by id.
Inputs: row_id (required). Returns: result
delete_productsA
Delete a row from products by id.
Inputs: row_id (required). Returns: result
delete_usersB
Delete a row from users by id.
Inputs: row_id (required). Returns: result
get_ordersA
Get rows from orders. filters = JSON string like '{"col":"val"}' or empty string for all rows.
Inputs: filters. Returns: result
get_productsA
Get rows from products. filters = JSON string like '{"col":"val"}' or empty string for all rows.
Inputs: filters. Returns: result
get_usersA
Get rows from users. filters = JSON string like '{"col":"val"}' or empty string for all rows.
Inputs: filters. Returns: result
update_ordersA
Update a row in orders by id. data = JSON string of fields to update.
Inputs: data (required), row_id (required). Returns: result
update_productsA
Update a row in products by id. data = JSON string of fields to update.
Inputs: data (required), row_id (required). Returns: result
update_usersA
Update a row in users by id. data = JSON string of fields to update.
Inputs: data (required), row_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool is uniquely named with a verb (get, create, update, delete) and a specific table (users, products, orders). There is no overlap because every combination of action and table is distinct and clearly indicated by the name.
All tool names follow the same verb_noun pattern using snake_case (e.g., get_users, update_products). This is perfectly consistent across the entire set, making the tools predictable and easy to navigate.
With 12 tools, the count is well-scoped for a CRUD API covering three tables (users, products, orders). Each tool serves a clear purpose, and there is no bloat or redundancy.
Each of the three tables has complete CRUD coverage: get (read with optional filters), create (insert), update, and delete. This covers all standard lifecycle operations for a SQL-based server, leaving no obvious dead ends.
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Ask questions in plain language, get answers from your business database. No SQL required.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to perform complete database operations on SQLite databases, including creating tables, executing queries, and managing data through CRUD operations with schema inspection capabilities.26 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables direct interaction with a SQLite database through custom-mapped tools for creating and retrieving items. It provides structured, AI-optimized responses and manual control over database operations without requiring external API dependencies.-
- FlicenseNot gradedqualityCmaintenanceQuery SQLite databases via AI — safe read-only mode-
- AlicenseBqualityDmaintenanceEnables AI agents to interact with local SQLite databases with full CRUD, schema introspection, foreign key relations, generated columns, and multi-format import/export (CSV, JSON, XLSX) through natural language.2614 npmMIT