districts-mcp

SaadAJ/districts-mcp

3.2

If you are the rightful owner of districts-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Riyadh Districts MCP Server is a specialized server designed to provide tools for finding distances and information about districts in Riyadh, Saudi Arabia.

Tools
5
Resources
0
Prompts
0

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