MCP server: a safe database tool for any MCP client

Aperta
#31 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, sqlite

Direzione di ricerca

Start in src/sqlguardllm/cli.py to see how the new mcp subcommand hooks in, then read the Guard.enforce() API that the query tool must call. Build the stdio server in src/sqlguardllm/mcp_server.py with the four tools, and add an in-process SQLite test in tests/test_mcp.py. Done means the tests pass with violations returned as tool errors and rows capped at max_rows. Blocked on #12, #27 and #28.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:integrations area:security size:l type:feature
Goal

Give Claude Desktop, Cursor, VS Code and agents a database tool that can't write, can't see hidden data and can't escape row filters (docs/DESIGN.md#mcp-server).

Acceptance criteria
  • sqlguardllm mcp --policy FILE --db URL [--context JSON] [--role NAME] starts an MCP server over stdio, in the optional extra sqlguardllm[mcp]
  • Tools list_tables, describe_table, explain_query and query; query runs the SQL returned by Guard.enforce() in a read-only transaction with a timeout and returns at most max_rows rows as JSON
  • Violations come back as tool errors with their messages so the model can repair its query
  • End-to-end test with an in-process MCP client against SQLite
Relevant files
  • src/sqlguardllm/mcp_server.py
  • src/sqlguardllm/cli.py
  • tests/test_mcp.py
  • pyproject.toml
Size

L (3-5 days)

Notes
Lingua principale
Python
Stelle
0
Fork
0
Merge medio
1m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jmmana/sqlguardllm

Tutte le issue di jmmana/sqlguardllm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.