MCP Hub
Back to servers

districts-mcp

A specialized MCP server that provides spatial data and distance calculations for 192 districts within Riyadh, Saudi Arabia, supporting both Arabic and English queries.

Tools
5
Updated
Dec 2, 2025
Validated
Jan 9, 2026

Riyadh Districts MCP Server

An MCP (Model Context Protocol) server that provides tools for finding distances between districts in Riyadh, Saudi Arabia.

Features

  • 192 Riyadh districts with coordinates
  • Arabic & English name support with normalization
  • 5 MCP tools for querying district data
  • Distance calculation using Haversine formula

MCP Tools

ToolDescription
get_nearest_districtsGet top N nearest districts to a given district
get_distance_between_districtsCalculate distance (km) between two districts
list_all_districtsList all available Riyadh districts
search_districtsSearch districts by partial name (Arabic/English)
get_district_infoGet district details including coordinates

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/riyadh-districts-mcp.git
cd riyadh-districts-mcp

# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

Usage

As MCP Server (for Cursor/Claude)

Add to your MCP configuration (.cursor/mcp.json or Claude Desktop config):

{
  "mcpServers": {
    "riyadh-districts": {
      "command": "/path/to/project/.venv/bin/python",
      "args": ["-m", "src.main"],
      "cwd": "/path/to/project"
    }
  }
}

As HTTP Server

source .venv/bin/activate
uvicorn src.main:app --host 0.0.0.0 --port 4501 --reload

Health check: http://localhost:4501/health

CLI Usage (Legacy)

python main.py "Al Olaya" --top 10
python main.py --distance "Al Olaya" "Al Yasmin"
python main.py --list

Data Source

District data sourced from alioh/Saudi-Districts-Dataset.

License

MIT

Reviews

No reviews yet

Sign in to write a review