SQLite MCP Server: Query Local Databases with AI
What it is: An MCP server that gives AI agents SQL access to a local SQLite file — list tables, describe schemas, run queries — with no database server to install. The original reference implementation lived in the official modelcontextprotocol/servers repo and now sits in its archive (servers-archived); it still works and remains installable as mcp-server-sqlite, and several community forks carry the idea forward with extra features.
Quick answer: Run uvx mcp-server-sqlite --db-path ./data.db and register it in your MCP client to let Claude query any local SQLite file. The reference server is archived but functional; community forks add write controls and busy-timeout handling. It's the fastest zero-infrastructure way to point an AI agent at structured data.
Why is SQLite the easiest MCP starting point?
Because the entire "database" is one file on disk: no server process, no credentials, no network. Export a CSV into SQLite (or use the .db files apps already produce — browser history, app caches, exports), point the MCP server at the path, and Claude can explore and query it in seconds. That makes it ideal for local data analysis, prototyping agent workflows, and learning how MCP works before wiring up production databases.
Install & configure
For Claude Code:
claude mcp add sqlite -- uvx mcp-server-sqlite --db-path /path/to/data.db
For Claude Desktop, add to claude_desktop_config.json (the same block works in Cursor's .cursor/mcp.json):
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/path/to/data.db"]
}
}
}
uvx comes with the uv Python toolchain; if you don't have it, pip install mcp-server-sqlite and use python -m mcp_server_sqlite as the command instead.
What can an agent actually do with it?
The server exposes tools for listing tables, describing schemas, and executing read and write queries, so a prompt like "load sales.db and tell me which region's average order value grew fastest" becomes: inspect schema, write the SQL, run it, summarize. It's genuinely useful for one-off analyses where opening a notebook feels heavy — the agent does the query-writing loop for you against a file already on disk.
What are the limitations?
Know these before relying on it:
- Archived upstream: the reference implementation no longer receives feature work in the official repo. It's stable for local use, but for anything long-lived evaluate an actively maintained community fork.
- Write access is real: the reference server can execute INSERT/UPDATE/DELETE and DDL. Point it at a copy of any file you care about, or use a fork with a read-only flag.
- Single-file, local-only: no concurrency story for shared team use, and SQLite's type flexibility means schema introspection can be looser than in Postgres or MySQL.
- Large results: agents work best with aggregated answers; a
SELECT *on a million-row table blows out the context window. Nudge prompts toward summaries.
Author & links
Author: Model Context Protocol project (reference, now archived); community forks by various maintainers
Repo: github.com/modelcontextprotocol/servers-archived
License: MIT
Related skills
When you outgrow a single file, the Postgres MCP server and MySQL MCP server follow the same pattern against real servers. For analytics directly on CSV and Parquet files — a close cousin of this local-first workflow — see the DuckDB MCP server.
← Back to MCP Servers