loading…
Search for a command to run...
loading…
An MCP server that provides knowledge about Coordinate Reference Systems (CRS).
An MCP server that provides knowledge about Coordinate Reference Systems (CRS).
npm version CI License: MIT Node.js MCP Built with Claude Code
An MCP server that provides specialized knowledge and decision support for Coordinate Reference Systems (CRS) worldwide.
Global coverage through a 3-layer fallback:
Coordinate transformation execution is delegated to mcp-server-proj, focusing on knowledge provision and decision support.
npm install @shuji-bonji/epsg-mcp
Or run directly:
npx @shuji-bonji/epsg-mcp
Add to claude_desktop_config.json:
{
"mcpServers": {
"epsg": {
"command": "npx",
"args": ["@shuji-bonji/epsg-mcp"]
}
}
}
By default, only the Japan pack is loaded. To enable additional packs (e.g., US, UK), set the EPSG_PACKS environment variable:
{
"mcpServers": {
"epsg": {
"command": "npx",
"args": ["@shuji-bonji/epsg-mcp"],
"env": {
"EPSG_PACKS": "jp,us,uk"
}
}
}
}
Available packs: jp (Japan), us (United States), uk/gb (United Kingdom)
By default, output is in English. To get Japanese output, set the EPSG_LANG environment variable:
{
"mcpServers": {
"epsg": {
"command": "npx",
"args": ["@shuji-bonji/epsg-mcp"],
"env": {
"EPSG_LANG": "ja"
}
}
}
}
npx @modelcontextprotocol/inspector npx @shuji-bonji/epsg-mcp
Search CRS by keyword.
// Input
{
query: string; // Search keyword (e.g., "JGD2011", "4326", "Tokyo")
type?: "geographic" | "projected" | "compound" | "vertical" | "engineering";
region?: "Japan" | "Global";
limit?: number; // Default: 10, max: 100
}
// Output
{
results: CrsInfo[];
totalCount: number;
}
Usage Examples:
Get detailed CRS information by EPSG code.
// Input
{
code: string; // "EPSG:6677" or "6677"
}
// Output
{
code: string;
name: string;
type: CrsType;
datum?: DatumInfo;
projection?: ProjectionInfo;
areaOfUse: AreaOfUse;
accuracy?: AccuracyInfo;
remarks?: string;
useCases?: string[];
// ...
}
Usage Examples:
Get available CRS list and recommendations by region.
// Input
{
region: "Japan" | "Global";
type?: CrsType;
includeDeprecated?: boolean; // Default: false
}
// Output
{
region: string;
crsList: CrsInfo[];
recommendedFor: {
general: string;
survey: string;
webMapping: string;
};
}
Usage Examples:
Recommend optimal CRS based on purpose and location.
// Input
{
purpose: "web_mapping" | "distance_calculation" | "area_calculation" |
"survey" | "navigation" | "data_exchange" | "data_storage" | "visualization";
location: {
country?: string; // "Japan" | "Global"
region?: string; // "Kanto", "Hokkaido", "Main Island", "Sakishima", etc.
prefecture?: string; // "Tokyo", "Hokkaido", etc.
city?: string; // "Sapporo", "Naha", etc. (for multi-zone support)
boundingBox?: BoundingBox;
centerPoint?: { lat: number; lng: number };
};
requirements?: {
accuracy?: "high" | "medium" | "low";
distortionTolerance?: "minimal" | "moderate" | "flexible";
interoperability?: string[]; // e.g., ["GIS", "CAD", "Web"]
};
}
// Output
{
primary: RecommendedCrs; // Recommended CRS (with score, pros, cons)
alternatives: RecommendedCrs[];
reasoning: string;
warnings?: string[]; // Warnings for areas spanning multiple zones
}
Usage Examples:
Validate whether a specified CRS is appropriate for a specific purpose and location.
// Input
{
crs: string; // "EPSG:3857" or "3857"
purpose: Purpose; // Same as recommend_crs
location: LocationSpec; // Same as recommend_crs
}
// Output
{
isValid: boolean;
score: number; // Suitability 0-100
issues: ValidationIssue[]; // List of issues
suggestions: string[]; // Improvement suggestions
betterAlternatives?: RecommendedCrs[]; // Alternatives when score is low
}
Detected Issues Examples:
DEPRECATED_CRS: Using deprecated CRSAREA_DISTORTION: Area calculation with Web MercatorZONE_MISMATCH: Using Zone I (for Nagasaki) in TokyoGEOJSON_INCOMPATIBLE: Outputting GeoJSON with projected CRSUsage Examples:
Suggest optimal transformation path between two CRS.
// Input
{
sourceCrs: string; // "EPSG:4301" or "4301"
targetCrs: string; // "EPSG:6668" or "6668"
location?: {
country?: string;
prefecture?: string;
boundingBox?: BoundingBox;
};
}
// Output
{
directPath: TransformationPath | null; // Direct transformation path
viaPaths: TransformationPath[]; // Indirect transformation paths
recommended: TransformationPath; // Recommended path
warnings: string[];
}
TransformationPath:
steps: Array of transformation steps (from, to, method, accuracy, isReverse)totalAccuracy: Overall accuracycomplexity: "simple" | "moderate" | "complex"Features:
Usage Examples:
Compare two CRS from various perspectives.
// Input
{
crs1: string; // "EPSG:4326" or "4326"
crs2: string; // "EPSG:6668" or "6668"
aspects?: ComparisonAspect[]; // Specify comparison aspects (all if omitted)
}
// ComparisonAspect
"datum" | "projection" | "area_of_use" | "accuracy" | "distortion" | "compatibility" | "use_cases"
// Output
{
comparison: ComparisonResult[]; // Comparison results for each aspect
summary: string; // Summary
recommendation: string; // Recommendation
transformationNote?: string; // Notes on transformation
}
Comparison Aspects:
datum: Datum comparison (e.g., WGS84 vs JGD2011 are practically identical)projection: Projection comparisonarea_of_use: Area of use comparisonaccuracy: Accuracy characteristics comparisondistortion: Distortion characteristics comparisoncompatibility: GIS/Web/CAD/GPS compatibility comparisonuse_cases: Use case suitability comparison (score-based)Usage Examples:
Get best practices for CRS usage.
// Input
{
topic: "japan_survey" | "web_mapping" | "data_exchange" | "coordinate_storage" |
"mobile_gps" | "cross_border" | "historical_data" | "gis_integration" |
"precision_requirements" | "projection_selection";
context?: string; // Additional context (optional, max 500 characters)
}
// Output
{
topic: string;
description: string;
practices: Practice[]; // Recommended practices
commonMistakes: Mistake[]; // Common mistakes
relatedTopics: string[]; // Related topics
references: Reference[]; // Reference materials
}
Practice:
title: Practice namedescription: Descriptionpriority: "must" | "should" | "may"rationale: Rationaleexample?: Concrete exampleUsage Examples:
Troubleshoot CRS-related problems.
// Input
{
symptom: string; // Symptom (2-500 characters)
context?: {
sourceCrs?: string; // Source CRS
targetCrs?: string; // Target CRS
location?: string; // Target region
tool?: string; // Tool being used
magnitude?: string; // Magnitude of shift
};
}
// Output
{
matchedSymptom: string; // Matched symptom category
possibleCauses: Cause[]; // Possible causes (with likelihood)
diagnosticSteps: DiagnosticStep[]; // Diagnostic steps
suggestedSolutions: Solution[]; // Solutions
relatedBestPractices: string[]; // Related best practices
confidence: "high" | "medium" | "low"; // Diagnosis confidence
}
Supported Symptoms:
Usage Examples:
| EPSG | Name | Usage |
|---|---|---|
| 6668 | JGD2011 | Geographic CRS (reference) |
| 6669-6687 | Japan Plane Rectangular CS I-XIX | Surveying, large-scale maps |
| 4612 | JGD2000 | Legacy (deprecated) |
| EPSG | Name | Usage |
|---|---|---|
| 4269 | NAD83 | Geographic CRS (standard) |
| 6318 | NAD83(2011) | Latest realization |
| 5070 | NAD83 / Conus Albers | Area calculations |
| 2229 | NAD83 / California zone 5 | State Plane example |
| 2263 | NAD83 / New York Long Island | State Plane example |
| EPSG | Name | Usage |
|---|---|---|
| 4277 | OSGB36 | Geographic CRS (legacy) |
| 4258 | ETRS89 | Geographic CRS (modern) |
| 27700 | British National Grid | Surveying, mapping |
| 2157 | Irish Transverse Mercator | Northern Ireland |
| EPSG | Name | Usage |
|---|---|---|
| 4326 | WGS 84 | GPS/GeoJSON standard |
| 3857 | Web Mercator | Web map display |
| 326xx | UTM zones | Distance/area calculation |
By default, this server provides CRS data for Japan and major global systems. For access to the complete EPSG registry (10,000+ CRS), you can optionally enable SQLite support.
# Using the built-in script
npm run epsg:download-db
# Or specify a custom path
npx tsx scripts/download-epsg-db.ts ./path/to/epsg.db
npm install did not install it)sql.js is already listed in optionalDependencies, so it is normally installed automatically when you run npm install @shuji-bonji/epsg-mcp. You only need this step if the optional dependency was skipped (e.g., by --no-optional):
npm install sql.js
Set the EPSG_DB_PATH environment variable:
export EPSG_DB_PATH="/path/to/epsg.db"
Or configure in Claude Desktop's claude_desktop_config.json:
{
"mcpServers": {
"epsg": {
"command": "npx",
"args": ["@shuji-bonji/epsg-mcp"],
"env": {
"EPSG_DB_PATH": "/path/to/epsg.db"
}
}
}
}
The EPSG database is provided by PROJ, which redistributes the IOGP EPSG Geodetic Parameter Dataset. Please refer to the EPSG Terms of Use for licensing information.
# Install dependencies
npm install
# Build
npm run build
# Test
npm test
# Watch mode
npm run test:watch
MIT License - see LICENSE for details.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"epsg-mcp": {
"command": "npx",
"args": []
}
}
}