Ermöglicht KI-Clients sicheren und strukturierten Zugriff auf SQLite-Datenbanken mittels Tools zur SQL-Ausführung und Schema-Suche.
Auch bekannt als arifulislamat/database-mcp, @database-mcp/sqlite
- Stars
- 5
- Tools
- —
- Downloads, 30 Tage
- 905
- Neueste Version
- 0.5.0
- Letzter Commit
- 1. Nov. 2026
- Lizenz
- MIT
Was ist database-mcp-sqlite MCP?
Ermöglicht KI-Clients sicheren und strukturierten Zugriff auf SQLite-Datenbanken mittels Tools zur SQL-Ausführung und Schema-Suche.
Zusammenfassung generiert aus dem README des Projekts
Über database-mcp-sqlite MCP server
Die Hauptfunktion dieses Servers besteht darin, KI-Clients einen strukturierten und sicheren Zugriff auf SQLite-Datenbanken zu ermöglichen. Er bietet eine minimale Schnittstelle, die aus zwei spezifischen Tools besteht: execute_sql zum Ausführen von Queries und search_objects zum Erkunden des Datenbank-Schemas. Dieses Setup stellt sicher, dass das Context Window des Modells sauber bleibt, indem es auf Progressive Disclosure setzt: Ein Aufruf von search_objects ohne Argumente listet die Tabellen auf, während die Angabe eines Tabellennamens Spalten, Indizes und Foreign Keys offenlegt.
Entwickler können dies mit TypeScript via npm, Python über PyPI oder als natives Rust-Binary implementieren. Sicherheit steht im Fokus, unter anderem durch einen Read-only-Modus, der sowohl durch SQL-Guards als auch durch Datenbank-Session-Einstellungen erzwungen wird. Um unkontrollierte Prozesse oder übermäßigen Datenverbrauch zu verhindern, enthält der Server standardmäßige Row Caps von 1000 und Statement-Timeouts von 30 Sekunden. Verbindungsdetails wie die DSN werden beim Start über Flags, Umgebungsvariablen oder YAML-Dateien konfiguriert und nicht über Chat-Prompts, sodass Zugangsdaten geschützt bleiben und niemals über Tool-Aufrufe akzeptiert werden.
Was du damit machen kannst
- 1Datenbank-Schema erkundenEine KI kann die Struktur einer Datenbank entdecken, indem sie Tabellen auflistet und anschließend spezifische Spalten oder Foreign Keys inspiziert.
- 2SQL-Queries ausführenEin Entwickler kann eine KI anweisen, spezifische SQL-Befehle gegen eine lokale SQLite-Datei auszuführen.
- 3Ressourcenerschöpfung verhindernDer Server begrenzt automatisch die Menge der zurückgegebenen Daten sowie die Laufzeit einer Query, um das System zu schützen.
Geschrieben aus dem README des Projekts. Jeder Use Case wurde gegen ein Zitat daraus geprüft.
So installierst du database-mcp-sqlite MCP
Formate geprüft am 10. Nov. 2026Zu Cursor hinzufügenZu Goose hinzufügendatabase-mcp-sqlite MCP in Claude Code installieren
$ claude mcp add --env 'SQLITE_PATH=<SQLITE_PATH>' database-mcp-sqlite -- npx -y @database-mcp/sqlitedatabase-mcp-sqlite MCP in Cursor installieren
~/.cursor/mcp.json
{
"mcpServers": {
"database-mcp-sqlite": {
"command": "npx",
"args": [
"-y",
"@database-mcp/sqlite"
],
"env": {
"SQLITE_PATH": "<SQLITE_PATH>"
}
}
}
}database-mcp-sqlite MCP in VS Code installieren
.vscode/mcp.json
{
"servers": {
"database-mcp-sqlite": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@database-mcp/sqlite"
],
"env": {
"SQLITE_PATH": "<SQLITE_PATH>"
}
}
}
}database-mcp-sqlite MCP in VS Code CLI installieren
$ code --add-mcp '{"name":"database-mcp-sqlite","type":"stdio","command":"npx","args":["-y","@database-mcp/sqlite"],"env":{"SQLITE_PATH":"<SQLITE_PATH>"}}'database-mcp-sqlite MCP in Claude Desktop installieren
claude_desktop_config.json
{
"mcpServers": {
"database-mcp-sqlite": {
"command": "npx",
"args": [
"-y",
"@database-mcp/sqlite"
],
"env": {
"SQLITE_PATH": "<SQLITE_PATH>"
}
}
}
}database-mcp-sqlite MCP in Codex installieren
$ codex mcp add database-mcp-sqlite --env 'SQLITE_PATH=<SQLITE_PATH>' --env 'SQLITE_PATH=<SQLITE_PATH>' --env 'SQLITE_PATH=<SQLITE_PATH>' -- npx -y @database-mcp/sqlitedatabase-mcp-sqlite MCP in Codex config.toml installieren
~/.codex/config.toml
[mcp_servers.database-mcp-sqlite] command = "npx" args = ["-y", "@database-mcp/sqlite"] [mcp_servers.database-mcp-sqlite.env] SQLITE_PATH = "<SQLITE_PATH>"
database-mcp-sqlite MCP in Gemini CLI installieren
$ gemini mcp add -s user -e 'SQLITE_PATH=<SQLITE_PATH>' -e 'SQLITE_PATH=<SQLITE_PATH>' -e 'SQLITE_PATH=<SQLITE_PATH>' database-mcp-sqlite npx -- -y @database-mcp/sqlitedatabase-mcp-sqlite MCP in Gemini settings.json installieren
~/.gemini/settings.json
{
"mcpServers": {
"database-mcp-sqlite": {
"command": "npx",
"args": [
"-y",
"@database-mcp/sqlite"
],
"env": {
"SQLITE_PATH": "<SQLITE_PATH>"
}
}
}
}Konfiguration
SQLITE_PATHErforderlichPath to the SQLite database file
SQLITE_PATHErforderlichPath to the SQLite database file
SQLITE_PATHErforderlichPath to the SQLite database file
| Name | Beschreibung | Typ |
|---|---|---|
| SQLITE_PATH | Path to the SQLite database file | Erforderlich |
| SQLITE_PATH | Path to the SQLite database file | Erforderlich |
| SQLITE_PATH | Path to the SQLite database file | Erforderlich |
Automatisierte Checks
Geluften am 12. Nov. 2026Vollständiger Bericht →Unsere automatisierten Checks bestanden. Das ist kein Security-Audit: Lies den Code und gib dem Server nur den minimal notwendigen Zugriff. Wie die Checks funktionieren
- Source Repository verknüpft und erreichbarBestanden
- Open Source Lizenz (OSI)Bestanden
- Commit oder Release im letzten JahrBestanden
- Package-Name ähnelt keinem populären PackageBestanden
- Remote Endpoint nutzt HTTPSNicht geprüft
- Destruktive Tools sind markiertNicht geprüft
- Keine versteckten Anweisungen an das ModellBestanden
- Keine kritischen Advisories im Paket oder seinen AbhängigkeitenBestanden
README
Auf GitHub ansehendatabase-mcp
MCP servers that give AI clients safe, structured access to SQL databases.
One installable package per database engine, in TypeScript (npm), Python
(PyPI), and Rust (crates.io). Every package exposes the same minimal
two-tool surface, execute_sql and search_objects, with guardrails on by
default: read-only mode, row caps, and statement timeouts.
Packages
| Engine | TypeScript (npm) | Python (PyPI) | Rust (crates.io) |
|---|---|---|---|
| SQLite | @database-mcp/sqlite |
database-mcp-sqlite |
database-mcp-rs-sqlite |
| libSQL | @database-mcp/libsql |
database-mcp-libsql |
database-mcp-rs-libsql |
| MySQL | @database-mcp/mysql |
database-mcp-mysql |
database-mcp-rs-mysql |
| MariaDB | @database-mcp/mariadb |
database-mcp-mariadb |
database-mcp-rs-mariadb |
| Postgres | @database-mcp/postgres |
database-mcp-postgres |
database-mcp-rs-postgres |
All three lines are published and pass the same language-agnostic conformance suite against real databases in CI, so behavior is identical regardless of language. Every engine is also listed on the MCP Registry with all three install options: npm, PyPI, and cargo.
Rust crates are named database-mcp-rs-<engine> because the plain names are
taken on crates.io; the command each one installs is still
database-mcp-<engine>. Go is planned.
Design principles
- Two tools, no more. A tiny tool surface keeps the model's context window
clean.
search_objectsprogressively discloses schema: call it with no arguments to list tables, with a table name to get columns, indexes, and foreign keys. - Safe by default. Read-only mode is enforced in two layers: a conservative SQL guard, plus a session-level read-only setting in the database itself. Rows are capped (default 1000) and statements time out (default 30s).
- Configured at launch, never via chat. Connection details come from flags, a YAML config file, or environment variables. Credentials are never accepted through a tool call.
- Secrets never appear in logs. Passwords live in non-printable secret types, DSNs are sanitized before logging, and a redaction filter guards the log boundary.
Quick start
Pick your engine's package; each README has the full config surface. SQLite via npm:
{
"mcpServers": {
"sqlite": {
"command": "npx",
"args": ["-y", "@database-mcp/sqlite", "--dsn", "/absolute/path/to/database.db"]
}
}
}
Or via PyPI: use "command": "uvx" and
"args": ["database-mcp-sqlite", "--dsn", "/absolute/path/to/database.db"].
Or as a native binary, with no Node or Python runtime: run
cargo install database-mcp-rs-sqlite, then use
"command": "database-mcp-sqlite" with the same args minus the package
name.
Flags, environment variables, and YAML config are identical across all three lines.
Networked engines take credentials from the environment (MYSQL_*,
MARIADB_*, POSTGRES_*/DATABASE_URL, LIBSQL_URL/LIBSQL_AUTH_TOKEN),
*_FILE mounted secrets, or a YAML file via --config. Never from a chat
prompt.
Contributing
See CONTRIBUTING.md. The short version: the conformance
suite is the definition of done. A change is mergeable only when
conformance/run.mjs passes against every affected server.
License
database-mcp-sqlite MCP Fragen
Wie füge ich database-mcp-sqlite MCP zu Claude Code hinzu?
Führe claude mcp add --env 'SQLITE_PATH=<SQLITE_PATH>' database-mcp-sqlite -- npx -y @database-mcp/sqlite in deinem Terminal aus. Füge --scope user hinzu, damit der Server in jedem Projekt verfügbar ist.
Wie füge ich database-mcp-sqlite MCP zu Cursor hinzu?
Öffne ~/.cursor/mcp.json und füge den Server unter mcpServers hinzu, mit der Cursor-Config aus dem Installationsabschnitt oben.
Wie sicher ist der Datenbankzugriff?
Der Server ist standardmäßig sicher konfiguriert. Er erzwingt einen Read-only-Modus durch SQL-Guards und Datenbank-Einstellungen, begrenzt die Anzahl der Zeilen auf 1000 und setzt ein Statement-Timeout von 30s.
Kann ich Datenbank-Zugangsdaten über einen Chat-Prompt angeben?
Nein, Zugangsdaten müssen beim Start über Flags, Umgebungsvariablen oder eine YAML Config konfiguriert werden; sie werden niemals über Tool-Aufrufe akzeptiert.
Welche Tools sind in diesem Server verfügbar?
Der Server stellt zwei minimale Tools bereit: execute_sql zum Ausführen von Queries und search_objects zum Durchsuchen des Datenbank-Schemas.