Gazzetta Mcp

io.github.GiovannaFilippini由 GitHub 账号 GiovannaFilippini 发布v0.1.0更新于 Nov 6, 2026

Free, local MCP server to consult and search the Italian Gazzetta Ufficiale. Unofficial.

概览

AI 生成的概览

非官方的本地 MCP 服务器,让 AI 助手浏览、检索并阅读意大利《Gazzetta Ufficiale》与 Normattiva 的法律文本。

可以做什么
  • 按系列和日期列出最新公报与目录
  • 按编辑代码读取法令全文,或读取某条法律条文的最新有效文本
  • 在近期各期、本地缓存和 Normattiva 档案中检索标题与发布机构
  • 按关键词和地区查找公开招聘,并查看即将截止的公告
  • 追踪某主题自上次查询以来的新内容,并生成 Normattiva 永久链接
  • 提供现成提示词,用于摘要法令、比较两项法令或列出在招岗位
适用场景
适合需要跟进意大利官方公报的人:查看当天发布了什么、查找带截止日期的公开招聘、概括某项法令,或获取某条法律条文的现行文本,都可以用自然语言提问完成。
运行要求
以 PyPI 包 gazzetta-mcp 通过 stdio 在本地运行,可用 uvx 或 pip 启动;pip 方式需要 Python 3.10 以上。需要访问 Gazzetta Ufficiale 网站和 Normattiva Open Data API 的网络。无需账号或 API 密钥。可选 GAZZETTA_MCP_* 环境变量可调整缓存路径、请求频率、超时和档案功能。
安装前请注意
非官方项目,与 Gazzetta Ufficiale 无隶属关系;返回文本不具权威性,结果可能不完整,须核对官方链接。检索请求会发往 Gazzetta 网站,关键词还会发往 Normattiva API,除非用 GAZZETTA_MCP_ARCHIVIO_NORMATTIVA=0 关闭;设置 GAZZETTA_MCP_ARCHIVIO_URL 会把检索内容和法令代码发送到该远程服务。结果缓存在本地 SQLite 文件中。不构成法律意见。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Gazzetta Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

gazzetta-mcp

[PyPI downloads]

Unofficial, local MCP server that lets your AI assistant consult the Italian Gazzetta Ufficiale. Free, open source (MIT). No codes or dates needed.

English | Italiano

[Demo: "Ci sono concorsi per infermiere in Lombardia?" and the assistant's answer]

Illustrative demo built from a real result of 28 Oct 2026.

What you can ask your assistant:

  • "Are there public competitions for nurses in Lombardy?"
  • "What came out in the Gazzetta today?"
  • "Give me the text of the decree on ..., summarised in three points."
  • "Give me the Normattiva link for law 241/1990."

Results can be partial: the server sees recent publications and what it has already looked up, not the whole archive, and it says so. Ready to try it? Go to Install.

Disclaimer

This project is NOT an official publication and is not affiliated with the Gazzetta Ufficiale or the Istituto Poligrafico e Zecca dello Stato. The texts it returns are not authentic and are provided free of charge. The only definitive text is the one published in the Gazzetta Ufficiale in print, which prevails in case of discrepancy. Every response includes the source and the official link; always check the official text before relying on it.

Reference wording from the source site: "L'unico testo definitivo e' quello pubblicato sulla Gazzetta Ufficiale a mezzo stampa, che prevale in caso di discordanza. La riproduzione dei testi forniti nel formato elettronico e' consentita purche' venga menzionata la fonte, il carattere non autentico e gratuito."

Usage policy

  • Requests are made on demand only, when you or your assistant ask for something.
  • No bulk download and no mirroring of the site.
  • Results are kept in a local cache (SQLite) on your machine.
  • Outgoing requests are rate limited (default 1 per second).
  • Besides the Gazzetta Ufficiale, cerca queries the Normattiva Open Data API (one request per search, cached for 24 hours); it can be switched off (see Configuration).
  • Requests carry an identifying User-Agent (gazzetta-mcp/<version> (unofficial open source client)).

These are our own choices for the local server, not rules imposed by the source; the source only requires citing it and stating that texts are non-authentic and free. Please keep these defaults respectful of the source. See docs/fonti.md.

The optional archive is a separate tool, run on purpose by whoever operates it: it fills slowly (1 request per second, never twice the same act) and is not part of the local server's default behaviour.

Tools

ToolParametersWhat it does
ultime_pubblicazioniserie, giorniLatest publications of a series (SG, S1-S5, P2) over the last N days
sommariodata, serieTable of contents of the issue of a given date and series
leggi_attocodice, data, serie, offsetText of an act from its editorial code (e.g. 26A05182)
cerca_concorsiparole_chiave, regione, aperti, includi_altri_atti, limiteSearch public competitions from a cold start: loads the last ~30 days of the 4th series (a handful of rate-limited requests, then cached), states the coverage
rimando_normattivaattoBuilds the permanent Normattiva link for an act (link only, no download)
cercatesto, serie, tipo, dal, al, limite, aggiorna, solo_vigenti, periodoSearch titles and issuing bodies of recent issues (SG about 30 days, S4 last 9: refreshed first, bounded), of everything already cached and, for laws and decrees of any year, of the Normattiva Open Data archive (results marked origine: normattiva); repealed acts are left out by default; full act texts only if already read
scadenze_concorsiparole_chiave, regione, entro_giorni, limiteCompetitions about to expire (default: next 7 days). Reads the text of a limited number of calls (at most 8 per request, then cached) and works out the deadline from the call's own formula or from a written date; if the call gives none it says so. Always indicative: check the official call
testo_vigenteatto, offsetText of one article of a law as it stands today, amendments included (unlike leggi_atto, which gives the originally published text). One article at a time, from Normattiva Open Data (CC BY 4.0); for the whole act use the link from rimando_normattiva
novita_argomentoargomento, serie, segna_come_letto, limiteWhat came out on a topic since you last asked. The last check is remembered only on your computer; the first time it shows the last 7 days. Searches titles and issuing bodies, not full texts; the words you ask about are also sent to Normattiva for the archive search (switch it off with GAZZETTA_MCP_ARCHIVIO_NORMATTIVA=0)

Series codes: SG Serie Generale, S1 Corte Costituzionale, S2 Unione Europea, S3 Regioni, S4 Concorsi ed esami, S5 Contratti pubblici, P2 Parte II.

Ready-made prompts

Five prompts your assistant can show as commands in a menu; pick one and type a few words.

PromptWhat it asks the assistant to do
riassumi_attoExplain an act in 3-5 points, without jargon
confronta_decretiWhat changes and what stays the same between two acts
concorsi_per_meOpen competitions that fit your profile, with deadline
cosa_e_uscitoWhat came out today, this week or in a period you name
aggiornamenti_suWhat is new on a topic since the last time

They never ask you for codes or dates, they cite the official link and they remind you that the text is unofficial; for legal questions you still need a professional.

Install

The easiest way is uv, a small free tool that downloads and runs the server for you (it provides the uvx command, and fetches a suitable Python if you do not have one). On Windows, open PowerShell and run winget install --id astral-sh.uv, then reopen the terminal. With pip you need Python 3.10+.

bash
uvx gazzetta-mcp# orpip install gazzetta-mcp

One-click install (Claude Desktop)

Download gazzetta-mcp-0.2.0.mcpb from the latest release and double-click it (or open it from Claude Desktop, Settings > Extensions). No terminal needed. If double-clicking does nothing (Windows does not always link .mcpb files to Claude Desktop), open Claude Desktop, go to Settings > Extensions and drag the file onto that page. The bundle is built from mcpb and installs the same gazzetta-mcp package from PyPI.

Development version (from GitHub)

bash
uvx --from git+https://github.com/GiovannaFilippini/gazzetta-mcp gazzetta-mcp

Configure your MCP client

Claude Code

bash
claude mcp add gazzetta -- uvx gazzetta-mcp

Claude Desktop (claude_desktop_config.json)

json
{  "mcpServers": {    "gazzetta": {      "command": "uvx",      "args": ["gazzetta-mcp"]    }  }}

Cursor (~/.cursor/mcp.json) and Windsurf: same mcpServers block as Claude Desktop.

VS Code (.vscode/mcp.json)

json
{ "servers": { "gazzetta": { "type": "stdio", "command": "uvx", "args": ["gazzetta-mcp"] } } }

Generic stdio client: run the command gazzetta-mcp (or uvx gazzetta-mcp) and speak MCP over stdin/stdout.

To use the development version, replace the command/args with uvx --from git+https://github.com/GiovannaFilippini/gazzetta-mcp gazzetta-mcp.

Configuration

All settings are environment variables, read in src/gazzetta_mcp/config.py.

VariableDefaultMeaning
GAZZETTA_MCP_GU_BASE_URLhttps://www.gazzettaufficiale.itBase URL of the Gazzetta Ufficiale site
GAZZETTA_MCP_NORMATTIVA_BASE_URLhttps://www.normattiva.itBase URL used for Normattiva links
GAZZETTA_MCP_NORMATTIVA_API_URLhttps://api.normattiva.it/t/normattiva.api/bff-opendata/v1/api/v1Normattiva Open Data API used by the archive search
GAZZETTA_MCP_ARCHIVIO_NORMATTIVA1Set to 0 to stop cerca from querying the Normattiva archive
GAZZETTA_MCP_ARCHIVIO_GIORNI365Period searched in the archive when no dal is given
GAZZETTA_MCP_ARCHIVIO_TIMEOUT90.0Timeout in seconds for the archive search (slow with date filters)
GAZZETTA_MCP_RICERCA_GU0Set to 1 to enable the Gazzetta Ufficiale advanced search form (off by default: its terms of use do not mention automated use)
GAZZETTA_MCP_RPS1.0Maximum requests per second
GAZZETTA_MCP_TIMEOUT20.0HTTP timeout in seconds
GAZZETTA_MCP_CACHE_PATH<cache dir>/gazzetta-mcp/cache.sqlite3SQLite cache file (LOCALAPPDATA, else XDG_CACHE_HOME, else ~/.cache)
GAZZETTA_MCP_FEED_TTL900Feed cache lifetime in seconds
GAZZETTA_MCP_USER_AGENTgazzetta-mcp/<version> (unofficial open source client)User-Agent sent with requests
GAZZETTA_MCP_ARCHIVIO_PATH<cache dir>/gazzetta-mcp/archivio.sqlite3Archive file, read only if it exists (see Archive)
GAZZETTA_MCP_ARCHIVIO_URLempty (off)Address of a remote archive service (https://, or http://localhost); when set, your searches and the codes of the acts you open are sent to that service
GAZZETTA_MCP_ARCHIVIO_REMOTO_TIMEOUT8Timeout in seconds for the remote archive (0-60)

Archive (optional, advanced)

Not needed to use the tools above. The archive is a single SQLite file with copies of already public acts (Gazzetta Ufficiale and Normattiva), searchable offline and filled slowly in the background.

  • If the file archivio.sqlite3 exists, the local server reads it after its cache and before the Gazzetta site. If it does not exist, nothing changes. Normattiva data: CC BY 4.0.
  • Fill and manage it with python -m gazzetta_mcp.archivio (aggiorna, recupera, controlla, stato, rimuovi, rimossi). The automatic update takes only the Serie Generale by default.
  • rimuovi CODE --motivo richiesta-interessato --si deletes an act for good and keeps it from coming back.
  • A read-only service for the network is python -m gazzetta_mcp.archivio.remoto (see deploy/ for a step by step guide to a small Linux server). No public service exists yet; the privacy notice is still a draft (docs/privacy/).
  • The decisions behind it: docs/decisioni/090-archivio-remoto.md.

Troubleshooting

First run gazzetta-mcp --prova (or uvx gazzetta-mcp --prova): it checks Python, local search, the cache folder and the connection (one request) and tells you what to fix.

  • The assistant does not see the tool: restart the assistant completely after adding the server, check the command in its configuration (see above), and run --prova.
  • Empty results: try other or fewer keywords, or ask what came out recently. Results can be partial (see above); check the official site if something is missing.
  • The first search is slow: the first request builds the local cache. Later ones are faster.
  • Where is the cache? In <cache dir>/gazzetta-mcp/cache.sqlite3 (see GAZZETTA_MCP_CACHE_PATH above; on Windows %LOCALAPPDATA%\gazzetta-mcp).
  • Clear the cache: close the assistant, then run gazzetta-mcp --svuota-cache --si (without --si it only shows what would be deleted). It also forgets what novita_argomento had already shown you: the next check of each topic starts again from the last 7 days.

Development

bash
uv syncuv run pytest            # no network neededuv run ruff check .uv run pytest --live     # also runs tests that call the real sites (use sparingly)

See CONTRIBUTING.md, docs/piano.md and docs/decisioni.

License

MIT. The license covers the code only; the texts remain subject to the rules of their sources (see docs/fonti.md).

Sources and attribution. Gazzetta Ufficiale texts may be reproduced if the source is cited and their non-authentic, free nature is stated: every response does so. Archive search results marked origine: normattiva come from Normattiva Open Data (dati.normattiva.it), released under CC BY 4.0: if you reuse them, credit the source.


Italiano

Server MCP locale, non ufficiale, che permette al tuo assistente AI di consultare la Gazzetta Ufficiale. Gratuito e open source (licenza MIT). Non servono codici né date.

Cosa puoi chiedere all'assistente:

  • "Ci sono concorsi per infermiere in Lombardia?"
  • "Cosa è uscito oggi in Gazzetta?"
  • "Dammi il testo del decreto su ..., riassunto in tre punti."
  • "Dammi il link Normattiva della legge 241/1990."

I risultati possono essere parziali: il server vede le pubblicazioni recenti e ciò che ha già consultato, non tutto l'archivio, e lo dice. Pronto a provarlo? Vai a Installazione.

Come si usa

  1. Collega la Gazzetta all'assistente (una volta sola, vedi "Installazione" e "Configurazione del client MCP"), poi riavvia l'assistente.
  2. Scrivi cosa ti serve con parole tue, senza codici o date: "Ci sono concorsi per infermiere in Lombardia?", "Cosa è uscito oggi in Gazzetta?", "Dammi il link Normattiva della legge 241/1990."
  3. Apri sempre il link ufficiale riportato nella risposta: i testi non sono ufficiali e i risultati possono essere incompleti.

Altri esempi in docs/uso.md.

Avvertenza

Questo progetto NON è una pubblicazione ufficiale e non è affiliato alla Gazzetta Ufficiale né all'Istituto Poligrafico e Zecca dello Stato. I testi restituiti hanno carattere non autentico e sono forniti gratuitamente. L'unico testo definitivo è quello pubblicato sulla Gazzetta Ufficiale a mezzo stampa, che prevale in caso di discordanza. Ogni risposta riporta la fonte e il link ufficiale: verifica sempre il testo ufficiale prima di farci affidamento.

Regole d'uso

  • Le richieste partono solo su richiesta dell'utente.
  • Nessun download massivo, nessuna copia del sito.
  • I risultati restano in una cache locale (SQLite) sul tuo computer.
  • Le richieste in uscita hanno un limite di frequenza (predefinito: 1 al secondo).
  • Oltre alla Gazzetta Ufficiale, cerca interroga l'API Open Data di Normattiva (una richiesta per ricerca, in cache per 24 ore); si può disattivare (vedi la tabella "Configuration").
  • Le richieste usano uno user-agent identificativo (gazzetta-mcp/<versione> (unofficial open source client)).

Sono scelte nostre per il server locale, non regole imposte dalla fonte, che chiede solo di citarla e di dichiarare il carattere non autentico e gratuito dei testi. Vedi docs/fonti.md.

L'archivio è invece uno strumento a parte, che lancia di proposito chi lo gestisce: si riempie lentamente (1 richiesta al secondo, mai due volte lo stesso atto) e non fa parte del comportamento normale del server locale.

Strumenti

StrumentoParametriCosa fa
ultime_pubblicazioniserie, giorniUltime pubblicazioni di una serie negli ultimi N giorni
sommariodata, serieSommario del numero di una data e serie
leggi_attocodice, data, serie, offsetTesto di un atto dal codice redazionale (es. 26A05182)
cerca_concorsiparole_chiave, regione, aperti, includi_altri_atti, limiteCerca bandi (4a serie) anche a cache vuota: carica gli ultimi 30 giorni (poche richieste distanziate, poi in cache) e dichiara la copertura
rimando_normattivaattoCostruisce il link permanente a Normattiva (solo link)
cercatesto, serie, tipo, dal, al, limite, aggiorna, solo_vigenti, periodoRicerca nei titoli e negli enti dei numeri recenti (SG circa 30 giorni, S4 ultimi 9: aggiornati prima, con tetto), in ciò che è in cache e, per leggi e decreti di qualsiasi anno, nell'archivio Open Data di Normattiva (origine normattiva); gli atti abrogati sono esclusi di default; il testo completo solo per gli atti già letti
scadenze_concorsiparole_chiave, regione, entro_giorni, limiteQuali concorsi stanno per scadere (di default nei prossimi 7 giorni). Legge il testo di un numero limitato di bandi (al massimo 8 per richiesta, poi in cache) e ricava la data dalla formula del bando o da una data scritta; se il bando non la indica, lo dice senza inventarla. La data è sempre indicativa: va verificata sul bando ufficiale
testo_vigenteatto, offsetTesto di un articolo di legge com'è oggi, con le modifiche già applicate (a differenza di leggi_atto, che dà il testo originale). Un articolo per volta, da Normattiva Open Data (CC BY 4.0); per l'atto intero resta il link di rimando_normattiva
novita_argomentoargomento, serie, segna_come_letto, limiteCosa è uscito su un argomento dall'ultima volta che lo hai chiesto. Il programma ricorda l'ultimo controllo solo sul tuo computer; la prima volta mostra gli ultimi 7 giorni. Cerca nei titoli e negli enti, non nel testo completo; le parole che chiedi vengono inviate anche a Normattiva per la ricerca nell'archivio (si disattiva con GAZZETTA_MCP_ARCHIVIO_NORMATTIVA=0)

Sigle delle serie: SG Serie Generale, S1 Corte Costituzionale, S2 Unione Europea, S3 Regioni, S4 Concorsi ed esami, S5 Contratti pubblici, P2 Parte II.

Richieste già pronte

Cinque comandi che il tuo assistente mostra in un menu: scegline uno e scrivi due parole.

ComandoCosa chiede all'assistente
riassumi_attoSpiega un atto in 3-5 punti, senza gergo
confronta_decretiCosa cambia e cosa resta uguale tra due atti
concorsi_per_meBandi aperti adatti al tuo profilo, con scadenza
cosa_e_uscitoNovità di oggi, della settimana o del periodo che indichi
aggiornamenti_suCosa c'è di nuovo su un argomento dall'ultima volta

Non ti chiedono mai codici o date, riportano il link ufficiale e ricordano che il testo non è ufficiale; per questioni legali serve comunque un professionista.

Esempi di richieste in linguaggio naturale: docs/uso.md.

Installazione

Il modo più semplice è uv, un piccolo programma gratuito che scarica e avvia il server al posto tuo (fornisce il comando uvx e, se manca, scarica anche un Python adatto). Su Windows apri PowerShell, scrivi winget install --id astral-sh.uv, poi chiudi e riapri il terminale. Con pip serve Python 3.10+.

bash
uvx gazzetta-mcp# oppurepip install gazzetta-mcp

Installazione con un clic (Claude Desktop): scarica gazzetta-mcp-0.2.0.mcpb dall'ultima release e aprilo con doppio clic (oppure da Claude Desktop, Impostazioni > Estensioni). Non serve il terminale. Se il doppio clic non fa niente (Windows non sempre collega i file .mcpb a Claude Desktop), apri Claude Desktop, vai su Impostazioni > Estensioni e trascina il file su quella pagina. Il pacchetto è costruito da mcpb e installa lo stesso pacchetto gazzetta-mcp di PyPI.

Versione di sviluppo (da GitHub):

bash
uvx --from git+https://github.com/GiovannaFilippini/gazzetta-mcp gazzetta-mcp

Configurazione del client MCP

  • Claude Code: claude mcp add gazzetta -- uvx gazzetta-mcp
  • Claude Desktop: aggiungi a claude_desktop_config.json il blocco mcpServers mostrato sopra.
  • Altri client: avvia gazzetta-mcp come server stdio.

Le variabili d'ambiente GAZZETTA_MCP_* sono descritte nella tabella Configuration più sopra (in inglese).

Archivio (facoltativo)

Non serve per usare gli strumenti qui sopra. È un unico file SQLite con copie di atti già pubblici (Gazzetta Ufficiale e Normattiva), che si cercano anche senza collegamento e che si riempie lentamente in sottofondo.

  • Se il file archivio.sqlite3 esiste, il server locale lo legge dopo la cache e prima del sito della Gazzetta. Se non esiste, non cambia nulla. Dati di Normattiva: CC BY 4.0.
  • Si riempie e si gestisce con python -m gazzetta_mcp.archivio (aggiorna, recupera, controlla, stato, rimuovi, rimossi). L'aggiornamento automatico prende per predefinito solo la Serie Generale.
  • rimuovi CODICE --motivo richiesta-interessato --si cancella un atto e impedisce che ritorni.
  • Il servizio di sola lettura per la rete è python -m gazzetta_mcp.archivio.remoto (guida passo passo per un piccolo server Linux in deploy/). Un servizio pubblico non esiste ancora e l'informativa privacy è una bozza (docs/privacy/).
  • Le decisioni: docs/decisioni/090-archivio-remoto.md.

Se qualcosa non funziona

Lancia prima gazzetta-mcp --prova (o uvx gazzetta-mcp --prova): controlla Python, la ricerca locale, la cartella della cache e il collegamento (una sola richiesta) e dice cosa sistemare.

  • L'assistente non vede lo strumento: riavvia del tutto l'assistente dopo aver aggiunto il server, controlla il comando nella configurazione e lancia --prova.
  • Nessun risultato: prova parole chiave diverse o meno numerose, oppure chiedi cosa è uscito di recente. I risultati possono essere parziali; se manca qualcosa controlla il sito ufficiale.
  • La prima ricerca è lenta: la prima richiesta costruisce la memoria locale (cache); le successive sono più veloci.
  • Dove sta la cache: in <cartella cache>/gazzetta-mcp/cache.sqlite3 (su Windows %LOCALAPPDATA%\gazzetta-mcp), modificabile con GAZZETTA_MCP_CACHE_PATH.
  • Svuotare la cache: chiudi l'assistente e lancia gazzetta-mcp --svuota-cache --si (senza --si mostra soltanto cosa verrebbe cancellato). Si dimentica anche cosa ti aveva già mostrato novita_argomento: il prossimo controllo di ogni argomento riparte dagli ultimi 7 giorni.

Sviluppo

bash
uv syncuv run pytest          # senza reteuv run ruff check .uv run pytest --live   # include i test sui siti reali

Vedi CONTRIBUTING.md. Licenza: MIT (vale per il codice; i testi restano soggetti alle regole delle fonti, vedi docs/fonti.md).

Fonti e attribuzione. I testi della Gazzetta Ufficiale si possono riprodurre citando la fonte e dichiarandone il carattere non autentico e gratuito: ogni risposta lo fa. I risultati della ricerca nell'archivio con origine: normattiva provengono da Normattiva Open Data (dati.normattiva.it), rilasciati con licenza CC BY 4.0: se li riusi, la fonte va citata.

来源:README.md,提交 83c8afd

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分