mcp-sql-query
Provides tools for SQLite database operations: execute SQL, inspect schemas, CRUD operations, and export data to JSON/CSV.
Click on "Install 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., "@mcp-sql-querylist all tables in the database"
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.
MCP SQL Query — SQLite Database Operations for AI Agents
An MCP server that gives AI agents SQLite database access: execute SQL, inspect schemas, CRUD operations, export to JSON/CSV — 13 tools, zero dependencies, pure Python stdlib.
Features
13 MCP Tools:
execute_sql,execute_batch,list_tables,table_schema,create_table,insert_row,insert_batch,select_rows,update_rows,delete_rows,export_json,export_csv,database_infoZero dependencies — pure Python stdlib (sqlite3, json, re, os)
SQL injection prevention — table name validation with regex
Batch transactions — execute multiple statements atomically with rollback
Data export — JSON array or CSV string output
In-memory or file-based — use
:memory:for ephemeral DBs or file paths for persistenceSTDIO JSON-RPC mode — drop-in for Claude Desktop, Hermes, or any MCP client
Related MCP server: sqlite-mcp
Quick Start
python -m src.server --stdio # STDIO mode
python -m src.server --manifest # Print manifestUse as a library
from src.server import MCPSQLQueryServer
import json
server = MCPSQLQueryServer()
# Create a table
server.handle_tool_call("create_table", {
"table_name": "users",
"columns": [
{"name": "id", "type": "INTEGER", "primary_key": True},
{"name": "name", "type": "TEXT", "not_null": True},
{"name": "email", "type": "TEXT", "unique": True}
]
})
# Insert rows
server.handle_tool_call("insert_row", {
"table_name": "users",
"data": {"name": "Alice", "email": "alice@example.com"}
})
# Query
result = server.handle_tool_call("select_rows", {
"table_name": "users",
"where": "name = 'Alice'"
})
# Export
server.handle_tool_call("export_csv", {"table_name": "users"})MCP Tool Reference
Tool | Description | Required Params |
| Raw SQL execution |
|
| Transactional batch |
|
| List all tables | — |
| Column/types/indexes |
|
| Create with columns |
|
| Insert one row |
|
| Insert multiple |
|
| SELECT with WHERE/LIMIT |
|
| UPDATE with WHERE |
|
| DELETE with WHERE |
|
| Export as JSON |
|
| Export as CSV |
|
| DB metadata | — |
Tests
python -m pytest tests/ -v # 33 tests, all passingLicense
MIT
Author
AMEOBIUS — github.com/AMEOBIUS
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- MIT
- Alicense-qualityCmaintenanceAn MCP server that enables AI agents to interact with SQLite databases by querying schemas, executing SQL, and inspecting table metadata. It supports safe database access through configurable read-only modes, query timeouts, and dry-run execution plans.MIT
- AlicenseAqualityDmaintenanceA zero-config MCP server that enables AI to access, analyze, and manage local SQLite databases with secure read-only querying and automatic schema discovery.8MIT
- Flicense-qualityDmaintenanceMCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AMEOBIUS-space/mcp-sql-query'
If you have feedback or need assistance with the MCP directory API, please join our Discord server