@thinkgeo/gisserver-mcp
v0.0.3
Published
MCP (stdio) server that scaffolds and validates a ThinkGeo.GisServer (.NET 8) project from raster data or MBTiles, with enforced sample pruning.
Maintainers
Readme
ThinkGeo.GisServer MCP (stdio)
This project is a local MCP server (stdio transport) that helps MCP-capable AI clients (for example, Claude Code / Claude Desktop) scaffold and validate a .NET 8 GIS Server based on ThinkGeo.GisServer, using either raster data (for example GeoTIFF) or MBTiles.
It exposes a small, task-level toolset:
- Create a workspace
- Ingest data (raster or MBTiles)
- Create a server project (based on ThinkGeo's official sample template)
- Ensure ThinkGeo.GisServer NuGet package reference
- Copy data into the server project and configure services
dotnet restore+dotnet build- Smoke-test enabled endpoints (WMS / WMTS / XYZ, and MVT when using vector MBTiles)
Scope (v0.0.3)
v0.0.3 guarantee: no unintended sample leakage
v0.0.3 makes the MCP authoritative over the generated server project.
When you scaffold a server for MBTiles or Raster, the MCP will automatically and non-optionally prune unrelated ThinkGeo sample modules (especially Shapefile/Shapes demos and WorldMapKit demos) and patch startup registration so only the selected data source and enabled services are registered.
This is enforced inside the MCP tools (not left to AI discipline).
Supported data sources:
- Raster data (non-MBTiles) — e.g. GeoTIFF (and other raster formats supported by the official ThinkGeo samples)
- MBTiles — raster MBTiles and vector MBTiles
Supported service types:
- WMS
- WMTS
- XYZ
- MVT (only when the MBTiles input is vector tiles)
Explicitly not supported in v0.0.3:
- Shapefile, GeoJSON, or other raw vector sources
- Vector preprocessing, reprojection pipelines, feature-level query APIs (WFS-like)
- Styling DSLs / user-defined rendering parameters
- Persistent disk caching, tile baking, or pre-rendering
Rendering is on-demand and follows default styles from ThinkGeo samples (no custom styling configuration).
Note: The server project template is pulled from ThinkGeo's public thinkgeo-gis-server GitLab repository at runtime.
Requirements
- Node.js 18+
- .NET SDK 8.0+
- Network access for:
- Downloading ThinkGeo sample sources and demo.mbtiles from GitLab
- Restoring NuGet packages from nuget.org
Install
Option A: Install from npm (recommended)
npm install -g @thinkgeo/gisserver-mcpOption B: Install from a local folder
npm install -g /ABSOLUTE/PATH/TO/thinkgeo-gisserver-mcpOption C: Run without installing globally
node /ABSOLUTE/PATH/TO/thinkgeo-gisserver-mcp/src/index.jsConfigure your MCP client
Configure your MCP client to launch this server as a local process (stdio).
Example (conceptual):
{
"mcpServers": {
"thinkgeo-gisserver": {
"command": "tg-gisserver-mcp"
}
}
}Refer to your client's MCP documentation for the exact config file and format.
Example user prompts (for the AI client)
Recommended: use the single safe entrypoint
For best results (especially when driven by an AI agent), use the high-level tool:
tg.scaffold_server
It performs the full sequence and enforces correctness internally: ingest -> configure -> prune samples -> build -> smoke test.
The lower-level tools remain available for compatibility, but v0.0.3 guarantees that sample pruning is enforced inside the MCP.
Recommended for AI agents: use tg.scaffold_server as a single safe entrypoint.
Use demo MBTiles:
- "Create a .NET GIS Server using the demo MBTiles and expose WMS/WMTS/XYZ."
Use your own vector MBTiles:
- "Create a .NET GIS Server that provides WMS + WMTS + XYZ + MVT, using my C:\data\vector.mbtiles."
Use your own raster MBTiles:
- "Create a .NET GIS Server that provides WMS + WMTS + XYZ, using my C:\data\raster.mbtiles. (No MVT.)"
Use your own raster (GeoTIFF):
- "Create a .NET GIS Server that serves WMS + WMTS + XYZ from my C:\data\imagery.tif."
Output you should expect
After a successful run, the AI should provide:
Project path
How to run it (typically
dotnet run)Example URLs:
- XYZ:
http://localhost:PORT/tiles/0/0/0 - WMS Capabilities:
http://localhost:PORT/wms?SERVICE=WMS&REQUEST=GetCapabilities - WMTS Capabilities:
http://localhost:PORT/wmts?SERVICE=WMTS&REQUEST=GetCapabilities - MVT (vector MBTiles only):
http://localhost:PORT/mvt/0/0/0
- XYZ:
ThinkGeo licensing
This repository (the MCP server implementation) is licensed under MIT.
However, it scaffolds projects that reference ThinkGeo.GisServer and other ThinkGeo NuGet packages, which are commercial software and not covered by this repo's MIT license.
If you see watermarks or runtime failures when running the generated server (especially with a debugger attached), you likely need a valid ThinkGeo trial or commercial license.
See:
docs/THINKGEO_LICENSE.md
Third-party materials
At runtime, this MCP server may download:
- ThinkGeo sample source code (project template)
- ThinkGeo
demo.mbtiles(when you choosesource=demo)
These materials are downloaded from ThinkGeo’s public repositories at runtime (they are not bundled with this npm package) and are governed by ThinkGeo’s own terms.
Developer documentation
See docs/DEVELOPER.md.
