Skip to main content
Glama
radial-hks

MCP Server PROJ

by radial-hks

MCP Server PROJ

A Model Context Protocol (MCP) server for coordinate system transformations and map projections.

Features

  • Multiple coordinate system format support:

    • EPSG codes

    • WKT (Well-Known Text)

    • Proj string format

  • Batch coordinate transformation

  • Simple and intuitive API

  • Dual-mode operation: server or library

Related MCP server: GeoSpatial MCP Server

Installation

pip install mcp-server-proj

Usage

Server Mode

mcp-server-proj

Library Mode

from mcp_server_proj import CoordinateTransformer

# Create transformer instance
transformer = CoordinateTransformer()

# Set source and target coordinate systems
transformer.set_source_crs("EPSG:4326")  # WGS84
transformer.set_target_crs("EPSG:3857")  # Web Mercator

# Initialize transformer
transformer.initialize_transformer()

# Transform coordinates
x, y = transformer.transform_point(116.3, 39.9)
print(f"Transformed coordinates: ({x}, {y})")

API Documentation

CoordinateTransformer

The main coordinate transformation class provides the following methods:

  • set_source_crs(crs: str): Set source coordinate system

  • set_target_crs(crs: str): Set target coordinate system

  • initialize_transformer(): Initialize the transformer

  • transform_point(x: float, y: float) -> tuple[float, float]: Transform a single point

Server

The MCP protocol server provides two tools:

  • transform-coordinates: Transform coordinates between different systems

    {
      "source_crs": "EPSG:4326",
      "target_crs": "EPSG:3857",
      "coordinates": [
        {"x": 116.3, "y": 39.9}
      ]
    }
  • list-supported-crs: List all supported coordinate systems

Supported Coordinate Systems

1. EPSG Codes

Standard identifiers for coordinate reference systems:

  • EPSG:4326 - WGS84 Geographic

  • EPSG:3857 - Web Mercator

  • And many more...

2. WKT Format

Example of a geographic coordinate system:

GEOGCS["WGS 84",
  DATUM["WGS_1984",
    SPHEROID["WGS 84",6378137,298.257223563]],
  PRIMEM["Greenwich",0],
  UNIT["degree",0.0174532925199433]]

3. Proj Format

Example of WGS84:

+proj=longlat +datum=WGS84 +no_defs +type=crs

Development

Debugging

For the best debugging experience, use the MCP Inspector:

npx @modelcontextprotocol/inspector mcp-server-proj

Dependencies

  • Python >= 3.12

  • mcp >= 1.3.0

  • pyproj >= 3.0.0

License

MIT

Author

radial-hks (radialjiajie@gmail.com)

Contributing

Issues and Pull Requests are welcome!

Available Tools

2 tools
list-supported-crsB

列出所有支持的坐标系统

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It merely states the listing action but does not mention return format, potential errors, or whether the operation is read-only (though that is implied). The description adds no behavioral context beyond the purpose.

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 a single, short sentence that is immediately understandable. It wastes no words and is well-structured, with the key action and object front-loaded.

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?

The tool is simple with no parameters and no output schema. The description covers the core purpose, but it does not specify the structure of the returned list (e.g., array of codes, names, or objects), which would be helpful for an agent to correctly parse the output. It is adequate for a basic list tool but leaves a minor gap.

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?

The tool has zero parameters, and the baseline for such tools is 4. The description does not need to explain parameter semantics since none exist, and the schema correctly reflects an empty object.

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 a specific verb and resource: 'List all supported coordinate systems.' While it does not explicitly differentiate from the sibling tool 'transform-coordinates', the purpose is unambiguous and distinct in intent.

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 versus alternatives. There is no mention of context, prerequisites, or exclusions, leaving the agent to infer usage solely from the tool's name.

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

transform-coordinatesA

在不同坐标系统之间转换坐标,支持EPSG、WKT和Proj格式的坐标系统

ParametersJSON Schema
NameRequiredDescriptionDefault
source_crsYes源坐标系统,支持以下格式: 1. EPSG代码 (如:EPSG:4326) 2. WKT格式 (如:GEOGCS["WGS 84",DATUM[...]]) 3. Proj格式 (如:+proj=longlat +datum=WGS84)
target_crsYes目标坐标系统,支持以下格式: 1. EPSG代码 (如:EPSG:4326) 2. WKT格式 (如:GEOGCS["WGS 84",DATUM[...]]) 3. Proj格式 (如:+proj=longlat +datum=WGS84)
coordinatesYes

TDQS

A3.7/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 does disclose the supported CRS formats, which is helpful, but it omits other behavioral details such as whether the operation is read-only, what the return value looks like, or how errors are handled. For a transformation tool, the core behavior is evident, but more context would improve transparency.

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 a single, concise sentence that is front-loaded with the core purpose and supported formats. Every word earns its place, with no filler or redundancy.

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?

The tool has moderate complexity, but the description does not explain the return format or coordinate structure, which is significant given the absence of an output schema. The schema provides some parameter details, but the overall description remains incomplete for a tool that transforms geospatial data.

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 67%; the CRS parameters have detailed descriptions in the schema, and the description repeats these formats without adding new meaning. The coordinates parameter lacks a schema description, and the tool description does not compensate by explaining the expected format or structure for coordinates.

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 transforms coordinates between different coordinate systems, which is a specific verb+resource. It also lists the supported CRS formats (EPSG, WKT, Proj), distinguishing it from the sibling 'list-supported-crs' tool.

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 usage when coordinate conversion is needed, but it offers no explicit guidance on when to use this tool versus alternatives, nor does it state any exclusions. It relies on the user to infer purpose from the function name.

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. 2 tool updatesv1.0.0
    • First observedlist-supported-crs
    • First observedtransform-coordinates

TDQS

A3.7/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one transforms coordinates between systems, the other lists supported coordinate systems. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow a consistent verb-noun pattern with hyphenated lowercase (transform-coordinates, list-supported-crs), making the naming predictable and easy to understand.

Tool Count3/5

With only two tools, the server feels thin for a coordinate transformation service. While they cover a minimal workflow, the count is borderline and could be expanded with additional useful operations.

Completeness4/5

The core workflow is covered: users can list supported CRS and transform coordinates between them. Minor gaps exist, such as retrieving detailed CRS metadata or more advanced PROJ operations, but the basics are functional.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables efficient discovery and retrieval of NASA Earth Data for geospatial analysis.
    26
    BSD 3-Clause
  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol (MCP) based geographic processing server that provides spatial analysis functions including coordinate system conversions, distance calculations, and area calculations.
    3
    8 npm
    3
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A Model Context Protocol server that connects Large Language Models to the GeoServer REST API, enabling AI assistants to query and manipulate geospatial data through natural language.
    9
    89
    MIT
  • A
    license
    C
    quality
    A
    maintenance
    A Model Context Protocol server that connects LLMs to GIS operations, enabling AI assistants to perform accurate geospatial analysis including geometric operations, coordinate transformations, and spatial measurements.
    87
    193
    MIT