mcp-server-sqlite
Executes arbitrary SQL queries (SELECT, INSERT, UPDATE, DELETE, DDL) on a SQLite database, returning results as JSON, enabling AI agents to interact with local SQLite databases.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-sqliteShow me all rows from the customers table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-sqlite
Serveur MCP (Model Context Protocol) en Python exposant une base SQLite à un
assistant IA via un unique outil : execute_sql. Usage local et personnel.
L'IA peut exécuter n'importe quelle requête SQL (SELECT, INSERT, UPDATE,
DELETE, DDL…) et récupérer les résultats au format JSON.
⚠️ Aucun garde-fou de sécurité : le SQL est totalement libre, il n'y a ni mode lecture seule, ni authentification, ni limite. Destiné à un usage local par un utilisateur unique.
Prérequis
Python 3.12+
Related MCP server: SQLite MCP Server
Installation
uv syncLancement
Le chemin de la base SQLite est fourni via --db-path ou la variable
d'environnement SQLITE_DB_PATH. Le fichier est créé automatiquement s'il
n'existe pas.
Mode stdio (usage local standard)
uv run mcp-server-sqlite --db-path ./ma_base.dbMode HTTP (JSON, sans SSE)
uv run mcp-server-sqlite --transport http --db-path ./ma_base.db --host 127.0.0.1 --port 8000Le transport HTTP répond en application/json (pas de flux SSE), adapté aux
clients incapables de streamer. Par défaut : 127.0.0.1:8000.
Accès navigateur : le serveur fonctionne sans aucune configuration d'origine.
La protection anti DNS-rebinding du SDK MCP est désactivée (sinon les origines
non-localhost sont rejetées avec « Invalid Origin header ») et le CORS autorise
par défaut toutes les origines (*). Si vous souhaitez malgré tout restreindre
le CORS, utilisez --cors-origin (répétable) :
uv run mcp-server-sqlite --transport http --cors-origin http://localhost:3000 --cors-origin https://mon-app.exampleL'en-tête Mcp-Session-Id est exposé pour permettre aux clients navigateurs de
lire l'identifiant de session MCP.
L'outil execute_sql
Entrée :
sql— une chaîne contenant du SQL arbitraire. Plusieurs instructions peuvent être séparées par;(exécution de typeexecutescript).Sortie (chaîne JSON) :
Requête renvoyant des lignes (
SELECT) :{"rows": [{"colonne": valeur, ...}, ...]}Requête de modification / DDL :
{"rowcount": <nombre de lignes affectées>}Erreur SQL :
{"error": "<message>"}
Les types non natifs JSON sont convertis en chaîne :
BLOBdécodé en UTF-8 (repli en hexadécimal), dates au format ISO.Commit automatique après chaque appel réussi.
Configuration côté client MCP
Deux cas de figure : le client lance lui-même le serveur (mode stdio), ou le client se connecte à un serveur HTTP déjà démarré.
Mode stdio (le client lance le serveur)
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"sqlite": {
"command": "uv",
"args": [
"run",
"--directory",
"d:/___AGENTS/mcp-server-sqlite-uv",
"mcp-server-sqlite",
"--db-path",
"d:/___AGENTS/mcp-server-sqlite-uv/ma_base.db"
]
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"sqlite": {
"command": "uv",
"args": [
"run",
"--directory",
"d:/___AGENTS/mcp-server-sqlite-uv",
"mcp-server-sqlite",
"--db-path",
"d:/___AGENTS/mcp-server-sqlite-uv/ma_base.db"
]
}
}
}Mode HTTP (le serveur est démarré à part)
Démarrez d'abord le serveur en mode HTTP :
uv run mcp-server-sqlite --transport http --db-path ./ma_base.db --host 127.0.0.1 --port 8000Le point de terminaison MCP est alors disponible sur http://127.0.0.1:8000/mcp.
Configurez ensuite le client pour s'y connecter par URL.
VS Code (.vscode/mcp.json)
{
"servers": {
"sqlite": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}Claude Desktop (claude_desktop_config.json)
Claude Desktop ne se connecte qu'en stdio ; on passe par le proxy
mcp-remote pour atteindre un
serveur HTTP :
{
"mcpServers": {
"sqlite": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8000/mcp"]
}
}
}ℹ️ Si le client tourne dans un navigateur, autorisez son origine avec
--cors-originau lancement du serveur (voir la section Lancement).
Tests
uv run pytestDéveloppement avec mise
Le projet fournit un mise.toml qui gère les outils (Python 3.12, uv)
et expose des tâches. uv est configuré pour utiliser le Python fourni par mise.
mise install # installe Python + uv
mise run install # uv sync
mise run test # tests pytest
mise run serve # serveur en mode stdio
mise run serve-http # serveur en mode HTTP (JSON)Licence
MIT — voir LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Alicense-qualityDmaintenanceEnables LLM agents to perform complete database operations on SQLite databases, including creating tables, executing queries, and managing data through CRUD operations with schema inspection capabilities.473MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.2MIT
- Flicense-qualityDmaintenanceEnables SQLite database interactions including querying, updating, and schema management through structured tools.3
- Flicense-qualityCmaintenanceEnables AI agents to connect to and query an SQLite database through the Model Context Protocol, allowing natural language interaction with database tables and data.
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Runtime permission, approval, and audit layer for AI agent tool execution.
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jlg-formation/mcp-server-sqlite-uv'
If you have feedback or need assistance with the MCP directory API, please join our Discord server