Model Context Protocol server for Township America — PLSS tools for AI agents
Project description
townshipamerica-mcp
Model Context Protocol (MCP) server that exposes Township America's PLSS conversion to AI agents — Claude, ChatGPT, Cursor, GitHub Copilot, Windsurf, or any MCP-compatible client.
Also includes a Python client (TownshipMCPClient) for scripts and notebooks, backed by the townshipamerica SDK.
API Documentation · GitHub · PyPI
Installation
pip install townshipamerica-mcp
Requires Python 3.10+. You also need a Township America API key — get one at townshipamerica.com/api.
MCP server (Claude Desktop, Cursor, etc.)
Set your API key:
export TOWNSHIP_AMERICA_API_KEY="ta_…"
Tools
| Tool | Purpose |
|---|---|
plss_to_coordinates |
Convert a PLSS legal description to GPS coordinates |
coordinates_to_plss |
Reverse-lookup coordinates to a PLSS description |
plss_to_geojson |
Return the section/quarter/aliquot polygon as GeoJSON |
validate_description |
Check whether a PLSS string is valid + normalized form |
batch_convert |
Process multiple descriptions in one call (up to 100) |
autocomplete |
Get suggestions for partial PLSS input |
Coverage: 30 PLSS states, 37 principal meridians. Powered by BLM CadNSDI V2.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"townshipamerica": {
"command": "townshipamerica-mcp",
"env": {
"TOWNSHIP_AMERICA_API_KEY": "ta_…"
}
}
}
}
Cursor / VS Code / Continue
{
"mcpServers": {
"townshipamerica": {
"command": "townshipamerica-mcp",
"env": { "TOWNSHIP_AMERICA_API_KEY": "ta_…" }
}
}
}
Stdio (any MCP client)
TOWNSHIP_AMERICA_API_KEY=ta_… townshipamerica-mcp
Environment variables
| Variable | Default | Purpose |
|---|---|---|
TOWNSHIP_AMERICA_API_KEY |
(required) | Your API key |
TOWNSHIP_AMERICA_BASE_URL |
https://developer.townshipamerica.com |
Override the API endpoint |
MCP_LOG_LEVEL |
INFO |
Log level for stderr (DEBUG / INFO / WARNING / ERROR) |
Python client
For programmatic use without an MCP host:
from townshipamerica_mcp import TownshipMCPClient
client = TownshipMCPClient(api_key="ta_…")
result = client.plss_to_coordinates("NW 25 24N 1E 6th Meridian")
print(result.lat, result.lng)
result = client.coordinates_to_plss(lat=44.5, lng=-110.3)
print(result.legal_location)
v = client.validate_description("NW 25 24N 1E 6th Meridian")
print(v.valid, v.normalized)
batch = client.batch_convert(["NW 25 24N 1E 6th Meridian", "SE 12 4N 5E Boise Meridian"])
print(batch.converted, batch.failed)
with TownshipMCPClient(api_key="ta_…") as client:
geojson = client.plss_to_geojson("NW 25 24N 1E 6th Meridian")
For full SDK features (async, GeoPandas-friendly models), use pip install townshipamerica from python-sdk.
Exceptions
| Exception | Trigger |
|---|---|
AuthenticationError |
Invalid or missing API key |
QuotaExceededError |
Rate limit / quota exceeded |
NotFoundError |
Location not in PLSS database |
ValidationError |
Malformed request |
TownshipMCPError |
Base class / other errors |
License
MIT — see LICENSE.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file townshipamerica_mcp-1.0.0.tar.gz.
File metadata
- Download URL: townshipamerica_mcp-1.0.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32b9be1390efbba7659bbd69fdfd18446737947b88ef3cd7fb9fbbe143511f59
|
|
| MD5 |
baa23b6dca10b01ff077f3ea471d4725
|
|
| BLAKE2b-256 |
6af5b4c5df8fe72f64128fcee0e66e4b93053f8ef98857c30b266a6f76701e8b
|
File details
Details for the file townshipamerica_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: townshipamerica_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b71a85198183fc29eaac7bc0f4f7748c98c2d8d71490b9c53534bc61d628eaa0
|
|
| MD5 |
52b9238837b5ceab6a8f3fbaeae7f039
|
|
| BLAKE2b-256 |
fb82121ec7e0355c2c80db1b3ffb5e32913a0961ffb87e93ed5966fee9577e67
|