TOKREPO · Arsenal IA
Nouveau · cette semaine

Pack de Connecteurs MCP pour Bases de Données

Dix serveurs MCP qui offrent à votre agent IA un accès SQL et NoSQL sûr à Postgres, MySQL, MongoDB, Redis et SQLite — chacun avec mode read-only, introspection de schéma et journal d'audit, pour que l'agent arrête de deviner les colonnes et de vider votre table de prod.

10 ressources

What's in this pack

This is the broader database MCP pack. Where Postgres for AI Agents goes deep on one engine, this one cuts across all five databases an average backend touches — Postgres, MySQL, MongoDB, Redis, SQLite — plus two universal routers and a credential-free dry-run server for the truly paranoid.

# Server Engine Safety surface
1 Postgres MCP Pro Postgres Index advice, EXPLAIN, safe SQL gate
2 pgEdge Postgres MCP Postgres Read-only default + web UI to audit calls
3 DryRun Offline Postgres MCP Postgres (schema only) No DB creds, no live connection — parses SQL against a schema file
4 mcp-server-mysql MySQL Read-only mode tuned for Claude Code
5 MySQL MCP Server MySQL Capability scoping, query allow-list
6 MongoDB MCP Server MongoDB --read-only flag, npx install
7 Redis MCP Server (official) Redis Per-command ACL, official Redis Inc. build
8 SQLite MCP SQLite Local-only, file-path scoping
9 Universal DB MCP 17 engines Read-only default across every adapter
10 GenAI Toolbox (Google) Postgres / MySQL / Spanner / AlloyDB OAuth, IAM-aware, production-grade

Five engines, three safety levels (read-only, capability-scoped, offline), one install command.

Why a multi-database MCP pack matters

Most teams don't run a single database. The agent that ships features against the user-facing Postgres also needs to read the analytics MySQL, the session Redis, the catalog MongoDB, and the local SQLite the developer is testing against. Wiring each engine into the agent host with its own ad-hoc MCP server is how you end up with five servers, three credential formats, and zero consistent audit trail.

This pack picks the connectors that get the same things right across engines:

  • Read-only mode is the default. Every server here exposes a --read-only or equivalent capability flag. Write access is opt-in, not opt-out.
  • Schema introspection is a first-class tool. The agent calls list_tables, describe_table, list_indexes instead of guessing.
  • Connection pooling is built in. No reconnect storms when the agent fires twenty queries during a single reasoning step.
  • Audit logging is on by default. Every query the agent runs lands in a structured log you can grep after an incident.

The outlier is DryRun (#3): it doesn't touch your database at all. You hand it a schema dump and it lets the agent draft SQL, get type-checked, and explain the plan — all without credentials. Useful when the agent is helping a junior engineer write a migration before anyone's allowed near prod.

Install — pick DB, set read-only, introspect, query, audit

The five-step rhythm that every server in this pack supports:

# 1. Pick the DB you want the agent to see
tokrepo install pack/mcp-database-connectors
# or one at a time:
tokrepo install postgres-mcp-pro
tokrepo install mongodb-mcp-server

# 2. Wire it into your host with read-only ON
# Example for Claude Code (~/.claude/mcp.json):
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@pgEdge/pg-mcp", "--read-only"],
      "env": { "DATABASE_URL": "$READONLY_DSN" }
    }
  }
}

# 3. Ask the agent to introspect FIRST, query SECOND
#   Prompt: "list the tables, describe the orders table,
#            then write a query for last week's revenue."

# 4. Query — agent runs the SELECT, you read the result

# 5. Audit — grep the server log
tail -f ~/.tokrepo/logs/postgres-mcp-pro.log

For MySQL swap in mcp-server-mysql, for Mongo swap in mongodb-mcp-server, for Redis swap in the official redis-mcp-server. The five steps are identical — the pack's value is that you only learn them once.

Read-only mode: why every flag matters

A naive write-enabled MCP is the fastest way to turn an LLM hallucination into a production outage. The classic failure mode: agent reasons about an UPDATE, gets the WHERE clause wrong, and rewrites half the table.

Every server in this pack flips this default. The agent has to explicitly request write capability, and your host config has to explicitly grant it. That's a two-step opt-in, which is exactly what you want for anything that can DROP TABLE.

When you do need writes — running a seeded migration, populating a test fixture — use a dedicated role (mcp_writer) with grants limited to the specific schemas, never the superuser. Combine with a branch (Neon), a clone (pgEdge), or a Docker fixture (everything else) and the blast radius collapses to one throwaway database.

Common pitfalls

  • Schema dump cost. list_tables on a 500-table production schema can blow the agent's context window. Filter to a single schema or pass an allow-list.
  • The universal DB MCP isn't free of engine quirks. It handles 17 databases, but the JSON-column semantics differ between Postgres and MySQL — the agent will sometimes write Postgres-flavored SQL against MySQL. Add a hint to the system prompt.
  • Redis ACLs are per-command, not per-key. The official server respects ACLs, but a KEYS * is still O(N) — set --max-scan-keys or the agent will block the event loop.
  • MongoDB's --read-only blocks writes but not eval. Older Mongo MCPs let the agent run server-side JavaScript. Stick to the post-2026 builds in this pack which strip $where and $function.
  • DryRun's schema must stay fresh. It's offline by design, so it can't notice a column you added yesterday. Re-export the schema as part of CI.

How this pack relates to the others

If you only care about Postgres in depth (Neon, Supabase, branching), use Postgres for AI Agents. If you want the broader MCP surface (browser, GitHub, filesystem), use MCP Server Stack. Production setups usually run one item from each: a database connector here, the universal MCP toolbox there, and a vector DB for semantic recall.

INSTALLER · UNE COMMANDE
$ tokrepo install pack/mcp-database-connectors
passez-la à votre agent — ou collez-la dans votre terminal
Ce qu'il contient

10 ressources prêtes à installer

MCP#01
Postgres MCP Pro — Index Tuning + Safe SQL Tools

Postgres MCP Pro is an MCP server for PostgreSQL that runs safe SQL, explains plans, and recommends indexes so agents can tune databases faster.

by MCP Hub·70 views
$ tokrepo install postgres-mcp-pro-index-tuning-safe-sql-tools
MCP#02
pgEdge Postgres MCP — Read-Only by Default + Web UI

pgEdge Postgres MCP is a Go MCP server for Postgres with read-only defaults, optional HTTP auth, and a web UI for database exploration and diagnostics.

by MCP Hub·79 views
$ tokrepo install pgedge-postgres-mcp-read-only-by-default-web-ui
MCP#03
DryRun — Offline PostgreSQL MCP (No DB Creds)

DryRun snapshots your PostgreSQL schema once and provides offline linting plus migration/query checks via CLI + MCP, without sharing prod credentials.

by MCP Hub·8 views
$ tokrepo install dryrun-offline-postgresql-mcp-no-db-creds
MCP#04
mcp-server-mysql — Read-Only MySQL MCP for Claude Code

mcp-server-mysql is an MCP server for Claude Code that connects to MySQL (optionally via SSH tunnels) so agents can inspect schemas and run read-only SQL.

by MCP Hub·68 views
$ tokrepo install mcp-server-mysql-read-only-mysql-mcp-for-claude-code
MCP#05
MySQL MCP Server — Secure MySQL Tools via MCP

mysql_mcp_server is an MCP server for MySQL with pip install and Smithery client setup; expose DB actions to Claude Code safely (1,251★).

by MCP Hub·71 views
$ tokrepo install mysql-mcp-server-secure-mysql-tools-via-mcp
MCP#06
MongoDB MCP Server — npx + Read-Only Safety by Default

MongoDB MCP Server exposes MongoDB queries and optional Atlas admin tools to MCP clients via npx or Docker, with a read-only mode that reduces risk.

by MCP Hub·74 views
$ tokrepo install mongodb-mcp-server-npx-read-only-safety-by-default
MCP#07
Redis MCP Server — Official Redis for AI Agents

Official Redis MCP server enabling AI agents to manage Redis data via natural language. Supports strings, hashes, lists, sets, streams, JSON, pub/sub, and vector search. MIT license.

by MCP Hub·127 views
$ tokrepo install redis-mcp-server-official-redis-ai-agents-31218ce0
MCP#08
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.

by MCP Hub·121 views
$ tokrepo install sqlite-mcp-local-database-ai-agents-f67139b3
MCP#09
Universal DB MCP — 17 Databases, Read-Only Default

Universal DB MCP is a multi-DB MCP connector (stdio/http) with read-only default and caching; verified 782★ and documents 25x–100x speedups in README.

by MCP Hub·90 views
$ tokrepo install universal-db-mcp-17-databases-read-only-default
MCP#10
GenAI Toolbox — MCP Server for Databases by Google

Open-source MCP server for databases by Google. Connect AI agents to PostgreSQL, MySQL, Cloud SQL, AlloyDB, and Spanner with built-in auth, connection pooling, and safety. 13K+ stars.

by MCP Hub·179 views
$ tokrepo install genai-toolbox-mcp-server-databases-google-a3c39721
Questions fréquentes

Questions fréquentes

Why not just use one universal database MCP instead of ten?

Universal MCPs (DBHub, GenAI Toolbox, Universal DB MCP) cover the common case beautifully — one server, many DSNs. But every engine has quirks the universal layer flattens out: Postgres's EXPLAIN ANALYZE, Mongo's aggregation pipeline, Redis's ACL semantics. The engine-specific servers in this pack expose those as first-class tools. Use a universal MCP for breadth, an engine-specific one when the agent needs depth.

Is read-only mode actually enforced, or is it just a flag the agent can ignore?

Enforced at the protocol layer. The MCP server only registers query and describe_table tools when read-only is on — it literally does not expose insert, update, delete to the host. The agent can't call what isn't there. Belt-and-braces: pair with a read-only Postgres role or a Redis ACL that revokes write commands at the DB layer.

Will these work with Claude Code, Cursor, and Codex CLI?

All three plus Cline, Roo Code, Windsurf, GitHub Copilot, and Gemini CLI. MCP is a standard — the TokRepo CLI writes the right config file for whichever host you're running. The same server binary serves every host.

What's the difference vs the Postgres for AI Agents pack?

Postgres for AI Agents goes deep on one engine — five Postgres servers including Neon and Supabase, branch-per-task workflow, RLS gotchas. This pack goes wide — one or two servers per engine across Postgres, MySQL, Mongo, Redis, SQLite. Pick this one if your stack is polyglot, that one if everything is Postgres.

How does the DryRun server help if it can't see live data?

Two ways. First, it lets junior engineers and the agent draft SQL safely — no chance of leaking creds in a screenshot, no chance of an accidental DELETE. Second, it doubles as a CI check: pipe every PR's proposed SQL through DryRun against the production schema dump, and the build fails when a query references a column that doesn't exist.

PLUS DANS L'ARSENAL

12 packs · 80+ ressources sélectionnées

Découvrez tous les packs curatés sur la page d'accueil

Retour à tous les packs