SuperAPIAI Directory

salaah-mcp

github.com · AI developer platforms

Salaah MCP is a service based on FastAPI and MCP (Model Context Protocol) for calculating Islamic prayer times. It uses the islamic_times library as its core calculation engine and provides two access methods: a REST API and an MCP server. Main features include: calculating prayer times based on location and date, obtaining the Qiblah direction and distance, obtaining sun position and time information, obtaining moon position and moon phase information, and calculating new moon visibility based on the Yallop criterion. It supports multiple calculation methods, such as ISNA, MWL, Umm al-Qura, Egyptian, Karachi, Tehran, and Jafari. The MCP server uses Streamable HTTP transport and by default only accepts localhost requests; allowed hostnames can be configured via the environment variable SALAAH_ALLOWED_HOSTS. This project is suitable for developers who need to integrate prayer time calculation functionality, especially for use with MCP-capable AI assistants such as Claude Desktop.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

Salaah MCP (Muslim Community Prayer Times) is a service that provides Islamic prayer time calculation. It builds a REST API based on FastAPI and also provides a server compliant with the Model Context Protocol (MCP) for AI assistants to call. The project depends on FastAPI, the MCP Python SDK, islamic_times, and Pydantic.

Main capabilities include:

  • Calculate prayer times: calculate prayer times based on a given location and date via the POST /prayer_times endpoint.
  • Get Qiblah information: get the Qiblah direction and distance from any location to Mecca.
  • Get sun information: get detailed sun position and timing information.
  • Get moon information: get detailed moon position and moon phase information.
  • Calculate new moon visibility: calculate new moon visibility based on the Yallop criterion via the POST /moon/visibility endpoint.

Supported calculation methods (specified via the method parameter): ISNA (Islamic Society of North America), MWL (Muslim World League), Umm al-Qura (Umm al-Qura University in Mecca), Egyptian (Egyptian General Authority of Survey), Karachi (University of Islamic Sciences, Karachi), Tehran (Institute of Geophysics, University of Tehran), Jafari (Shia Ithna-Ashari Research Institute in Qom).

Usage:

  • After cloning the repository and installing uv and dependencies, the API is by default available at http://localhost:8000 .
  • The MCP server uses Streamable HTTP transport, with the endpoint located at http://localhost:8000/mcp,不支持旧的 SSE transport.
  • By default, the MCP endpoint only accepts requests sent to localhost to prevent DNS rebinding attacks. During deployment, public hostnames must be listed in a comma-separated format via the environment variable SALAAH_ALLOWED_HOSTS, for example SALAAH_ALLOWED_HOSTS=salaah-mcp.fly.dev.
  • When used with Claude Desktop, a configuration file claude_desktop_config.json needs to be created. Since Claude Desktop starts a local server, mcp-remote is needed to bridge to the HTTP endpoint. Ensure the MCP service is running, then start Claude Desktop, and you can ask about prayer times in natural language, for example "When is Asr today?" "When is Fajr in Johannesburg tomorrow?" "Show all prayer times in London." The AI will use the MCP service to calculate accurate prayer times based on the query.

Applicable scenarios: developers who need to integrate prayer time calculation functionality into applications, or users who want to quickly query prayer times through an AI assistant.

Limitations: The material does not provide specific installation command details, request/response examples, pricing information, or platform compatibility notes; this content is not yet available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools