Quantaroute Geocoder

io.github.mapdevsaikat由 GitHub 账号 mapdevsaikat 发布v1.0.0更新于 Oct 24, 2026

Geocode addresses, lookup administrative boundaries, and process DigiPin codes for India

概览

AI 生成的概览

一个本地 MCP 服务器,让助手对印度地址进行地理编码、在坐标与 DigiPin 码之间转换,并查询行政区划边界。

可以做什么
将地址地理编码为 DigiPin 码和坐标,将 DigiPin 码反查为地址,将坐标转换为 DigiPin,校验 DigiPin 格式,并支持最多 100 条地址的批量地理编码及地址自动补全建议。根据坐标或 DigiPin 码查询行政区划边界(邮编、邦、专区、地区、县),支持批量查询。查看 API 用量统计、位置服务统计和 API 健康状态。
适用场景
适合处理印度位置数据:把地址转换为坐标或 DigiPin 码,把 DigiPin 码或坐标解析为地址和邮政边界,或校验并批量处理印度地点数据。
运行要求
通过 npx 在本地运行,需要 Node.js 18 及以上。需要 QuantaRoute API 密钥,通过环境变量 QUANTAROUTE_API_KEY 提供;README 提到可用于测试的免费测试密钥。需要能访问 QuantaRoute API 的网络。
安装前请注意
API 密钥是机密信息,会写入客户端配置文件,请勿放入共享配置。地址和坐标查询会发送给第三方 QuantaRoute 服务,用量按你的密钥计费统计。README 还描述了一个托管 REST API,通过 x-api-key 请求头接收密钥。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Quantaroute Geocoder,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

QuantaRoute MCP Server

A Model Context Protocol (MCP) server that provides AI assistants (Claude Desktop, Cursor, and more) with powerful geocoding, location lookup, and DigiPin processing capabilities using the QuantaRoute Geocoding API.

Package: @quantaroute/mcp-server (MCP Server for AI Agents)
SDK: quantaroute-geocoding (Node.js/TypeScript SDK)

✅ Fully compatible with Claude Desktop and Cursor

Features

🗺️ Geocoding Tools

  • Geocode addresses to DigiPin codes and coordinates
  • Reverse geocode DigiPin codes to addresses
  • Convert coordinates to DigiPin codes
  • Validate DigiPin format and location
  • Batch geocode multiple addresses (up to 100)
  • Autocomplete address suggestions

🚀 Revolutionary Location Lookup with Nominatim + Pincode + Digipin

  • Lookup administrative boundaries from coordinates (pincode, state, division, locality)
  • Lookup from DigiPin codes
  • Batch location lookup for multiple locations
  • Find nearby boundaries within a radius [COMING SOON...]
  • Access to 36,000+ postal boundaries across India

📊 Utility Tools

  • Get API usage statistics
  • Get location statistics (boundaries, states, divisions)
  • Check API health status

Installation

This MCP server is compatible with Claude Desktop and Cursor. Follow the instructions below for your platform.

For Claude Desktop

  1. Locate the Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Edit the configuration file and add:

json
{  "mcpServers": {    "quantaroute": {      "command": "npx",      "args": [        "-y",        "@quantaroute/mcp-server"      ],      "env": {        "QUANTAROUTE_API_KEY": "your-api-key-here"      }    }  }}
  1. Save and restart Claude Desktop to apply the changes.

For Cursor

Add to your MCP configuration file (~/.cursor/mcp.json):

json
{  "mcpServers": {    "quantaroute": {      "command": "npx",      "args": [        "-y",        "@quantaroute/mcp-server"      ],      "env": {        "QUANTAROUTE_API_KEY": "your-api-key-here"      }    }  }}

Restart Cursor after making changes.

Environment Variables

Available Tools

geocode

Geocode an address to get DigiPin code and coordinates.

Parameters:

  • address (required): The address to geocode
  • city (optional): City name
  • state (optional): State name
  • pincode (optional): Postal code
  • country (optional): Country name (defaults to India)

Example:

json
{  "address": "Rohra Address, New Town",  "city": "New Town",  "state": "West Bengal",  "pincode": "700163"}

reverse_geocode

Reverse geocode a DigiPin code to get coordinates and address.

Parameters:

  • digipin (required): DigiPin code (format: XXX-XXX-XXXX)

coordinates_to_digipin

Convert latitude and longitude to DigiPin code.

Parameters:

  • latitude (required): Latitude (-90 to 90)
  • longitude (required): Longitude (-180 to 180)

lookup_location_from_coordinates

🚀 REVOLUTIONARY: Get administrative boundaries from coordinates.

Returns: pincode, state, division, locality, district, population density, and more.

Parameters:

  • latitude (required): Latitude coordinate
  • longitude (required): Longitude coordinate

lookup_location_from_digipin

Get administrative boundaries from a DigiPin code.

Parameters:

  • digipin (required): DigiPin code

batch_location_lookup

Batch lookup for multiple locations (up to 100).

Parameters:

  • locations (required): Array of location objects
    • Each object can have latitude + longitude OR digipin

batch_geocode

Geocode multiple addresses in a single request (up to 100).

Parameters:

  • addresses (required): Array of address objects

autocomplete

Get address autocomplete suggestions.

Parameters:

  • query (required): Search query (minimum 3 characters)
  • limit (optional): Max suggestions (default: 5, max: 10)

find_nearby_boundaries [COMING SOON...]

Find nearby postal boundaries within a radius.

Parameters:

  • latitude (required): Center latitude
  • longitude (required): Center longitude
  • radius_km (optional): Search radius in km (default: 5.0, max: 100)
  • limit (optional): Max results (default: 10, max: 50)

validate_digipin

Validate DigiPin format and check if it's a real location.

Parameters:

  • digipin (required): DigiPin code to validate

get_usage

Get API usage statistics and quota information.

get_location_statistics

Get live statistics about the Location Lookup service.

get_health

Check API health status.

REST API Wrapper

This project includes a REST API wrapper that makes all MCP tools accessible via HTTP endpoints for mobile and web applications.

Features

  • ✅ RESTful API: All MCP tools exposed as HTTP endpoints
  • ✅ Authentication: API key via header or environment variable
  • ✅ CORS Support: Ready for web and mobile apps
  • ✅ Vercel Ready: Optimized for serverless deployment
  • ✅ Error Handling: Comprehensive error handling and validation

Quick Start

The REST API is already deployed and ready to use at:

Base URL: https://mcp-gc.quantaroute.com/api

Note: mcp-gc stands for MCP Geocoding. This follows the naming convention:

  • mcp-gc.quantaroute.com - Geocoding MCP Server (this project)
Using the REST API

1. Get API Information:

bash
curl https://mcp-gc.quantaroute.com/api

2. Geocode an Address:

bash
curl -X POST https://mcp-gc.quantaroute.com/api/geocode \  -H "Content-Type: application/json" \  -H "x-api-key: your-api-key-here" \  -d '{    "address": "Rohra Address, New Town",    "city": "New Town",    "state": "West Bengal",    "pincode": "700163"  }'

3. Health Check:

bash
curl -X GET https://mcp-gc.quantaroute.com/api/health \  -H "x-api-key: your-api-key-here"

4. Find Nearby Boundaries:[NOT RELEASED, COMING SOON...]

bash
curl -X POST https://mcp-gc.quantaroute.com/api/find-nearby-boundaries \  -H "Content-Type: application/json" \  -H "x-api-key: your-api-key-here" \  -d '{    "latitude": 28.6139,    "longitude": 77.2090,    "radius_km": 5.0,    "limit": 10  }'

This endpoint finds nearby postal boundaries within a specified radius. Useful for:

  • Finding all pincodes within X km of a location
  • Discovering nearby administrative boundaries
  • Location-based search and discovery
JavaScript/TypeScript Example
javascript
// Geocode an addressconst response = await fetch('https://mcp-gc.quantaroute.com/api/geocode', {  method: 'POST',  headers: {    'Content-Type': 'application/json',    'x-api-key': 'your-api-key-here'  },  body: JSON.stringify({    address: 'Rohra Address, Action Area I',    city: 'New Town',    state: 'West Bengal'  })});
const data = await response.json();console.log(data);
Python Example
python
import requests
# Geocode an addressresponse = requests.post(    'https://mcp-gc.quantaroute.com/api/geocode',    headers={        'Content-Type': 'application/json',        'x-api-key': 'your-api-key-here'    },    json={        'address': 'Rohra Address, Action Area I, Ghuni',        'city': 'New Town',        'state': 'West Bengal'    })
data = response.json()print(data)
Deploying Your Own Instance

If you want to deploy your own instance:

  1. Deploy to Vercel:

    bash
    vercel
  2. Set Environment Variable (optional, for testing):

    bash
    vercel env add QUANTAROUTE_API_KEY
  3. Configure Custom Domain (optional):

    • Add your custom domain in Vercel
    • Configure DNS CNAME record pointing to Vercel
    • Wait for DNS propagation and SSL certificate

API Documentation

For complete REST API documentation, see API.md.

Available Endpoints:

  • GET /api - API information
  • GET /api/health - Health check
  • GET /api/usage - Usage statistics
  • GET /api/location-statistics - Location service statistics
  • GET /api/autocomplete?q=query - Address autocomplete
  • GET /api/validate-digipin?digipin=XXX-XXX-XXXX - Validate DigiPin
  • POST /api/geocode - Geocode an address
  • POST /api/reverse-geocode - Reverse geocode DigiPin
  • POST /api/coordinates-to-digipin - Convert coordinates to DigiPin
  • POST /api/batch-geocode - Batch geocode addresses
  • POST /api/lookup-location-from-coordinates - Lookup from coordinates
  • POST /api/lookup-location-from-digipin - Lookup from DigiPin
  • POST /api/batch-location-lookup - Batch location lookup
  • POST /api/find-nearby-boundaries - Find nearby boundaries [COMING SOON...]

Authentication

The API supports authentication in two ways:

  1. Request Header (Recommended for production):

    x-api-key: your-api-key-here
    • Users should get their own API key from developers.quantaroute.com
    • Send the API key in the x-api-key header with each request
    • Each user's API key is validated by the backend API and usage is tracked separately
  2. Environment Variable (Optional fallback for testing):

    QUANTAROUTE_API_KEY=your-api-key-here
    • Only used if no x-api-key header is provided
    • Useful for testing and development
    • Not recommended for production use

Priority: The request header takes precedence over the environment variable.

Getting an API Key:

Development

Prerequisites

  • Node.js 18+
  • TypeScript 5+

Setup

bash
# Install dependenciesnpm install
# Build the projectnpm run build
# Run in development modenpm run dev

Project Structure

mcp-server/├── src/│   ├── index.ts          # Main MCP server implementation│   └── client.ts         # QuantaRoute API client├── api/│   └── [...path].ts      # REST API wrapper (Vercel serverless function)├── dist/                 # Compiled JavaScript (generated)├── package.json├── tsconfig.json├── vercel.json           # Vercel configuration├── README.md└── API.md                # REST API documentation

API Documentation

Full API documentation: https://api.quantaroute.com/v1/digipin/docs

License

MIT License

Support

Supported Platforms

✅ Claude Desktop - Fully supported
✅ Cursor - Fully supported
✅ Other MCP-compatible clients - Should work with any MCP-compatible application

Example Usage in AI Assistants

Once configured, AI assistants (Claude, Cursor AI, etc.) can use tools like:

Example 1: Geocoding

User: "What's the DigiPin for Biswa Bangla Gate, New Town?"
Assistant: [Uses geocode tool]The DigiPin code for that address is 2TF-39M-JT5F, located at coordinates 22.5788545, 88.4716628.Full Address: Biswa Bangla Gate, New Town, Biswa Bangla Sarani, Action Area I, New Town, Bidhannagar, North 24 Parganas, West Bengal, 700156, India

Example 2: Location Lookup

User: "What administrative boundaries are at coordinates 28.6139, 77.2090?"
Assistant: [Uses lookup_location_from_coordinates tool]That location is in:- Pincode: 110001- State: Delhi- Division: New Delhi Central- Locality: Connaught Place- District: New Delhi

Example 3: Reverse Geocoding

User: "What's the address for DigiPin 2TF-3FT-J825?"
Assistant: [Uses reverse_geocode tool]The DigiPin 2TF-3FT-J825 corresponds to:- Address: FE Block, Sector III, Bidhannagar, North 24 Parganas, West Bengal, 700106, India- Coordinates: 22.580587°N, 88.419001°E

Troubleshooting

Claude Desktop Issues

  1. Server not appearing in Claude Desktop:

    • Verify the config file path is correct for your OS
    • Check that the JSON syntax is valid
    • Restart Claude Desktop completely
  2. "Command not found" errors:

    • Ensure Node.js 18+ is installed: node --version
    • Verify npx is available: which npx
  3. API authentication errors:

Cursor Issues

  1. MCP server not loading:

    • Check ~/.cursor/mcp.json exists and has valid JSON
    • Restart Cursor completely
    • Check Cursor's MCP logs for errors
  2. Tools not available:

    • Verify the server is running (check Cursor's MCP status)
    • Ensure API key is configured correctly

来源:README.md,提交 ee84a81

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分