Geocontext

[DEV] An experimental MCP server providing spatial context for LLM.
  • typescript

3

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

This MCP server exposes spatial context data from the GeoPlatform to language models, enabling accurate geospatial grounding for questions related to places, coordinates, and administrative areas. It connects to spatial services in a lightweight, token-efficient way to improve factual correctness when users ask about locations, altitudes, cadastre, and administrative information.

How to use

Use this MCP server with an MCP client to answer location-based questions by routing geospatial service calls through the MCP server. You can configure the server in two common ways: a remote HTTP endpoint and a local stdio-based server that runs on your machine. The HTTP option connects to a remote MCP endpoint, while the stdio option runs a local instance of the server via a command you execute on your system.

Practical capabilities include geocoding place names to coordinates, obtaining altitude for a coordinate, and retrieving administrative, cadastral, and urban planning information for a location. You can also explore available spatial tables and their schemas, and fetch specific feature data from the GeoPlatform WFS services.

Two representative connection examples are shown below. The first uses the local stdio mode to run the server with an MCP tool, and the second configures an HTTP endpoint to communicate with a remote MCP instance.

{
  "mcpServers": {
    "geocontext": {
      "command": "npx",
      "args": ["-y", "@ignfab/geocontext"]
    }
  }
}
{
  "mcpServers": {
    "geocontext": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

How to install

Prerequisites: verify you have Node.js and npm installed on your system. If you prefer containerized execution, Docker is also supported for running the GeoContext MCP server.

Step 1. Install dependencies and build the local version.

git clone https://github.com/ignfab/geocontext
cd geocontext
npm install
npm run build

Step 2. Run the local server in stdio mode as described in the examples above. If you use the local build, start the server with the runtime command shown in the usage snippet.

Additional notes and configuration

Transport can be configured to use either stdio or http with the TRANSPORT_TYPE setting. The default is stdio.

If you choose the HTTP option, you will connect to a remote MCP endpoint URL like http://localhost:3000/mcp and interact with the server through that endpoint.

Features and endpoints you can rely on

Geospatial services you can query through the MCP server include: geocode for converting a place name to coordinates, altitude for obtaining elevation, adminexpress for administrative data, cadastre for cadastral details, urbanisme for urban planning documents, and assiette_sup for public utility servitudes.

You can explore the available vector data and their structures using WFS-related endpoints, such as gpf_wfs_list_types and gpf_wfs_describe_type, to understand what tables exist and what their schemas look like.

Troubleshooting and tips

If you encounter issues starting the local server, ensure you have network access for dependencies, and verify the command and arguments you are using match the runtime expectations.

Available tools

geocode

Convert a place name into geographic coordinates (lon, lat) using the GeoPlatform autocomplete service.

altitude

Retrieve the elevation for a given geographic coordinate (lon, lat) using the GeoPlatform altitude service.

adminexpress

Fetch administrative information (city, department, region, etc.) for a location identified by its coordinates.

cadastre

Get cadastral details (parcel, sheet, etc.) for a location based on its coordinates.

urbanisme

Obtain urban planning documents (PLU, POS, CC, PSMV) for a location.

assiette_sup

Retrieve Servitudes dUtilité Publique (SUP) information for a location.

gpf_wfs_list_types

List available WFS tables from the GeoPlatform (GetCapabilities) to explore data availability.

gpf_wfs_search_types

Search for specific WFS table types by keywords.

gpf_wfs_describe_type

Describe the schema of a specific WFS type (DescribeFeatureType) for understanding fields.

gpf_wfs_get_features

Fetch features from a WFS table (GetFeature) to retrieve data for a location.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Geocontext MCP Server - ignfab/geocontext | VeilStrat