Sponsored by Deepsite.site

Salaah MCP (Muslim Community Prayer Times)

Created By
yusufk6 months ago
A FastAPI and MCP service providing Islamic prayer times calculations
Content

Salaah MCP (Muslim Community Prayer Times)

A FastAPI and MCP service providing Islamic prayer times calculations using the islamic_times library.

Screenshot

Dependencies

This project relies on the following main dependencies:

  • FastAPI: Web framework for building APIs
  • FastAPI MCP: Model Control Protocol
  • islamic_times: Core calculation engine for prayer times
  • Pydantic: Data validation

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/salaah-mcp.git
cd salaah-mcp
  1. Install uvv and dependencies:
pip install uv
uv install

Usage

uv run run.py

The API will be available at:

API Endpoints

Calculate Prayer Times

POST /prayer_times

Calculate prayer times for a given location and date.

Example request:

{
  "latitude": -26.1528113,
  "longitude": 28.0049996,
  "method": "EGYPTIAN"
}

Example response:

{
  "method": "Egyptian General Authority of Survey (Egypt)",
  "fajr": "2025-06-01T05:19:11.373053+02:00",
  "sunrise": "2025-06-01T06:47:44.369263+02:00",
  "zuhr": "2025-06-01T12:05:43.358460+02:00",
  "asr": "2025-06-01T15:23:52.560113+02:00",
  "sunset": "2025-06-01T17:23:52.560113+02:00",
  "maghrib": "2025-06-01T17:23:52.560113+02:00",
  "isha": "2025-06-01T18:43:09.341111+02:00",
  "midnight": "2025-06-02T00:06:02.228763+02:00"
}

Get Qiblah Direction

POST /qiblah

Get Qiblah direction and distance from any location.

{
  "latitude": -26.1528113,
  "longitude": 28.0049996,
  "date": "2025-06-01T00:00:00Z"
}

Example response:

{
  "distance_km": 5452,
  "distance_mi": 3388,
  "direction": "NNE",
  "angle_decimal": 14.647,
  "angle_dms": "014° 38′ 49.84″"
}

Get Sun Information

POST /sun

Get detailed sun position and timing information.

Example response:

{
  "sunrise": "2025-06-01T06:47:40",
  "transit": "2025-06-01T12:05:33",
  "sunset": "2025-06-01T17:23:36",
  "apparent_altitude": -42.659,
  "apparent_azimuth": 276.796,
  "distance_au": 1.014106,
  "apparent_declination": 22.166,
  "apparent_right_ascension": "04h 39m 56.17s",
  "greenwich_hour_angle": 99.904,
  "local_hour_angle": 127.951
}

Get Moon Information

POST /moon

Get detailed moon position and phase information.

Example response:

{
  "moonrise": "2025-06-01T11:39:22",
  "transit": "2025-06-01T16:25:15",
  "moonset": "2025-06-01T22:54:19",
  "illumination": 36.38,
  "apparent_altitude": 25.803,
  "azimuth": 305.203,
  "distance_km": 388391,
  "parallax": 0.941,
  "topocentric_declination": 15.892,
  "topocentric_right_ascension": "09h 52m 04.77s",
  "greenwich_hour_angle": 21.198,
  "local_hour_angle": 49.245
}

Calculate Moon Visibility

POST /moon/visibility

Calculate new moon visibility using Yallop's criterion.

{
  "latitude": -26.1528113,
  "longitude": 28.0049996,
  "date": "2025-05-27T00:00:00Z",
  "days": 3,
  "criterion": 1
}

Example response:

[
  {
    "criterion": "Yallop",
    "date": "2025-05-27T15:28:52",
    "value": -0.788,
    "description": "F: Not visible; below the Danjon limit."
  },
  {
    "criterion": "Yallop",
    "date": "2025-05-28T15:56:44",
    "value": 0.958,
    "description": "A: Easily visible."
  }
]

Available Calculation Methods

  • ISNA: Islamic Society of North America
  • MWL: Muslim World League
  • UMM_AL_QURA: Umm al-Qura University, Makkah
  • EGYPTIAN: Egyptian General Authority of Survey
  • KARACHI: University of Islamic Sciences, Karachi
  • TEHRAN: Institute of Geophysics, University of Tehran
  • JAFARI: Shia Ithna Ashari, Leva Research Institute, Qom

Claude Desktop Integration

To use the prayer times service with Claude Desktop:

  1. Create a configuration file:
{
  "mcpServers": {
    "Salaah Times": {
      "command": "/Users/yusuf/.local/bin/mcp-proxy",
      "env": {
        "SSE_URL": "http://localhost:8000/mcp"
      }
    }
  }
}
  1. Save this as claude_desktop_config.json in your Claude Desktop configuration directory.

  2. Make sure the MCP service is running:

uv run run.py
  1. Start Claude Desktop and you can now ask questions about prayer times like:
  • "What time is Asr prayer today?"
  • "When is Fajr tomorrow in Johannesburg?"
  • "Show me all prayer times for London"

The AI will use the MCP service to calculate accurate prayer times based on your queries.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs