dataciviclab
Officialdataciviclab is a read-only MCP server for orienting in the Lab, discovering datasets/entities, querying published parquet data, and participating in GitHub Discussions.
Orient quickly:
session_bootstrapgives a compact Lab overview;lab_mapmaps domains → repos → sources;workspace_triagereturns radar, PRs, issues, discussions, registry, git, and warnings.Search and explore:
findruns ranked cross-entity search over datasets, repos, domains, sources, and analyses;exploredeep-dives any entity and returns a card, children, and routing hints.Query published data:
gcs_queryruns read-only SELECT/CTE queries against public clean/mart parquet buckets via_data, with a max of 500 output rows.Participate in GitHub Discussions: list/search discussions, list valid categories, read discussions with comments/replies, create discussions, and add top-level comments.
Respect limits: no data download/transformation, no pipeline execution, no repo file edits or PR creation, no dataset publishing; GitHub Discussions need a token, default repo is
dataciviclab/dataciviclab.Schema note: the README mentions
join_suggestionsand 12 tools, but the provided schema lists 11 tools and omitsjoin_suggestions.
Provides tools for interacting with GitHub Discussions: listing discussions and categories, reading discussion details and comments, searching discussions, and creating discussions and comments. Also enables triggering context rebuilds via GitHub Actions.
Click on "Deploy 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., "@dataciviclab find rifiuti urbani and explore the dataset"
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.
dcl-mcp — il MCP del DataCivicLab
Il modo più rapido per consultare il Lab e partecipare alle sue discussioni da un agente AI, senza clonare nessun repository.
Un solo server, nome dataciviclab, 12 tool.
Cosa ti dà
Puoi… | Con | Cosa ottieni |
capire com'è organizzato il Lab |
| domini, repo, fonti, stato recente |
trovare un dataset o un'analisi |
| slug, anni, colonne, marts, dove sta il parquet |
leggere i dati pubblicati |
| SELECT su clean e mart, read-only (max 500 righe) |
capire se due dataset si possono unire |
| coppie di colonne, overlap anni, mismatch di tipo |
vedere cosa è aperto |
| PR, issue, discussioni del tema |
partecipare |
| leggi, apri, commenta |
Related MCP server: OpsMCP
Cosa non puoi fare
Il server è read-only sui dati e non esegue pipeline:
non scarica né trasforma dati → usa
toolkit, sul repo localenon modifica file nei repo né apre PR → usa il server
githubnon pubblica dataset né rigenera il catalogo → lo fa la CI di agent-context-builder
Tre percorsi
1. Mi oriento
session_bootstrap() # cosa è successo nel Lab
lab_map() # domini → repo → fonti
find("rifiuti urbani") # cerca dataset, analisi, repo, fonti
explore("ispra_ru_base") # card: anni, colonne, marts, gcs_path2. Mi serve un numero verificabile
find("irpef comunale") # trova lo slug
explore("irpef_comunale") # controlla colonne e periodo
gcs_query(slug="irpef_comunale", sql="SELECT count(*) FROM _data")clean_rows nella card è il conteggio dell'ultimo snapshot pubblicato, non
la serie completa: per un numero citabile usa sempre count(*) via
gcs_query.
3. Voglio partecipare
find("appalti", include_github=true) # cosa è già aperto
github_get_discussion(number=123, include_comments=true)
github_list_discussion_categories() # prima di creare
github_create_discussion(category_name="…", title=…, body=…)
github_add_discussion_comment(number=123, body=…)Installazione
pip install "lab-connectors[mcp,duckdb] @ git+https://github.com/dataciviclab/lab-connectors.git"
pip install "dcl-mcp @ git+https://github.com/dataciviclab/dcl-mcp.git"Config OpenCode (V2):
{
"mcp": {
"servers": {
"dataciviclab": {
"type": "local",
"command": ["dcl-mcp"],
"environment": { "DCL_MCP_ENV_FILE": "/percorso/.env" }
}
}
}
}Per altri client che usano il formato mcpServers, l'entry è
{"command": "dcl-mcp", "env": {...}}.
Env var | Ruolo | Obbligatoria |
| Discussions e | sì, per discussions/write |
| Path a un file | no |
| Sorgente artefatti contesto (default: ACB, branch | no |
Riferimento tool
Famiglia | Tool | Cosa fa |
Context |
| Orientamento rapido (markdown) |
| Domini → repo → fonti; | |
| Ricerca ranked cross-entity, con | |
| Deep-dive di dataset/repo/domain/source/analysis | |
| Dataset joinabili dai semantic_type: colonne, overlap anni, | |
| Stato Lab: radar, PR, issue, discussioni; | |
Discussions |
| Elenca o cerca full-text/categoria |
| Categorie valide per la creazione | |
| Legge una discussion, con commenti e reply | |
| Apre una discussion | |
| Commenta una discussion | |
GCS |
| SELECT/CTE read-only sui parquet pubblici |
Ogni risposta ha ok (anche gli errori, con error/message). I tool che
leggono il catalogo espongono as_of (quando è stato costruito) e le card
dataset/mart snapshot_year (anno del file pubblicato). I tool
Discussions usano repo_full_name con default dataciviclab/dataciviclab.
Limiti e sicurezza
GCS read-only: solo i bucket
dataciviclab-cleanedataciviclab-mart, una sola istruzione per chiamata, max 500 righe, tabella_data(view sul parquet). Nessun DML/PRAGMA.È un guardrail, non un sandbox: non eseguire query di terzi non fidati. I dettagli della validazione AST sono in docs/DESIGN.md.
Nomi dei tool = contratto cross-repo (skill, config utente, docs): non cambiano senza migrazione.
Altri server del Lab
Server | A cosa serve |
dcl-mcp (questo) | org-wide: dove cerco, cosa è successo, come partecipo, dati pubblicati |
toolkit | repo locale: pipeline, contratti, SQL su raw/clean/mart del workspace |
source-observatory | scouting fonti e inventory |
github | leggere/scrivere un issue o una PR specifica |
find(include_github=true) qui è scoperta Lab-scoped (issue/PR aperte i
cui titoli contengono i token della query), non sostituisce il server github.
Sviluppo
pip install -e ".[dev]"
pytest tests/ -q -m "not smoke"
pytest tests/test_smoke.py -q -m smoke # golden path in-process, rete
pytest tests/test_e2e_stdio.py -q -m smoke # spawn del server + protocollo MCP
ruff check src/ tests/
mypy src/dcl_mcp/Storia e scelte di design: docs/DESIGN.md. Cambi di contratto: CHANGELOG.md.
Licenza
MIT — vedi LICENSE.
Available Tools
11 toolsexploreA
Deep-dive any Lab entity by ref: dataset slug, repo name, domain slug, source id, or analysis slug. Returns card + children + routing hints.
Inputs: ref (required). Returns: object
findA
Ranked search across datasets, repos, domains, sources, and analyses. All query tokens must match (cross-field AND): words may be spread across slug, name, tags, description, source_id and column schema (names/descriptions/semantic types). Filters: type= (dataset|repo|domain|source|analysis), domain=, limit=. Returns type + parent pointers + score. Use explore(ref) for details. include_github=true (needs GITHUB_TOKEN) adds open issues/PRs whose title contains all query tokens, and top open Discussions of the org on the same query.
Inputs: query (required), type, limit, domain, +1 more. Returns: object
gcs_queryA
SELECT read-only su un dataset clean o mart pubblicato sui bucket publici del Lab (dataciviclab-clean / dataciviclab-mart). slug= del dataset (layer=clean, default) o mart dataset__table (layer=mart). La query deve referenziare la tabella _data (es. SELECT anno, count(*) FROM _data GROUP BY anno); sono ammesse anche CTE (WITH … SELECT). Una sola istruzione, limit= max righe in output (default 100, max 500). Scopri gli slug con find()/explore() — explore restituisce anche columns e gcs_path. Serve solo per i dati pubblicati: per raw/contratti/pipeline usa il MCP toolkit.
Inputs: sql (required), slug (required), layer, limit. Returns: object
github_add_discussion_commentC
Aggiunge un commento top-level a una GitHub Discussion.
Inputs: body (required), number (required), repo_full_name. Returns: object
github_create_discussionA
Crea una GitHub Discussion in una categoria del repository. Default: repo hub dataciviclab/dataciviclab. category_name accetta nome o slug della categoria (case-insensitive, es. 'Domanda' o 'domanda') — elenca le opzioni con github_list_discussion_categories.
Inputs: body (required), title (required), category_name (required), repo_full_name. Returns: object
github_get_discussionA
Restituisce una GitHub Discussion. mode=summary restituisce solo un estratto del body (default excerpt_chars=500). mode=full restituisce il body intero (default, backward compat). include_comments=true aggiunge commenti e reply annidate nello stesso round-trip (comments_mode=full|summary, comments_limit, comments_excerpt_chars).
Inputs: number (required), mode, comments_mode, excerpt_chars, +4 more. Returns: object
github_list_discussion_categoriesA
Elenca le categorie discussioni valide di un repository (nome, slug, is_answerable) — usala prima di github_create_discussion per non sbagliare category_name.
Inputs: repo_full_name. Returns: object
github_list_discussionsA
Elenca le GitHub Discussions di un repository (default: hub del Lab). Senza query/category: ordinate per UPDATED_AT discendente, con cursor pagination 'after'/'before'. Con query= e/o category_name: full-text search server-side (mode='search', paginazione 'after'); category_name è un qualifier GitHub, non un filtro lato client.
Inputs: after, limit, query, before, +2 more. Returns: object
lab_mapA
Lab navigation map — domains → repos → sources. Use domain= to focus on one editorial theme: an unknown domain returns ok=false with the list of valid domain slugs.
Inputs: domain. Returns: object
session_bootstrapB
Quick orientation — compact markdown overview of Lab state.
Inputs: no named parameters. Returns: object
workspace_triageA
Machine-readable Lab state. Default: compact summary. Use section= to get a specific part: radar, prs, issues, discussions, registry, git, warnings.
Inputs: section. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target clearly distinct actions: the four github_* discussion tools are cleanly separated, and gcs_query vs find vs explore have well-drawn boundaries (query data vs search catalog vs deep-dive a ref). The only soft spot is the trio session_bootstrap / workspace_triage / lab_map, which all return 'state of the Lab' in different formats and could be confused on first use, though the descriptions differentiate them (markdown overview vs machine-readable sections vs domain→repo→source map).
The GitHub subset follows a clean, consistent github_verb_noun pattern (list/get/create/add). The rest mixes bare verbs (find, explore), noun phrases (session_bootstrap, workspace_triage, lab_map), and one verb_noun (gcs_query), so there is no single predictable pattern across the whole set. Names remain readable and snake_case is used uniformly, so it is mixed rather than chaotic.
11 tools is well within a comfortable range and each one earns its place: orientation, catalog search/inspection, one read-only SQL endpoint, and a five-tool discussion workflow. Nothing looks redundant enough to be padding.
The discussion lifecycle is largely covered (list, categories, get with comments/replies, create, comment), and catalog coverage via find/explore/gcs_query is solid. Gaps remain: no update/delete of discussions and no way to reply to a specific comment even though nested replies are returned, and the surface is read-only for issues/PRs and raw/pipeline data (explicitly deferred to another toolkit).
Maintenance
Related MCP Connectors
Read-only Google Search Console and Google Analytics for AI agents.
A read-only verified record of agent-operable GTM tools: search, fetch, compare, track changes.
Read-only production context for AI agents: Docker/K8s health, deploys, logs, traffic, code graph
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to Confluence, GitHub, Jira, Figma, Outlook, Teams, and browser automation for AI clients, enabling safe discovery, retrieval, and summarization of company knowledge without modifying source systems.-
- FlicenseAqualityBmaintenanceEnables AI agents to safely interact with GitHub, query Postgres read-only, check deployment status, and search/read files within an allowlisted sandbox—all with dry-run writes and SQL/path safety gates.8-
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to safely perform sandboxed file operations, evaluate math expressions, and run read-only SQL queries on a sample database, plus access resources and prompt templates.MIT
- AlicenseNot gradedqualityBmaintenanceGives coding agents safe, read-only access to a repository's ADRs, tickets, conventions, and searchable project context, with guardrails for path confinement and output redaction; write tools are available only when explicitly enabled.466 npmMIT