Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Riyadh Districts MCP Serverwhat's the distance between Al Olaya and Al Yasmin?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Tool | Description |
| Get top N nearest districts to a given district |
| Calculate distance (km) between two districts |
| List all available Riyadh districts |
| Search districts by partial name (Arabic/English) |
| Get 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.txtUsage
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 --reloadHealth 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 --listData Source
District data sourced from alioh/Saudi-Districts-Dataset.
License
MIT