SQLite MCP Server — Local Database Access for AI Agents
Install the SQLite MCP server to let Claude Code, Cursor, and Windsurf query and manage local SQLite databases. Read schemas, run SQL, analyze data, and build database-driven features — all without a server setup.
Install SQLite MCP Server
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": [
"mcp-server-sqlite",
"--db-path",
"/path/to/your/database.db"
]
}
}
}Sqlite MCP — Local Database for AI Agents
Official MCP server for SQLite databases. Let Claude Code query, analyze, and modify local SQLite databases through natural language. Zero-config, instant setup.
Engram — Persistent Memory System for AI Agents
Agent-agnostic persistent memory system with SQLite full-text search. Ships as MCP server, HTTP API, CLI, and TUI. Gives any AI coding agent long-term memory across sessions. 2,300+ stars.
DBHub — Universal Database MCP Server, Zero Dependencies
Token-efficient database MCP server supporting Postgres, MySQL, MariaDB, SQL Server, and SQLite. Just two MCP tools, zero dependencies, read-only safe.
Zero-config database for AI agents
The SQLite MCP server is the simplest way to give your AI agent database capabilities. No connection strings, no credentials, no server process — just point it at a .db file and the agent can create tables, run queries, and analyze data instantly. This makes SQLite the default choice for AI workflows that need structured data without infrastructure overhead.
The most powerful use case is agent memory and state. AI agents that need to persist information across sessions — conversation history, analysis results, cached computations — can use SQLite as a lightweight store. The agent creates its own schema, writes data, and queries it later. Unlike file-based state, SQL gives the agent structured queries with filtering, joining, and aggregation.
For data analysis workflows, SQLite handles surprisingly large datasets. Point the MCP server at a CSV import (SQLite's .import command) and the agent can run analytical queries, build summaries, and identify patterns without loading everything into memory. For production databases, you'll want the PostgreSQL MCP server or Supabase MCP server instead. For file access alongside your database, add the Filesystem MCP server. Browse all database AI tools on TokRepo for the complete ecosystem.
SQLite is the database that just works — no config, no server, no excuses. Now your AI agent can use it too.
Frequently Asked Questions
What is the SQLite MCP server?+
The SQLite MCP server (mcp-server-sqlite) is a Python-based MCP implementation that exposes SQLite database operations as tools for AI agents. It supports listing tables, reading schemas, running SQL queries (SELECT, INSERT, UPDATE, DELETE), creating tables, and describing database structure. It's the official reference implementation for database MCP servers.
Do I need to install SQLite separately?+
No. SQLite is bundled with Python (and most operating systems). The MCP server uses Python's built-in sqlite3 module, so there's nothing extra to install. You just need Python and uv (the modern Python package runner). If you don't have uv, install it with: curl -LsSf https://astral.sh/uv/install.sh | sh
Can the AI agent create new databases from scratch?+
Yes. If the --db-path points to a file that doesn't exist, SQLite creates it automatically. The agent can then create tables, define schemas, and populate data — useful for prototyping, data analysis, and building agent memory systems. Point it at a temp directory if you want disposable databases.
How does SQLite MCP compare to PostgreSQL MCP?+
SQLite MCP is zero-config and file-based — perfect for local development, prototyping, data analysis, and agent memory. PostgreSQL MCP connects to a running database server — needed for production applications, concurrent users, and advanced features like JSONB, full-text search, and extensions. Start with SQLite for exploration, move to Postgres when you need production-grade infrastructure.
Is it safe for the AI to write to my database?+
The SQLite MCP server has full read-write access to the database file. Safety tips: (1) Keep a backup of important databases before pointing the AI at them. (2) Use a copy of production data, not the original. (3) For analysis-only workflows, make the file read-only at the OS level (chmod 444). (4) SQLite supports WAL mode for concurrent read access while the agent writes.