Skip to main content
Glama

Malaysia Prayer Time MCP Server


概述

马来西亚祈祷时间 MCP 服务器提供马来西亚各地准确的伊斯兰祈祷时间。该服务器采用模型上下文协议 (MCP),可与 Claude Desktop 无缝集成,并通过您的 AI 助手直接提供实时祈祷时间表。

该服务器利用 waktusolat.app API 检索 JAKIM 验证的祈祷时间,并支持按城市、区域代码或坐标进行搜索。

特征

基于位置的时间:获取马来西亚任何城市或地区的祷告时间
坐标支持:使用经纬度坐标查找祈祷时间
区域代码访问:使用 JAKIM 区域代码直接查询(例如,吉隆坡为SGR03
完整的祷告时间表:检索所有每日祷告时间(晨礼、日出、晌礼、晡礼、昏礼、宵礼)
当前祈祷状态:确定当前和下一次祈祷时间
强大的错误处理:优雅地处理网络问题和 API 更改
无缝 Claude 集成:通过 MCP 与 Claude Desktop 无缝集成

安装

先决条件

  • Python 3.10 或更高版本
  • Claude 桌面(最新版本)
  • pipuv包管理器

选项 1:从 GitHub 安装

# Clone the repository git clone https://github.com/yourusername/mcp-server-malaysia-prayer-time.git cd mcp-server-malaysia-prayer-time # Create and activate a virtual environment python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies pip install -e .

选项 2:使用 uv(推荐)

# Clone the repository git clone https://github.com/yourusername/mcp-server-malaysia-prayer-time.git cd mcp-server-malaysia-prayer-time # Create and activate a virtual environment using uv uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies uv pip install -e .

配置

配置 Claude 桌面

  1. 创建或编辑 Claude Desktop 配置文件:

macOS 系统

mkdir -p ~/Library/Application\ Support/Claude/ nano ~/Library/Application\ Support/Claude/claude_desktop_config.json

窗户

mkdir -p %APPDATA%\Claude notepad %APPDATA%\Claude\claude_desktop_config.json
  1. 添加以下配置(根据您的设置调整路径):
{ "mcpServers": { "malaysia-prayer-time": { "command": "/absolute/path/to/your/.venv/bin/python", "args": [ "main.py" ], "cwd": "/absolute/path/to/mcp-server-malaysia-prayer-time" } } }
  1. 完全��启Claude Desktop

用法

配置完成后,您可以使用自然语言查询通过 Claude Desktop 与祈祷时间进行交互:

示例

按城市/区域获取祷告时间
  • “今天吉隆坡的祈祷时间是几点?”
  • “显示马来西亚怡保的祈祷时间”
  • “获取 PRK02 的祈祷时间”(使用区域代码)
通过坐标获取祷告时间
  • “坐标 3.1390, 101.6869 处的祈祷时间是几点?”
  • “显示 5.4141, 100.3288 位置的祈祷时间表”
列出可用区域
  • “列出马来西亚所有祈祷时区”
  • “显示所有可用的 JAKIM 区域代码”

API 参考

可用工具

MCP 服务器向 Claude 公开了以下工具:

get_prayer_times

检索马来西亚特定城市或区域代码的祈祷时间。

参数

  • city (字符串,默认值:“kuala lumpur”):城市名称或区域代码(例如,“SGR03”)
  • country (字符串,默认值:“马来西亚”):目前仅支持“马来西亚”
  • date (字符串,默认值:“今天”):YYYY-MM-DD 格式的日期或“今天”
get_prayer_times_by_coordinates

根据地理坐标检索祈祷时间。

参数

  • latitude (浮点数):纬度坐标
  • longitude (浮点数):经度坐标
  • date (字符串,默认值:“今天”):YYYY-MM-DD 格式的日期或“今天”
list_zones

列出马来西亚所有可用的祈祷时区及其相应的代码。

祷告时间信息

服务器提供以下祈祷时间:

  • Imsak(黎明前的用餐时间,如有)
  • 晨礼(黎明祈祷)
  • 苏鲁克/日出
  • 晌礼(午间祈祷)
  • 晡礼(下午祈祷)
  • 马格里布(日落祈祷)
  • 伊莎(夜间祈祷)

区域覆盖

该服务器目前支持马来西亚所有 JAKIM 区域。基于坐标的查找支持以下主要区域:

  • 吉隆坡/雪兰莪:SGR01-SGR04
  • 霹雳州:PRK01-PRK04
  • 槟城:PNG01
  • 柔佛:JHR01
  • 吉打:KDH01
  • 登嘉楼:TRG01
  • 吉兰丹:KTN01
  • 马六甲:MLK01

故障排除

常见问题

Claude无法连接到服务器
  1. 验证配置路径是否绝对且正确
  2. 检查 Claude 日志:
    # macOS tail -f ~/Library/Logs/Claude/mcp*.log # Windows type %APPDATA%\Claude\Logs\mcp*.log
  3. 直接测试服务器:
    cd /path/to/mcp-server-malaysia-prayer-time python main.py
没有可用的祈祷时间
  1. 验证互联网连接
  2. 检查区域代码是否有效(使用list_zones
  3. API 可能暂时不可用 - 请稍后重试
未找到城市

尝试使用不同的拼写、附近的大城市或适当的区域代码

贡献

欢迎贡献!贡献方式如下:

  1. 分叉存储库
  2. 创建功能分支: git checkout -b feature/amazing-feature
  3. 提交您的更改: git commit -m 'Add some amazing feature'
  4. 推送到分支: git push origin feature/amazing-feature
  5. 打开拉取请求

开发设置

# Clone your fork git clone https://github.com/yourusername/mcp-server-malaysia-prayer-time.git cd mcp-server-malaysia-prayer-time # Set up development environment python -m venv .venv source .venv/bin/activate pip install -e ".[dev]" # Installs dev dependencies # Run tests pytest

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

致谢


-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

MCP 服务器可通过 Claude Desktop 访问马来西亚祈祷时间数据,使用户能够检索特定区域的祈祷时间、列出可用的祈祷区域并检查当前的祈祷时间状态。

  1. 特征
    1. 安装
      1. 先决条件
      2. 选项 1:从 GitHub 安装
      3. 选项 2:使用 uv(推荐)
    2. 配置
      1. 配置 Claude 桌面
    3. 用法
      1. 示例
    4. API 参考
      1. 可用工具
      2. 祷告时间信息
    5. 区域覆盖
      1. 故障排除
        1. 常见问题
      2. 贡献
        1. 开发设置
      3. 执照
        1. 致谢

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            An MCP server that allows checking local time on the client machine or current UTC time from an NTP server
            Last updated -
            14
            Python
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            A lightweight mcp server that tells you exactly what time is it based on your IP.
            Last updated -
            8
            Python
            MIT License
          • -
            security
            -
            license
            -
            quality
            An MCP server that enables Claude and other MCP clients to interact with Mattermost workspaces, providing channel management, messaging capabilities, and topic monitoring functionality.
            Last updated -
            TypeScript
          • A
            security
            A
            license
            A
            quality
            Model Context Protocol (MCP) server that provides weather forecast, warnings, water level associated with flood, and earthquake reports from Malaysia Government's Open API.
            Last updated -
            4
            Python
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/amanasmuei/mcp-server-malaysia-prayer-time'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server