MCP ConfigsApr 8, 2026·2 min read

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.

MC
MCP Hub · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

Add to your .mcp.json:

{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "./data/app.db"]
    }
  }
}

Restart Claude Code. Ask "show me all tables" or "find users who signed up this week".

What is SQLite MCP?

SQLite MCP is an official Model Context Protocol server that connects AI agents to SQLite databases. It lets Claude Code, Cline, and other MCP clients query, analyze, and modify local SQLite databases through natural language — with zero configuration beyond pointing to your .db file.

Answer-Ready: SQLite MCP is an official MCP server that connects AI agents like Claude Code to local SQLite databases. Query, analyze, and modify data through natural language with zero-config setup. Part of the official MCP server collection.

Best for: Developers who want Claude Code to interact with local SQLite databases. Works with: Claude Code, Cline, any MCP-compatible client. Setup time: Under 1 minute.

Core Features

1. Natural Language Queries

You: "Show me all users who signed up in the last 7 days"
Claude Code: Runs SELECT * FROM users WHERE created_at > datetime('now', '-7 days')
  → Returns formatted table of 23 users

You: "What's the average order value by country?"
Claude Code: Runs SELECT country, AVG(total) FROM orders GROUP BY country ORDER BY AVG(total) DESCReturns ranked list with averages

2. Available Tools

Tool Description
read_query Execute SELECT queries
write_query Execute INSERT/UPDATE/DELETE
create_table Create new tables
list_tables Show all tables
describe_table Show table schema
append_insight Save analysis notes

3. Schema Exploration

You: "What tables exist and what's in them?"
Claude Code:list_tables: users, orders, products, reviews
  → describe_table for each
  → Summary: "4 tables with 15,000 total rows..."

4. Data Analysis

You: "Analyze the orders table and find trends"
Claude Code:
  → Queries order counts by month
  → Calculates growth rates
  → Identifies top products
  → Returns markdown report with insights

5. Safe Write Operations

You: "Add a 'last_login' column to the users table"
Claude Code: Asks for confirmation before executing
  → ALTER TABLE users ADD COLUMN last_login DATETIME
  → Confirms: "Column added successfully"

6. Multiple Database Support

{
  "mcpServers": {
    "app-db": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "./data/app.db"]
    },
    "analytics-db": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "./data/analytics.db"]
    }
  }
}

Use Cases

Use Case Example
Data exploration "What's in this database?"
Bug investigation "Find orders with negative totals"
Report generation "Monthly revenue by category"
Data migration "Create a new normalized schema"
Prototyping "Set up tables for a todo app"

FAQ

Q: Is it safe to use on production databases? A: SQLite MCP supports read-only mode. For production, use --read-only flag to prevent accidental writes.

Q: Does it work with other databases? A: This server is SQLite-specific. For PostgreSQL, use @modelcontextprotocol/server-postgres.

Q: Can it handle large databases? A: Yes, queries are executed directly by SQLite. For very large result sets, the AI will add LIMIT clauses automatically.

🙏

Source & Thanks

Created by Anthropic. Licensed under MIT.

modelcontextprotocol/servers — Official MCP servers collection

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets