Skip to main content
Community resource — not affiliated with Anthropic. Learn more


SQLite MCP

Databases · Official

Query and manage SQLite databases. Claude can run SQL queries, inspect schemas, create and modify tables, insert data, and analyze your local database files.

4.8 rating 11,500+ connects Free · Open source Protocol v1.0
SQL Local DB Queries Official Schema

Connect command

claude mcp add sqlite -- npx -y @modelcontextprotocol/server-sqlite --db-path ./database.db
View on GitHub →

Free · Open source · MIT license

11.5kConnects
4.8Rating

What it does

SQLite MCP gives Claude read and write access to a SQLite database file on your local machine. It is part of the official Anthropic MCP reference server collection and requires no network connection or external service — just a .db file path at connection time.

Claude can explore unfamiliar databases by listing tables and describing schemas, then write targeted queries to answer questions about the data. It can also create new tables, insert records, and run complex analytical queries that would take significant manual effort in a GUI client.

  • Run arbitrary SELECT queries with results formatted for readability
  • Execute INSERT, UPDATE, and DELETE statements
  • Create new tables with full column and constraint definitions
  • List all tables in the database
  • Inspect column names, types, and constraints for any table
  • Run multi-statement queries for complex analysis

How to connect

Replace ./database.db with the path to your SQLite file. The file will be created if it does not exist.

terminal
claude mcp add sqlite -- npx -y @modelcontextprotocol/server-sqlite \
  --db-path ./database.db

Available tools

  • read_query — run a SELECT query and return results
  • write_query — run INSERT, UPDATE, or DELETE
  • create_table — create a new table with a schema definition
  • list_tables — list all tables in the database
  • describe_table — return column names, types, and constraints
  • run_query — execute any SQL statement

Example usage

Ask Claude to analyze your app's database and surface insights or data quality issues:

example prompt
# User prompt
Look at my database, find the users table,
and tell me how many users signed up per month
in 2025. Show it as a table.
tool call sequence
list_tables()
→ ["users", "orders", "products", "sessions"]
describe_table("users")
→ id, email, created_at, plan_id
read_query("SELECT strftime('%Y-%m', created_at) as month,
  COUNT(*) as signups FROM users
  WHERE created_at >= '2025-01-01'
  GROUP BY month ORDER BY month")
→ returns 12-row result set

Read-only mode: To prevent accidental writes, you can open the database in read-only mode by passing --read-only to the server. This disables write_query, create_table, and run_query for mutating operations.