mcp-server-sqlite
MCP server for SQLite — query databases, inspect schemas, explain queries, and export data from your IDE.
README
mcp-server-sqlite
Query SQLite databases, inspect schemas, and explain queries from your AI assistant. Read-only by default for safety.
npx mcp-sqlite-server
Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP client. Reads local
.dbfiles, no auth needed.

<sub>Demo built with <a href="https://github.com/ofershap/remotion-readme-kit">remotion-readme-kit</a></sub>
Why
SQLite is everywhere. It's the default database for mobile apps, Electron apps, local-first tools, and increasingly for server-side projects too (Turso, Cloudflare D1, Bun's built-in SQLite). The official MCP reference includes a basic SQLite server, but it's Python-only. If you're working in a TypeScript/Node.js environment and want to ask your assistant "what tables are in this database?" or "run this query and show me the results," this server handles that. It opens the database read-only by default so you can explore safely, and you can opt into write mode when you need it.
Tools
| Tool | What it does |
|---|---|
query |
Execute SQL (SELECT, PRAGMA, EXPLAIN, WITH). Returns results as a table. |
schema |
Get full schema: all tables with columns, types, and row counts. |
table_info |
Detailed info for a single table: columns, constraints, row count. |
explain |
Run EXPLAIN QUERY PLAN to optimize queries. |
list_databases |
List .db, .sqlite, .sqlite3 files in a directory. |
Quick Start
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"sqlite": {
"command": "npx",
"args": ["mcp-sqlite-server"]
}
}
}
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"sqlite": {
"command": "npx",
"args": ["mcp-sqlite-server"]
}
}
}
VS Code
Configure the MCP server in your VS Code settings to run npx mcp-sqlite-server.
Example prompts
- "Show me the schema of my database at ./data.db"
- "Query the users table: SELECT * FROM users LIMIT 10"
- "Explain the query plan for this complex join"
- "What tables are in this database?"
- "Find all .db files in the current directory"
Safety
Read-only by default. The query tool accepts only SELECT, PRAGMA, EXPLAIN, and WITH in readonly mode. Set readonly=false in the tool args to enable INSERT, UPDATE, DELETE, etc.
Development
npm install
npm run typecheck
npm run build
npm test
npm run format
npm run lint
See also
More MCP servers and developer tools on my portfolio.
Author
<sub>README built with README Builder</sub>
License
MIT © 2026 Ofer Shapira
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.