Résultats des élections françaises 1999-2026 par bureau de vote, socio-démo INSEE et cartes.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Crée un tableau de données formaté à partir de données structurées. Utile pour présenter des résultats calculés ou combinés. Retourne un tableau texte formaté.
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
Crée un tableau de données formaté à partir de données structurées. Utile pour présenter des résultats calculés ou combinés. Retourne un tableau texte formaté.
| Argument | Type | Description |
|---|---|---|
| rows* | array | |
| title* | string | |
| columns* | array | |
| description | any |
{
"type": "object",
"title": "create_data_tableArguments",
"required": [
"title",
"columns",
"rows"
],
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"title": "Rows"
},
"title": {
"type": "string",
"title": "Title"
},
"columns": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"title": "Columns"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description",
"default": null
}
}
}Exporte des données électorales vers un fichier téléchargeable (CSV, JSON, TSV). Deux modes : data (contenu inline) ou source_path (chemin vers fichier existant).
| Argument | Type | Description |
|---|---|---|
| data | any | |
| filename* | string | |
| file_format | string | |
| source_path | any |
{
"type": "object",
"title": "export_dataArguments",
"required": [
"filename"
],
"properties": {
"data": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Data",
"default": null
},
"filename": {
"type": "string",
"title": "Filename"
},
"file_format": {
"type": "string",
"title": "File Format",
"default": "csv"
},
"source_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Path",
"default": null
}
}
}Génère une carte électorale (PNG) pour une élection. Paramètres : - election_id : identifiant élection (ex: '2024_legi_t1', '2020_muni_t2') - metric : 'family' (famille politique en tête), 'nuance' (score d'une nuance), 'abstention' (abstentions / inscrits) ou 'participation' (votants / inscrits). Abstention et participation sont en % des inscrits ; au-dessus du bureau, somme des abstentions (ou votants) sur la somme des inscrits. - geography : 'bv' (bureau de vote, défaut) ou 'commune' (carte nationale) - department : code département (ex: '13'). Requis pour geography='bv' sauf si commune fourni. - commune : code commune (ex: '13055' pour Marseille). Centre la carte sur cette commune. - nuance : code nuance quand metric='nuance' (ex: 'RN', 'LFI', 'ENS') - region : code région pour geography='commune' (ex: '93' pour PACA) Exemples : - Carte par famille, Bouches-du-Rhône : election_id='2024_legi_t1', department='13' - Carte score RN, Marseille : election_id='2024_legi_t1', commune='13055', metric='nuance', nuance='RN' - Carte nationale : election_id='2024_euro_t1', geography='commune' - Carte d'abstention, Marseille : election_id='2024_legi_t1', commune='13055', metric='abstention' - Participation par commune, Bouches-du-Rhône : election_id='2024_legi_t1', geography='commune', department='13', metric='participation'
| Argument | Type | Description |
|---|---|---|
| canton | any | |
| metric | string | |
| nuance | any | |
| region | any | |
| commune | any |
Requête les divisions administratives françaises. Actions : search_commune, get_commune, search_postal, list_epci, get_epci, list_cantons, list_departements, list_regions.
| Argument | Type | Description |
|---|---|---|
| action* | string | |
| epci_code | any | |
| postal_code | any | |
| search_term | any | |
| commune_code | any | |
| departement_code | any |
{
"type": "object",
"title": "query_adminArguments",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"title": "Action"
},
"epci_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Epci Code",
"default": null
},
"postal_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Postal Code",
"default": null
},
"search_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search Term",
"default": null
},
"commune_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Code",
"default": null
},
"departement_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Departement Code",
"default": null
}
}
}Requête les données DLP (composition sociale des candidats municipaux 2020). ~546 000 candidats dans ~10 000 communes (≥1 000 hab.). Classes : CDOM (dominant), CMOY (moyen), CSUB (subalterne), RET (retraité), AUTRES. Actions : summary, composition, parite, listes, candidats, professions, sortants.
| Argument | Type | Description |
|---|---|---|
| sexe | any | |
| action* | string | |
| classe | any | |
| search | any | |
| tetes_only | boolean | |
| commune_code | any | |
| sortants_only | boolean | |
| departement_code | any |
{
"type": "object",
"title": "query_dlpArguments",
"required": [
"action"
],
"properties": {
"sexe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sexe",
"default": null
},
"action": {
"type": "string",
"title": "Action"
},
"classe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Classe",
"default": null
},
"search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search",
"default": null
},
"tetes_only": {
"type": "boolean",
"title": "Tetes Only",
"default": false
},
"commune_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Code",
"default": null
},
"sortants_only": {
"type": "boolean",
"title": "Sortants Only",
"default": false
},
"departement_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Departement Code",
"default": null
}
}
}Requête les données électorales françaises (1999-2026). Niveaux territoriaux : NATIONAL (aucun filtre), RÉGIONAL (region_code), DÉPARTEMENTAL (departement_code), COMMUNAL (commune_code). Actions de base : list_elections, query_results, list_bureaux, query_bureau, query_by_bureau, rank_bureaux, list_circonscriptions, query_circonscription, list_cantons, query_canton, search_candidate, query_candidatures, etc. Actions « panel » (1 appel = analyse complète, évite les boucles) : - compare_elections : compare deux scrutins pour un territoire (election_id + compare_to_election + commune_code|departement_code, candidate_name optionnel). - query_all_circonscriptions : vainqueur de CHAQUE circonscription d'un territoire en un appel (election_id + commune_code|departement_code, législatives uniquement). - vote_reserve : score d'une famille + abstention par bureau de vote sur les scrutins récents comparables (commune_code + famille). - select_communes : sélectionne/classe des communes par critères géo + population + électoraux (region_code/departement_code/epci/commune_codes, population_min/max, commune_metric, condition, sort_by, limit, order ; commune_metric/condition nécessitent election_id). commune_metric accepte PLUSIEURS métriques séparées par des virgules — une colonne chacune, en un seul appel ; condition et sort_by portent alors sur la première. - cross_election_panel : évolution d'un sujet (famille ou nuance_code) par commune sur N scrutins (elections=ids séparés par des virgules + scope optionnel commune_code/departement_code/region_code/commune_codes ; SANS scope = national, panel complet en data_file). Renvoie aussi « ensemble » : score du périmètre entier par scrutin + delta, pondéré par les exprimés — ne pas boucler par département. famille et nuance_code acceptent PLUSIEURS sujets séparés par des virgules ('Gauche,Droite') : tous en un appel, agrégats dans « ensembles ». group_by='region'| 'departement' ajoute un agrégat pondéré PAR MAILLE dans le même appel — ne jamais boucler un appel par région. - bureau_breakdown : pivot par bureau (top_n nuances/blocs + participation, with_sociodem optionnel) pour commune_code + election_id.
Requête les élus de la République française (base BRÉF). Actions : search_elu, list_mandate_types, list_elus.
| Argument | Type | Description |
|---|---|---|
| action* | string | |
| search_term | any | |
| mandate_type | any | |
| departement_code | any |
{
"type": "object",
"title": "query_elusArguments",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"title": "Action"
},
"search_term": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search Term",
"default": null
},
"mandate_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Mandate Type",
"default": null
},
"departement_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Departement Code",
"default": null
}
}
}Requête les données socio-démographiques au niveau bureau de vote. Données INSEE RP 2022 + Filosofi 2021, interpolées IRIS→BDV. Actions : list_variables, profile, indices, rank, compare.
| Argument | Type | Description |
|---|---|---|
| order | any | |
| action* | string | |
| variable | any | |
| commune_code | any | |
| commune_codes | any |
{
"type": "object",
"title": "query_sociodemArguments",
"required": [
"action"
],
"properties": {
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Order",
"default": null
},
"action": {
"type": "string",
"title": "Action"
},
"variable": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Variable",
"default": null
},
"commune_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Code",
"default": null
},
"commune_codes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Codes",
"default": null
}
}
}Exécute une requête SQL directe sur la base DuckDB (read-only). Tables principales : - general_results : résultats généraux par bureau de vote - candidats_results : résultats par candidat par bureau de vote - elections_disponibles : liste des élections (id_election, nb_bureaux, total_inscrits) - candidats_avec_nuances : candidats avec famille politique (si nuances enrichies) - resultats_par_famille : résultats agrégés par famille politique - communes, epci, departements, regions : divisions administratives - bv_sociodemographique : données socio-démo par bureau de vote ATTENTION — colonnes de general_results (noms avec espaces, à quoter) : id_election, id_brut_miom, "Code du département", "Code de la commune" (SANS préfixe dept, ex: '055' pour Marseille), "Libellé de la commune", Inscrits, Abstentions, Votants, Blancs, Nuls, Exprimés. PRÉFÉRER query_elections pour les analyses standard — query_sql est pour les requêtes ad hoc avancées. Exemple : SELECT id_election, ROUND(100.0 * SUM(Abstentions) / NULLIF(SUM(Inscrits), 0), 1) as abstention_pct FROM general_results WHERE "Code du département" = '13' AND "Code de la commune" = '055' GROUP BY id_election ORDER BY id_election DESC LIMIT 5
| Argument | Type | Description |
|---|---|---|
| query* | string |
{
"type": "object",
"title": "query_sqlArguments",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"title": "Query"
}
}
}Simule les scénarios de fusion de listes municipales entre T1 et T2. Actions : 'status' (classer les listes après T1), 'simulate' (projections T2). Uniquement pour les élections municipales.
| Argument | Type | Description |
|---|---|---|
| action* | string | |
| election_id* | string | |
| report_rate | number | |
| commune_code* | string |
{
"type": "object",
"title": "simulate_fusionsArguments",
"required": [
"action",
"election_id",
"commune_code"
],
"properties": {
"action": {
"type": "string",
"title": "Action"
},
"election_id": {
"type": "string",
"title": "Election Id"
},
"report_rate": {
"type": "number",
"title": "Report Rate",
"default": 0.75
},
"commune_code": {
"type": "string",
"title": "Commune Code"
}
}
}Crée une visualisation Plotly (retourne le spec JSON). Deux modes : - Spec libre : fournir 'spec' (dict Plotly complet {data, layout}) - Assisté : fournir chart_type + data + mappings Types supportés : bar, line, scatter, histogram, box, violin, heatmap, treemap, grouped_bar, stacked_bar, dumbbell, diverging_bar, dual_axis (x + y + y2), sankey (source + target + values), hemicycle (x=groupe, y=sièges), ternary (a + b + c = trois parts). Paramètres transversaux : subtitle (sous-titre technique), reference_line ({value, label, orientation}) pour un seuil/référence.
| Argument | Type | Description |
|---|---|---|
| a | any | |
| b | any | |
| c | any | |
| x | any | |
| y | any | |
| z | any | |
| y2 | any | |
| data | any | |
| path | any | |
| size | any | |
| geography | string |
| department | any |
| election_id* | string |
| circonscription | any |
{
"type": "object",
"title": "generate_mapArguments",
"required": [
"election_id"
],
"properties": {
"canton": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Canton",
"default": null
},
"metric": {
"type": "string",
"title": "Metric",
"default": "family"
},
"nuance": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Nuance",
"default": null
},
"region": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Region",
"default": null
},
"commune": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune",
"default": null
},
"geography": {
"type": "string",
"title": "Geography",
"default": "bv"
},
"department": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Department",
"default": null
},
"election_id": {
"type": "string",
"title": "Election Id"
},
"circonscription": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Circonscription",
"default": null
}
}
}| Argument | Type | Description |
|---|
| epci | any | |
| tour | any | |
| limit | any | |
| order | any | |
| top_n | any | |
| action* | string | |
| offset | any | |
| famille | any | |
| sort_by | any | |
| group_by | any | |
| bureau_id | any | |
| by_family | boolean | |
| condition | any | |
| elections | any | |
| bureau_code | any | |
| canton_code | any | |
| election_id | any | |
| family_name | any | |
| list_search | any | |
| nuance_code | any | |
| rank_metric | any | |
| region_code | any | |
| commune_code | any | |
| nuance_level | any | |
| scrutin_type | any | |
| commune_codes | any | |
| with_sociodem | boolean | |
| candidate_name | any | |
| commune_metric | any | |
| population_max | any | |
| population_min | any | |
| candidate_query | any | |
| use_ferd_coding | boolean | |
| candidate_search | any | |
| departement_code | any | |
| compare_to_election | any | |
| circonscription_code | any |
{
"type": "object",
"title": "query_electionsArguments",
"required": [
"action"
],
"properties": {
"epci": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Epci",
"default": null
},
"tour": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Tour",
"default": null
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Limit",
"default": null
},
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Order",
"default": null
},
"top_n": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Top N",
"default": null
},
"action": {
"type": "string",
"title": "Action"
},
"offset": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Offset",
"default": null
},
"famille": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Famille",
"default": null
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sort By",
"default": null
},
"group_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Group By",
"default": null
},
"bureau_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Bureau Id",
"default": null
},
"by_family": {
"type": "boolean",
"title": "By Family",
"default": false
},
"condition": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Condition",
"default": null
},
"elections": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Elections",
"default": null
},
"bureau_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Bureau Code",
"default": null
},
"canton_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Canton Code",
"default": null
},
"election_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Election Id",
"default": null
},
"family_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Family Name",
"default": null
},
"list_search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "List Search",
"default": null
},
"nuance_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Nuance Code",
"default": null
},
"rank_metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Rank Metric",
"default": null
},
"region_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Region Code",
"default": null
},
"commune_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Code",
"default": null
},
"nuance_level": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Nuance Level",
"default": null
},
"scrutin_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scrutin Type",
"default": null
},
"commune_codes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Codes",
"default": null
},
"with_sociodem": {
"type": "boolean",
"title": "With Sociodem",
"default": false
},
"candidate_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Candidate Name",
"default": null
},
"commune_metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Commune Metric",
"default": null
},
"population_max": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Population Max",
"default": null
},
"population_min": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Population Min",
"default": null
},
"candidate_query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Candidate Query",
"default": null
},
"use_ferd_coding": {
"type": "boolean",
"title": "Use Ferd Coding",
"default": false
},
"candidate_search": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Candidate Search",
"default": null
},
"departement_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Departement Code",
"default": null
},
"compare_to_election": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Compare To Election",
"default": null
},
"circonscription_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Circonscription Code",
"default": null
}
}
}| spec |
| any |
| color | any |
| title | any |
| source | any |
| target | any |
| values | any |
| subtitle | any |
| data_file | any |
| chart_type | any |
| reference_line | any |
{
"type": "object",
"title": "visualizeArguments",
"properties": {
"a": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "A",
"default": null
},
"b": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "B",
"default": null
},
"c": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "C",
"default": null
},
"x": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "X",
"default": null
},
"y": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Y",
"default": null
},
"z": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Z",
"default": null
},
"y2": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Y2",
"default": null
},
"data": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
{
"type": "null"
}
],
"title": "Data",
"default": null
},
"path": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"title": "Path",
"default": null
},
"size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Size",
"default": null
},
"spec": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"title": "Spec",
"default": null
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Color",
"default": null
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Title",
"default": null
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source",
"default": null
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Target",
"default": null
},
"values": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Values",
"default": null
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subtitle",
"default": null
},
"data_file": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Data File",
"default": null
},
"chart_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Chart Type",
"default": null
},
"reference_line": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"title": "Reference Line",
"default": null
}
}
}