mcp公共服务
用于法国公共数据的MCP(模型上下文协议)服务器。提供对service-public.fr、地方税务、DVF房地产交易、BOFIP税收理论、ABC分区、集体协议、商业搜索、学校目录、高中成绩(IVAL)、国家评估(6eme/CE2)、Parcoursup培训、医疗保健访问(data.ameli.fr)、职业插入(Inserjeunes)、安全/犯罪统计(SSMSI)的访问,自然灾害(Georisques)、法律文本Legifrance(法律、法令、法典、判例法)、官方公报(JORF)、CAF社会援助统计(RSA/APL/AAH)和模拟器(财产税、公证费、所得税)。
安装
服务器托管-无需安装。将以下URL连接到MCP客户端:
https://mcp-service-public.nhaultcoeur.workers.dev/mcpClaude.ai(网络/移动)
- 打开 参数 (icone笔迹)
- 部分 集成 > 主控程序
- 点击 添加集成
- 粘贴上面的URL
- 23个工具将自动显示
克劳德桌面版
添加到 claude_desktop_config.json :
{
"mcpServers": {
"service-public": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp-service-public.nhaultcoeur.workers.dev/mcp"]
}
}
}建筑师的安置:
- 视窗 :
%APPDATA%\Claude\claude_desktop_config.json - macOS :
~/Library/Application Support/Claude/claude_desktop_config.json
Redemarer Claude Desktop需要修改。
VS代码/光标
相信 .vscode/mcp.json 在项目的根源:
{
"servers": {
"service-public": {
"type": "sse",
"url": "https://mcp-service-public.nhaultcoeur.workers.dev/mcp"
}
}
}其他MCP客户
任何符合MCP流式HTTP的客户端都可以使用上述URL连接。有关配置,请参阅客户文档。
验证
登录后,使用简单请求进行测试:
Recherche : renouveler passeport如果所有38个工具都已加载,则服务器已准备就绪。
38个MCP工具(v1.14.8)
| # | 输出 | 来源 | 描述 |
|---|---|---|---|
| 1 | rechercher | Dispatch Unifie | 根据请求自动路由到正确的源(32个类别) |
| 2 | rechercher_fiche | DILA/service-public.fr | 全文搜索约5500份概况介绍 |
| 3 | lire_fiche | DILA/service-public.fr | 按标识符(F14929、N360…)完整读取记录 |
| 4 | rechercher_service_local | API目录 | 地方公共服务(市政厅、县、咖啡馆等) |
| 5 | naviguer_themes | dila/service-public.fr | 主题树导航 |
| 6 | consulter_fiscalite_locale | DGFIP REI | 按市划分的地方税率(TFB、TEOM、CFE…) |
| 7 | rechercher_doctrine_fiscale | BOFIP | 8983现行税收理论条款 |
| 8 | consulter_transactions_immobilieres | dvf/data.gouv.fr | 平均价格,价格/平方米,按物业类型划分,多年演变 |
| 9 | simuler_taxe_fonciere | REI+DVF | 估算TF=VLC估算x 50%x taux REI卷筒 |
| 10 | simuler_frais_notaire | Bareme reglemente | DMTO+薪酬学位+CSI+债务 |
| 11 | consulter_zonage_immobilier | data.gouv.fr | ABC区(皮内尔、PTZ、码头/资源) |
| 12 | comparer_communes | REI+DVF+分区+教育+SSMSI+地理风险 | 2至5个城市(人口、税收、房地产、教育、健康、安全、自然灾害)的交叉表 |
| 13 | simuler_impot_revenu | BAREME IR 2025 | 累进IR、家庭商、DECOTE、CEHR、土地收入/资本/BIC/BNC |
| 14 | rechercher_convention_collective | kali/data.gouv.fr | 通过idcc或关键字签订的集体协议 |
| 15 | rechercher_entreprise | Dinum+Kali | Siret/Siren/Nom公司简介+适用协议 |
| 16 | rechercher_etablissement_scolaire | data.education.gouv.fr | 学校、学院、普通中学(68000多个机构) |
| 17 | consulter_resultats_lycee | DEPP/IVAL | BAC成功率、附加值、第二次BAC访问、提及 |
| 18 | consulter_evaluations_nationales | depp/data.education.gouv.fr | 按部门、IPS、级别组、趋势划分的6eme+CE2分数 |
| 19 | consulter_parcoursup | mesr/data.education.gouv.fr | Parcoursup按关键字、城市、部门、子公司提供的培训(14000+培训、选择性、接受的简介) |
| 20 | consulter_acces_soins | cnam/data.ameli.fr | 按部门获得护理:医生人数/密度、TM患者、发育不足地区 |
| 21 | consulter_insertion_professionnelle | DEPP-DARES/data.education.gouv.fr | |
| 22 | consulter_securite | ssmsi/data.gouv.fr | 部门安全/犯罪统计:入室盗窃、盗窃、暴力、比率/1000居民。 |
| 23 | consulter_risques_naturels | BRGM-MTE/georisques.gouv.fr | 自然和技术风险,按城市+逮捕Catnat |
| 24 | rechercher_texte_legal | DILA/API Piste Legifrance | 立法和监管文本(法律、法令、命令) |
| 25 | rechercher_code_juridique | DILA/API Piste Legifrance | 法律法规中的条款(民法、劳动法、刑法、商业…) |
| 26 | rechercher_jurisprudence | DILA/API Piste Legifrance | 司法判例(最高上诉法院、上诉法院) |
| 27 | consulter_journal_officiel | DILA/API跟踪Legifrance | 搜索官方期刊(JORF):法律、法令、命令-按类型和日期范围筛选 |
| 28 | consulter_aide_sociale | cnaf/data.caf.fr | 按市或部门划分的caf受益人统计:RSA、APL/ALS/ALF、AAH、家庭津贴、活动奖金。. |
| 29 | rechercher_marche_public | DILA/boamp-datadila.opendatasoft.com | boamp采购通知:招标、分配、MAPA、DSP-过滤器类型/部门/买方/日期 |
| 30 | rechercher_annonce_legale | DILA/bodacc-datadila.opendatasoft.com | bodacc法律声明:器官移植、辐射、切除、手术集合——过滤SIREN/nom/type/depth |
| 31 | consulter_budget_epci | OFGL/data.OFGL.fr | EPCI预算(大都市、CA、CC、CU):收入/支出、储蓄、债务、欧元/居民-2017-2024 |
| 32 | consulter_budget_commune | data.gouv.fr表格/ofgl | 共同原始预算:总收入/支出、总/净储蓄、未偿债务、欧元/居民 |
| 33 | rechercher_subvention | data.gouv.fr表格 | 补贴集体>23000欧元-过滤器受益人/授予人/对象/金额/年份 |
| 34 | consulter_sirene_historique | API企业搜索Dinum | 按NAF+区域划分的Sirene企业-活动/停止状态、创建和关闭日期 |
| 35 | rechercher_offre_emploi | 法国Travail OAuth2 | 活动工作-筛选标签,公社,部门,合同类型,资格 |
| 36 | consulter_prix_carburant | data.economie.gouv.fr | 按部门或城镇实时燃油价格-加油站按价格升序排序,柴油/SP95/SP98/E10/E85/GPLC,自动24/24(每10分钟更新一次) |
| 37 | rechercher_formation | data.gouv.fr表格/Caisse des Depots | 符合MoncompteFormation目录资格的CPF培训-过滤器关键字、部门、罗马代码、级别、距离 |
| 38 | consulter_parcoursup_stats | mesr/data.education.gouv.fr | 按培训课程浏览的选择性统计数据:入学率、最后一次通话排名、Bac G/T/Pro入学概况、提及、研究员 |
呼叫示例
统一搜索(自动调度)
{ "name": "rechercher", "arguments": { "query": "prix immobilier a Lyon" } }
{ "name": "rechercher", "arguments": { "query": "renouveler passeport" } }
{ "name": "rechercher", "arguments": { "query": "93140 taxe fonciere" } }
{ "name": "rechercher", "arguments": { "query": "SIRET 41816609600069" } }公司搜索
{ "name": "rechercher_entreprise", "arguments": { "siret": "41816609600069" } }
{ "name": "rechercher_entreprise", "arguments": { "nom": "OCTO Technology" } }模拟土地税
{ "name": "simuler_taxe_fonciere", "arguments": { "commune": "Lyon", "surface": 75, "type_bien": "Appartement" } }模拟公证费
{ "name": "simuler_frais_notaire", "arguments": { "prix": 250000, "type": "ancien", "departement": "75" } }模拟所得税
{ "name": "simuler_impot_revenu", "arguments": { "revenu_net_imposable": 42000 } }
{ "name": "simuler_impot_revenu", "arguments": { "revenu_net_imposable": 80000, "situation": "marie", "nb_enfants": 2 } }
{ "name": "simuler_impot_revenu", "arguments": { "revenu_net_imposable": 50000, "revenus_fonciers": 12000, "regime_foncier": "micro" } }集体协议
{ "name": "rechercher_convention_collective", "arguments": { "query": "boulangerie" } }
{ "name": "rechercher_convention_collective", "arguments": { "idcc": "3248" } }教育机构
{ "name": "rechercher_etablissement_scolaire", "arguments": { "commune": "Lyon", "type": "lycee" } }
{ "name": "rechercher_etablissement_scolaire", "arguments": { "code_postal": "93140", "statut": "public" } }
{ "name": "rechercher_etablissement_scolaire", "arguments": { "nom": "Lacassagne" } }高中成绩(IVAL)
{ "name": "consulter_resultats_lycee", "arguments": { "commune": "Lyon" } }
{ "name": "consulter_resultats_lycee", "arguments": { "nom_lycee": "Lacassagne", "type": "gt" } }国家评估(6EME/CE2)
{ "name": "consulter_evaluations_nationales", "arguments": { "code_departement": "93" } }
{ "name": "consulter_evaluations_nationales", "arguments": { "commune": "Lyon", "niveau": "6eme" } }
{ "name": "consulter_evaluations_nationales", "arguments": { "code_postal": "93140", "niveau": "CE2" } }Parcoursup地层
{ "name": "consulter_parcoursup", "arguments": { "recherche": "informatique", "ville": "Lyon" } }
{ "name": "consulter_parcoursup", "arguments": { "filiere": "BTS", "recherche": "comptabilite" } }
{ "name": "consulter_parcoursup", "arguments": { "departement": "93", "filiere": "Licence" } }统计Selectivite Parcoursup
{ "name": "consulter_parcoursup_stats", "arguments": { "formation": "BTS comptabilite" } }
{ "name": "consulter_parcoursup_stats", "arguments": { "formation": "licence informatique", "ville": "Lyon" } }
{ "name": "consulter_parcoursup_stats", "arguments": { "formation": "CPGE scientifique", "filiere": "CPGE", "limit": 5 } }获得护理
{ "name": "consulter_acces_soins", "arguments": { "commune": "Bondy" } }
{ "name": "consulter_acces_soins", "arguments": { "code_departement": "93" } }专业插入(Inserjeunes)
{ "name": "consulter_insertion_professionnelle", "arguments": { "ville": "Lyon", "limit": 5 } }
{ "name": "consulter_insertion_professionnelle", "arguments": { "uai": "0691723Y" } }
{ "name": "consulter_insertion_professionnelle", "arguments": { "recherche": "coiffure", "code_departement": "69" } }安全与犯罪
{ "name": "consulter_securite", "arguments": { "code_departement": "75" } }
{ "name": "consulter_securite", "arguments": { "commune": "Lyon" } }自然风险
{ "name": "consulter_risques_naturels", "arguments": { "commune": "Nimes" } }
{ "name": "consulter_risques_naturels", "arguments": { "code_insee": "75056" } }法律文本(Legifrance)
{ "name": "rechercher_texte_legal", "arguments": { "recherche": "protection donnees personnelles" } }
{ "name": "rechercher_texte_legal", "arguments": { "recherche": "teletravail", "champ": "TITLE" } }法律法规(Legifrance)
{ "name": "rechercher_code_juridique", "arguments": { "recherche": "contrat de travail", "code": "Code du travail" } }
{ "name": "rechercher_code_juridique", "arguments": { "recherche": "legitime defense", "code": "Code penal" } }
{ "name": "rechercher_code_juridique", "arguments": { "recherche": "1242", "code": "Code civil", "champ": "NUM_ARTICLE" } }法理学(Legifrance)
{ "name": "rechercher_jurisprudence", "arguments": { "recherche": "licenciement abusif" } }
{ "name": "rechercher_jurisprudence", "arguments": { "recherche": "clause abusive", "juridiction": "Cour de cassation", "publie_bulletin": true } }
{ "name": "rechercher_jurisprudence", "arguments": { "recherche": "prejudice moral", "juridiction": "Cours d'appel" } }官方公报(JORF)
{ "name": "consulter_journal_officiel", "arguments": { "recherche": "teletravail" } }
{ "name": "consulter_journal_officiel", "arguments": { "recherche": "loi finances", "type_texte": "LOI", "date_debut": "2024-01-01", "date_fin": "2024-12-31" } }
{ "name": "consulter_journal_officiel", "arguments": { "recherche": "protection donnees", "type_texte": "DECRET", "limit": 10 } }社会援助-CAF统计
{ "name": "consulter_aide_sociale", "arguments": { "commune": "Bondy" } }
{ "name": "consulter_aide_sociale", "arguments": { "code_departement": "93" } }
{ "name": "consulter_aide_sociale", "arguments": { "code_postal": "93140", "prestation": "RSA" } }公众游行(BOAMP)
{ "name": "rechercher_marche_public", "arguments": { "recherche": "travaux voirie", "departement": "35" } }
{ "name": "rechercher_marche_public", "arguments": { "type_avis": "AAC", "departement": "75" } }
{ "name": "rechercher_marche_public", "arguments": { "acheteur": "Departement du Rhone", "type_avis": "APC" } }法律公告(Bodacc)
{ "name": "rechercher_annonce_legale", "arguments": { "siren": "123456789" } }
{ "name": "rechercher_annonce_legale", "arguments": { "nom_entreprise": "SARL Martin" } }
{ "name": "rechercher_annonce_legale", "arguments": { "type_annonce": "procedure_collective", "departement": "69" } }查看ABC分区
{ "name": "consulter_zonage_immobilier", "arguments": { "commune": "Bordeaux" } }公社比较者
{ "name": "comparer_communes", "arguments": { "communes": ["Lyon", "Bordeaux", "Nantes"] } }Fiscalite地区
{ "name": "consulter_fiscalite_locale", "arguments": { "code_postal": "93140" } }
{ "name": "consulter_fiscalite_locale", "arguments": { "communes": ["PARIS", "LYON", "MARSEILLE"] } }交易不动产(DVF)
{ "name": "consulter_transactions_immobilieres", "arguments": { "commune": "Bondy", "type_local": "Appartement" } }
{ "name": "consulter_transactions_immobilieres", "arguments": { "commune": "Lyon", "evolution": true } }它是如何工作的
税务模拟器
VLC estimee = Surface ponderee x Tarif ajuste x Coef. entretien
Base imposable = VLC x 50 %
TF estimee = Base imposable x Taux global TFB (REI)- 地面被困人员 :地表适宜居住+同等舒适度
- 关税调整 :关税VLC国家x比率prix地方DVF/prix国家
- 科夫。采访 :根据财产的历史(0.90至1.15)
- TFB费率 :社区的真实投票率(来源:REI DGFIP)
公证费模拟器
Frais = DMTO + Emoluments TTC + CSI + Debours- 甲醇转化 :5.81%(旧利率,标准利率)或6.32%(2025年主要利率);0.71%(新)
- 薪酬 :裸度方案(3.87%->0.799%)+TVA 20%
- 犯罪现场调查 :价格的0.10%(最低15欧元)
- Debours :约1200欧元(估计)
所得税模拟器
Quotient familial = Revenu net imposable / Nombre de parts
IR brut = Bareme progressif applique au QF x Nombre de parts
IR net = IR brut - Decote (si applicable) + CEHR (si > 250k/500k)2025年(2024年收入):0%/11%/30%/41%/45%
支持的额外收入:土地(微型/卷轴)、可移动资本(PFU/BAREME)、微型BIC(50%)、微型BNC(34%)。
公司搜索
通过Siret、Siren或Name的企业搜索API(Dinum)进行搜索。将适用集体协议的法律形式、NAF、员工、经理、地址和字符串返回给Kali。
教育机构
data.education.gouv.fr的Explore API v2.1代理(国家教育目录,68000多家机构)。过滤器:城市、邮政编码、类型(学校/学院/高中)、状态(公共/私人)、名称。返回地址、联系人、教育途径、服务(餐饮、寄宿、ULIS、SEGPA)、部门(欧洲、国际、体育、艺术)。
高中成绩(IVAL)
DEPP的IVAL GT和PRO数据集代理(data.education.gouv.fr)。请求并行GT+PRO,按降序添加值排序。指标:bac成功率、附加值、第二bac访问率、提及率、按级别划分的员工人数。2012-2024年届会。
建筑
Cloudflare Workers (plan payant)
+-- Transport : Streamable HTTP (POST /mcp)
+-- D1 SQLite (fiches DILA)
| +-- fiches (~5 500 fiches pratiques)
| +-- fiches_fts (index FTS5, tokenize unicode61)
| +-- themes (304 themes hierarchiques)
| +-- sync_log (historique des synchronisations)
| +-- tool_stats (statistiques d'usage)
+-- Proxy API (temps reel, cache + retry)
| +-- data.economie.gouv.fr -> REI fiscalite locale + BOFiP
| +-- data.gouv.fr -> DVF transactions + Zonage ABC + KALI conventions
| +-- data.education.gouv.fr -> Annuaire etablissements + IVAL lycees + Evaluations nationales + Parcoursup + InserJeunes
| +-- georisques.gouv.fr -> Risques naturels GASPAR + Arretes CatNat
| +-- data.ameli.fr -> Acces aux soins (effectifs, densite, patientele MT)
| +-- api.piste.gouv.fr -> Legifrance (textes legaux, codes juridiques, jurisprudence, JORF)
| +-- data.caf.fr -> Statistiques CAF allocataires (RSA, APL, AAH, AF, prime d'activite)
| +-- boamp-datadila.opendatasoft.com -> Marches publics BOAMP (appels d'offres, attributions, MAPA, DSP)
| +-- bodacc-datadila.opendatasoft.com -> Annonces legales BODACC (immatriculations, radiations, cessions, procedures collectives)
| +-- geo.api.gouv.fr -> Resolution communes
| +-- recherche-entreprises.api.gouv.fr -> Fiche entreprise
| +-- API Annuaire -> services publics locaux
+-- Cron (0 6 * * *) -> sync quotidienne DILA资料来源
| 来源 | 类型 | 多尼斯 |
|---|---|---|
| Dila(Lecomarquage) | 每日拉链->D1 | 实用数据表,主题 |
| 目录API | 代理时间轴 | 本地公用事业 |
| data.economie.gouv.fr | 代理时间轴124Fiscalite locale(REI),BOFIP理论 | |
| data.gov.fr | 代理临时卷 | DVF交易、区域ABC、KALI惯例集合、SSMSI证券/脱钩 |
| geo.api.gouv.fr | 代理临时卷轴 | 解析公社(CP/INSEE/nom) |
| recherche-enterprises.api.gouv.fr | 代理时间卷轴 | |
| data.education.gouv.fr | 代理时间卷轴 | 学校目录、IVAL高中、国家评估6EME/CE2、Parcoursup培训、专业插入青年 |
| georisques.gouv.fr | 代理时间卷轴(API v1 Gaspar) | 自然和技术风险,按城市,自然灾害停止(CATNAT) |
| data.ameli.fr | 代理时间轴124获得护理:医生人数/密度、TM患者、初级设施、不足区域 | |
| api.piste.gouv.fr(DILA) | 代理时间卷轴(OAuth2) | Legifrance:法律文本(LODA)、法典(法典)、判例法(JURI/CAPP)、官方期刊(JORF) |
| data.caf.fr(CNAF) | 代理时间轴124按市/部门划分的caf受益人统计:RSA、APL/ALS/ALF、AAH、af、活动溢价。. | |
| boamp-datadila.opendatasoft.com(DILA) | 代理时间轴(opendatasoft v2.1) | boamp采购:招标、分配、MAPA、DSP-每日更新 |
| bodacc-datadila.opendatasoft.com(DILA) | 代理模板卷轴(opendatasoft v2.1) | bodacc法律注释:胃排空、辐射、切除、手术集合 |
| data.economie.gouv.fr | 代理时间轴(Opendatasoft v2.1) | 燃料价格瞬时流量:加油站,柴油价格/SP95/SP98/E10/E85/GPLC,每10分钟更新一次 |
端点
| 方法 | 路径 | 描述 |
|---|---|---|
| 职位 | /mcp | 端点MCP(JSON-RPC) |
| 得到 | /health | 服务运行状况、版本、工具、上次错误 |
| 得到 | / | 服务说明 |
| 得到 | /openapi.json | OpenAPI 3.1规范(公共、通用动态) |
| 得到 | /admin/dashboard | 带有统计信息的HTML仪表板(需要身份验证) |
| 得到 | /admin/dashboard/api | API JSON du dashboard(授权要求) |
| 职位 | /admin/sync/full | 同步完整DILA(需要身份验证) |
| 得到 | /admin/sync | 上次同步的状态(需要身份验证) |
开发
npm install
npm run dev # Serveur local
npx vitest run # Tests unitaires (~600 tests)
npm run typecheck # Verification TypeScript (0 erreurs)
npm run deploy # Deploiement Cloudflare堆叠技术
- Types/Cloudflare工作者
- D1 SQLite+FTS5
- 速度(单元测试)
- fflate(解压ZIP)
- 快速xml解析器(解析xml DILA)
- API:目录、data.economie.gouv.fr、data.gouv.fr、geo.api.gouv.fr、recherche-enterprises.api.gouv.fr
许可证
麻省理工学院
贡献
- 分叉回购
- 创建分支(
git checkout -b feature/mon-outil) - 遵循模式:1个文件=1个工具
src/tools/ - 将导入+定义+框添加到
src/index.ts - 将测试写入
src/tools/__tests__/ - 推
main->自动部署
