Skip to main content
Glama

geocodage-mcp

Serveur MCP (Model Context Protocol) connecté à l'API de géocodage de la Géoplateforme (IGN).
Permet de géocoder des adresses, lieux (POI) et parcelles cadastrales françaises en temps réel, ainsi que de faire du géocodage inverse.

API publique, sans clé. Limite : 50 requêtes/seconde par IP.
Sources : BAN (adresses), BD TOPO® (POI), Parcellaire Express PCI (parcelles).

Prérequis

  • Node.js >= 18

Related MCP server: Geocode BAN MCP

Installation

npm install

Démarrage

node index.js

Le serveur communique via stdio et est prêt à être connecté à un client MCP.

Outils exposés

geocode

Géocodage direct via GET https://data.geopf.fr/geocodage/search.

Paramètres principaux :

Nom

Type

Requis

Description

q

string

oui

Chaîne à géocoder (adresse, lieu, référence cadastrale)

index

string

non

Index : address (défaut), poi, parcel

limit

number

non

Nombre de résultats (1–50, défaut : 10)

lat / lon

number

non

Point de proximité pour favoriser les résultats proches

autocomplete

"0" / "1"

non

Active l'autocomplétion (défaut : "1")

returntruegeometry

boolean

non

Retourne la vraie géométrie

postcode

string

non

Filtre code postal (address, poi)

citycode

string

non

Filtre code INSEE (address, poi)

depcode

string

non

Filtre code département (address, poi)

type

string

non

Type d'adresse : housenumber, street, locality, municipality

city

string

non

Filtre par commune

category

string

non

Filtre catégorie POI (poi uniquement)

departmentcode / municipalitycode / section / number / sheet

string

non

Filtres cadastraux (parcel uniquement)

Exemples de requêtes :

  • q=10 rue de la Paix Paris

  • q=cimetière Vincennes, index=poi

  • q=75056104AE0003, index=parcel


geocode_reverse

Géocodage inverse via GET https://data.geopf.fr/geocodage/reverse.

Paramètres principaux :

Nom

Type

Requis

Description

lon

number

oui*

Longitude du point de recherche

lat

number

oui*

Latitude du point de recherche

searchgeom

string

non

Géométrie JSON (Point, Circle, Polygon, LineString). Si fournie, lon/lat servent à l'ordonnancement

index

string

non

address, poi, parcel

limit

number

non

1–50, défaut 10

type

string

non

Filtre type d'adresse (address)

city / postcode / citycode

string

non

Filtres address/poi

category

string

non

Filtre catégorie POI

* Requis si searchgeom absent.

Exemple Circle :

{ "type": "Circle", "coordinates": [2.294469, 48.858244], "radius": 100 }

geocode_capabilities

Retourne les capacités de l'API via GET https://data.geopf.fr/geocodage/getCapabilities : opérations disponibles, index, champs interrogeables, valeurs de catégories POI, etc.

Aucun paramètre requis.


Structure du projet

geocodage-mcp/
├── index.js              # Entrée MCP : déclaration des outils + connexion stdio
├── package.json
└── src/
    ├── client.js         # Client HTTP fetch vers l'API Géoplateforme
    └── tools/
        ├── search.js     # Schéma Zod + handler geocode
        ├── reverse.js    # Schéma Zod + handler geocode_reverse
        └── capabilities.js  # Handler geocode_capabilities

Intégration

{
  "servers": {
    "geocodage": {
      "type": "stdio",
      "command": "node",
      "args": ["/chemin/vers/geocodage-mcp/index.js"]
    }
  }
}

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "geocodage": {
      "command": "node",
      "args": ["/chemin/vers/geocodage-mcp/index.js"]
    }
  }
}

Exemple de recherche

Configuration : geocodage MCP Tools

Requête initiale :

10 rue du chateau avec @mcp:geocodage: ?

Used MCP tool: geocodage/geocode

En cherchant "10 rue du chateau" sans préciser de ville avec l'outil MCP geocodage, l'API retourne plusieurs correspondances possibles, car c'est une adresse très courante en France.

Voici les 5 correspondances les plus pertinentes :

  1. 10 Rue du Château, 92600 Asnières-sur-Seine

    • Longitude : 2.28736

    • Latitude : 48.906493

  2. 10 rue du Château, 29200 Brest

    • Longitude : -4.490812

    • Latitude : 48.383654

  3. 10 Rue du Château, 44000 Nantes

    • Longitude : -1.552009

    • Latitude : 47.216291

  4. 10 Rue du Chateau, 21000 Dijon

    • Longitude : 5.037218

    • Latitude : 47.323033

  5. 10 Rue du Château, 92500 Rueil-Malmaison

    • Longitude : 2.180793

    • Latitude : 48.875649

Souhaitez-vous préciser une ville ou un code postal pour affiner ce résultat, ou cherchez-vous les coordonnées d'une de ces villes en particulier ?

et à Seurre ?

Pour le 10 Rue du Château à Seurre (21250), l'outil MCP geocodage trouve bien cette adresse unique. Voici les coordonnées précises :

  • Longitude : 5.145836

  • Latitude : 46.997484

Si vous souhaitez visualiser cette position exacte sur une carte (avec un fort niveau de zoom), voici les liens d'accès direct correspondants :

Available Tools

3 tools
geocodeB

Géocode une chaîne de caractères (adresse, lieu ou parcelle cadastrale) via l'API Géoplateforme de l'IGN. Retourne une FeatureCollection GeoJSON.

ParametersJSON Schema
NameRequiredDescriptionDefault
qYesChaîne décrivant la localisation à rechercher (adresse, lieu, parcelle). Exemple : '10 rue de la Paix Paris', 'cimetière Vincennes', '75056104AE0003'.
latNoLatitude d'un point pour favoriser les candidats les plus proches.
lonNoLongitude d'un point pour favoriser les candidats les plus proches.
cityNoFiltre par nom de commune (address, poi). Ex : 'Dijon'.
typeNoFiltre par type d'adresse (address uniquement) : 'housenumber', 'street', 'locality', 'municipality'.
indexNoIndex de recherche : 'address' (défaut), 'poi' (lieux/POI), 'parcel' (parcelles cadastrales).
limitNoNombre maximum de résultats (1–50, défaut : 10).
sheetNoFiltre par feuille cadastrale (parcel).
numberNoFiltre par numéro de parcelle (parcel). Ex : '0133'.
depcodeNoFiltre par code département (address, poi). Ex : '75'.
sectionNoFiltre par section cadastrale (parcel). Ex : 'AV'.
categoryNoFiltre par catégorie de POI (poi uniquement, valeurs listées dans getCapabilities). Plusieurs valeurs séparées par des virgules.
citycodeNoFiltre par code INSEE de commune (address, poi). Ex : '75113'.
postcodeNoFiltre par code postal (address, poi). Ex : '75013'.
autocompleteNoActive (1) ou désactive (0) l'autocomplétion (défaut : 1).1
departmentcodeNoFiltre par code département (parcel). Ex : '21'.
municipalitycodeNoFiltre par code commune (parcel). Ex : '231'.
returntruegeometryNoRetourne la vraie géométrie de l'objet (limite le résultat à 20).

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the output format (FeatureCollection GeoJSON) and the data source (IGN Géoplateforme API), but it does not explicitly state that the tool is read-only, nor does it mention any rate limits, geographic scope (likely limited to France), or other behavioral traits beyond the return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: one sentence for the main action and one for the output. It front-loads the core purpose with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 18 parameters, no output schema, and no annotations, the description is too sparse. It does not explain typical usage, parameter interactions, or the structure of the returned FeatureCollection. It lacks completeness for a complex geocoding tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 18 parameters well. The description adds no additional meaning beyond the schema, only stating it geocodes a string. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool geocodes a string (address, place, or cadastral parcel) via the IGN Géoplateforme API and returns a FeatureCollection GeoJSON. However, it does not explicitly differentiate from sibling tools like geocode_reverse or geocode_capabilities, though the forward geocoding purpose is implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool or when not to use it. It does not mention alternative tools for reverse geocoding or capabilities retrieval, which would be helpful given the sibling tools exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

geocode_capabilitiesA

Retourne les capacités de l'API Géoplateforme : opérations disponibles, index et champs interrogeables, catégories de POI, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided. The description indicates it returns data but does not explicitly state it is read-only or non-destructive. For a simple read operation, the transparency is adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is concise and front-loaded. It could be slightly more structured, but it efficiently communicates the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description is mostly complete. It covers the main aspects of what is returned, though the trailing 'etc.' leaves some vagueness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters (0 params), so the baseline is 4. The description adds meaning by explaining what the output contains (operations, indexes, categories), which adds value beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns capabilities of the Géoplateforme API, listing specific elements like operations, indexes, and POI categories. This distinguishes it from sibling tools 'geocode' and 'geocode_reverse', which perform actual geocoding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for obtaining API capabilities, likely before using geocode or geocode_reverse. However, it does not explicitly state when to use it versus alternatives or provide any exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

geocode_reverseB

Géocodage inverse via l'API Géoplateforme de l'IGN : retourne les adresses/lieux/parcelles les plus proches d'un point géographique (lon/lat) ou d'une géométrie (cercle, polygone…).

ParametersJSON Schema
NameRequiredDescriptionDefault
latYesLatitude du point de recherche (ou d'ordonnancement si searchgeom est fourni). Ex : 47.330361.
lonYesLongitude du point de recherche (ou d'ordonnancement si searchgeom est fourni). Ex : 5.022839.
cityNoFiltre par nom de commune.
typeNoFiltre par type d'adresse (address uniquement).
indexNoIndex de recherche : 'address' (défaut), 'poi', 'parcel'. Plusieurs valeurs possibles séparées par une virgule.
limitNoNombre maximum de résultats (1–50, défaut : 10).
numberNoFiltre par numéro de parcelle (parcel).
sectionNoFiltre par section cadastrale (parcel).
categoryNoFiltre par catégorie de POI (poi uniquement).
citycodeNoFiltre par code INSEE (address, poi).
postcodeNoFiltre par code postal (address, poi).
searchgeomNoGéométrie de recherche au format JSON (Point, LineString, Polygon, Circle). Si absent, lon/lat définissent le point de recherche. Exemple Circle : '{"type":"Circle","coordinates":[2.294469,48.858244],"radius":100}'.
departmentcodeNoFiltre par code département (parcel).
municipalitycodeNoFiltre par code commune (parcel).
returntruegeometryNoRetourne la vraie géométrie de l'objet.

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description bears full responsibility. It states the tool returns the closest addresses/places/parcels and accepts point or geometry input, but does not disclose rate limits, authentication requirements, default behavior (e.g., index default), or error handling. It is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, very concise with no redundant information. It front-loads the purpose and API source. However, for a tool with 15 parameters, a bulleted list of return types or key options could improve scannability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (15 params, no output schema, no annotations), the description lacks explanation of default index (address), the difference between point and geometry search, or what the results contain. It is moderately complete but leaves gaps that the rich parameter schema partially fills.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds overall context (e.g., searchgeom can be Circle) but does not provide new meaning beyond the detailed parameter descriptions in the schema. It rephrases but does not deepen understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as reverse geocoding via the IGN API, specifying it returns addresses, places, and parcels closest to a geographic point or geometry. It distinguishes itself from sibling tools (e.g., geocode, which likely does forward geocoding) by explicitly stating 'reverse geocoding'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool compared to siblings (geocode, geocode_capabilities) or when not to use it. It does not mention prerequisites, alternatives, or context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv2.0.0
    • First observedgeocode
    • First observedgeocode_capabilities
    • First observedgeocode_reverse

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: forward geocoding, reverse geocoding, and API capabilities. No overlap.

Naming Consistency5/5

All tool names follow the 'geocode' prefix with a descriptive suffix (geocode, geocode_reverse, geocode_capabilities), creating a predictable pattern.

Tool Count4/5

Three tools is minimal but sufficient for a geocoding server, covering forward, reverse, and capabilities. Slightly on the low end but appropriate for the domain.

Completeness4/5

Essential geocoding operations (forward and reverse) are present, along with capabilities. Missing batch or autocomplete, but core workflow is covered.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    An experimental MCP server providing spatial context for LLMs by interfacing with French Geoplateforme services. It enables tasks such as geocoding, altitude lookups, and querying administrative, cadastral, or urban planning data.
    11
    4
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    This MCP server enables geocoding of French addresses using the official Base Adresse Nationale (BAN) API. It allows users to retrieve standardized addresses, GPS coordinates, and map visualization links directly within Claude.
    -
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server providing geocoding and place discovery services via Nominatim and OpenStreetMap. It enables users to perform forward and reverse geocoding, extract bounding boxes, and find nearby places or administrative hierarchies.
    10
    Apache 2.0