mcp-sqlite
@panasenco
About mcp-sqlite
MCP server for SQLite files. Supports Datasette-compatible metadata!
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": [
"mcp-sqlite",
"/absolute/path/to/database.db",
"--metadata",
"/absolute/path/to/metadata.yml"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is mCP sqlite?
mcp-sqlite is an MCP server that provides AI agents with tools to explore and query SQLite databases without exposing external systems. It is compatible with Datasette, allowing both AI agents and humans to interact with the same local data.
How to use mcp-sqlite?
Install uv and then run uvx mcp-sqlite <sqlite_file> --metadata <metadata.yml> to start the server. You can use it with VS Code GitHub Copilot agent mode, MCP Inspector for interactive exploration, or Datasette for a human-friendly view.
Key features of mcp-sqlite
- AI agents can retrieve the complete database catalog with
sqlite_get_catalog(). - Catalog can be enriched with descriptions using YAML or JSON metadata.
- Canned queries from metadata become separate MCP tools (e.g.,
sqlite_execute_main_{tool name}). - Agents can execute arbitrary SQL with
sqlite_execute(). - Compatible with Datasette metadata for human exploration.
Use cases of mcp-sqlite
- Provide AI agents contextual data from a local SQLite database.
- Let agents explore table structures and run custom queries safely.
- Combine AI‑driven database access with Datasette’s human interface.
- Use interactive debugging with MCP Inspector during development.
FAQ from mcp-sqlite
What tools does mcp-sqlite provide?
It provides sqlite_get_catalog() for the full table/column catalog (with optional metadata), sqlite_execute() for arbitrary SQL, and a separate MCP tool for each canned query defined in the metadata file.
How do I hide a table from the catalog?
Set hidden: true in the metadata YAML/JSON for that table. Note: the table remains accessible via sqlite_execute(), so hiding is not a security feature.
Can I use the same metadata file with Datasette?
Yes, mcp-sqlite’s metadata format is compatible with Datasette. You can run uvx datasette serve <sqlite_file> --metadata <metadata.yml> to view the same database.
What runtime dependencies are required?
You need uv (a Python package manager) and a SQLite database file. No additional database server is required.
Are there any security considerations?
The sqlite_execute() tool allows arbitrary SQL, so any table (including hidden ones) can be queried. Do not rely on hidden tables as a security measure.
Frequently asked questions
What tools does mcp-sqlite provide?
It provides `sqlite_get_catalog()` for the full table/column catalog (with optional metadata), `sqlite_execute()` for arbitrary SQL, and a separate MCP tool for each canned query defined in the metadata file.
How do I hide a table from the catalog?
Set `hidden: true` in the metadata YAML/JSON for that table. Note: the table remains accessible via `sqlite_execute()`, so hiding is not a security feature.
Can I use the same metadata file with Datasette?
Yes, mcp-sqlite’s metadata format is compatible with Datasette. You can run `uvx datasette serve <sqlite_file> --metadata <metadata.yml>` to view the same database.
What runtime dependencies are required?
You need [uv](https://docs.astral.sh/uv/getting-started/installation/) (a Python package manager) and a SQLite database file. No additional database server is required.
Are there any security considerations?
The `sqlite_execute()` tool allows arbitrary SQL, so any table (including hidden ones) can be queried. Do not rely on hidden tables as a security measure.
Basic information
More Databases MCP servers
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
Xata MCP Server
The Xata MCP server lets AI assistants and agents interact with your Xata organizations, projects, and Postgres database branches.
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Comments