Cette page est affichée en anglais. Une traduction française est en cours.
MCP ConfigsApr 8, 2026·2 min de lecture

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.

MCP Hub
MCP Hub · Community
Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 17/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
Mcp Config
Installation
Stage only
Confiance
Confiance : Established
Point d'entrée
Sqlite MCP — Local Database for AI Agents
Commande de staging sûr
npx -y tokrepo@latest install f67139b3-1666-4c8a-93d9-29c9c29e6ab2 --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

TL;DR
SQLite MCP gives AI agents direct access to query and modify local SQLite databases through the Model Context Protocol.
§01

What it is

SQLite MCP is the official Model Context Protocol server for SQLite databases. It gives AI agents like Claude Code the ability to query, analyze, and modify SQLite databases through natural language. The server exposes database operations as MCP tools, so the agent can run SQL queries, inspect schemas, and write data without you writing any code.

This server is for developers who use SQLite as a local database and want their AI coding assistant to interact with it directly. It is particularly useful for data exploration, quick analysis, and prototyping database-backed features.

§02

How it saves time or tokens

Without the MCP server, you would need to write SQL queries manually, copy results into your conversation, and iterate. With SQLite MCP, the agent reads the schema, writes queries, executes them, and interprets results in one step. This workflow provides the MCP configuration JSON that you paste into your project config file.

§03

How to use

  1. Add the SQLite MCP server to your .mcp.json:
{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "./data/app.db"]
    }
  }
}
  1. Restart Claude Code or your MCP-compatible client.
  1. Ask the agent to interact with your database:
'Show me the schema of the users table'
'Find the top 10 orders by total amount'
'Create a new table for tracking events'
§04

Example

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

Once configured, the agent can run queries like:

SELECT date, COUNT(*) as visits, AVG(duration) as avg_duration
FROM page_views
WHERE date >= date('now', '-7 days')
GROUP BY date
ORDER BY date;
§05

Related on TokRepo

§06

Common pitfalls

  • The database file path must be accessible from the directory where the MCP server runs. Relative paths are resolved from the project root.
  • SQLite MCP gives the agent write access by default. For read-only exploration, add --read-only to the args array to prevent accidental modifications.
  • Large databases with millions of rows can cause slow query responses. The agent should use LIMIT clauses for initial exploration.

Questions fréquentes

What is the SQLite MCP server?+

It is an official Model Context Protocol server that exposes SQLite database operations as tools. AI agents can query schemas, run SQL, and modify data through the MCP interface without you writing code.

Do I need to install SQLite separately?+

No. The MCP server includes SQLite bindings. You only need uvx (the Python package runner) installed. The server handles database connections internally.

Can the agent modify my database?+

Yes, by default the server has read-write access. To prevent modifications, add the --read-only flag to the args array in your MCP configuration. This restricts the agent to SELECT queries only.

Does this work with any AI agent or just Claude?+

It works with any MCP-compatible client. Claude Code, Cursor, and other tools that implement the Model Context Protocol can use this server. The MCP standard ensures interoperability.

Can I connect to multiple SQLite databases?+

Yes. Add multiple entries in your mcpServers configuration with different names and database paths. Each entry creates an independent server instance connected to its own database file.

Sources citées (3)
🙏

Source et remerciements

Created by Anthropic. Licensed under MIT.

modelcontextprotocol/servers — Official MCP servers collection

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires