Malaysia Prayer Time for Claude Desktop
This repository contains a prayer time utility for Malaysia that integrates with Claude Desktop as an MCP extension.
Features
- Get accurate prayer times for all zones in Malaysia
- Check current prayer time status
- View upcoming prayer times
- Simple setup with Claude Desktop
Dependencies
You need the following dependencies:
pip install requests mcp
Quick Setup
The easiest way to get started is to use the installation script:
./install.sh
This will:
- Create a Python virtual environment
- Install the required dependencies
- Make the server file executable
Manual Setup
If you prefer to set up manually:
Install the dependencies:
pip install requests mcp
Make the server file executable:
chmod +x claude_mcp_server.py
Running the Server
Start the MCP server with:
./claude_mcp_server.py
The server will start and display the port it's running on (typically localhost:XXXX).
Connecting to Claude Desktop
Method 1: Using the Extensions UI (if available)
Make sure Claude Desktop is installed.
In Claude Desktop:
* Go to Settings > Extensions
* Add a new extension
* Select "Custom Extension"
* Enter the name "Malaysia Prayer Time"
* Use the connection details shown in the terminal
Method 2: Edit Configuration File Directly
If you don't see the Extensions option in Claude Desktop, you can edit the configuration file directly:
Run the helper script to get the correct path and configuration snippet:
./get_path.py
This will display the absolute path to the server file and provide JSON snippets for your configuration.
- Find your Claude Desktop configuration file:
* **macOS** : `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows** : `%APPDATA%\Claude\claude_desktop_config.json`
Add the configuration snippet from the helper script to your config file. The basic structure is:
{
"mcpServers": {
"Malaysia Prayer Time": {
"command": "/absolute/path/to/claude_mcp_server.py",
"args": []
}
}
}
Or if you want to run it through Python explicitly:
{
"mcpServers": {
"Malaysia Prayer Time": {
"command": "python",
"args": ["/absolute/path/to/claude_mcp_server.py"]
}
}
}
- Save the file and restart Claude Desktop.
Using the Server
Once connected, you can ask Claude to:
- List all available prayer time zones in Malaysia
- Get prayer times for a specific zone
- Check the current prayer time status
Available Tools
The MCP server provides three main tools:
- list_zones - Lists all available prayer time zones in Malaysia
- get_prayer_times - Gets prayer times for a specific zone
- get_current_prayer - Gets the current prayer time status for a specific zone
Zone Codes
Some of the available zone codes:
SGR01
: Selangor (Petaling, Kuala Lumpur)
JHR01
: Johor (Pulau Aur, Pemanggil)
KTN01
: Kelantan (Kota Bharu)
MLK01
: Melaka (Bandar Melaka)
NGS01
: Negeri Sembilan (Jelebu, Kuala Pilah)
PHG01
: Pahang (Kuantan, Pekan)
PLS01
: Perlis (Kangar)
PNG01
: Pulau Pinang (Georgetown)
PRK01
: Perak (Tapah, Slim River)
WLY01
: Kuala Lumpur, Putrajaya
Example Queries
Here are some examples of what you can ask Claude:
- "What are the available prayer time zones in Malaysia?"
- "Show me the prayer times for Kuala Lumpur today."
- "What's the current prayer time in Kelantan?"
- "When is the next prayer time for SGR01?"
Troubleshooting
If you encounter any issues:
- Make sure you have all required dependencies installed.
- Check that the API endpoint is accessible (https://api.waktusolat.app/api/v2/solat/SGR01).
- For MCP server issues, check that the port is not being used by another application.
- Make sure the connection details in Claude Desktop match what's shown in the terminal.
- If you get "module 'mcp' has no attribute 'App'" error, make sure to update to the latest version of the server script from this repository.
- When editing the config file manually:
* Ensure JSON syntax is correct (no trailing commas, properly quoted strings)
* Use absolute paths, not relative paths
* Make sure the file has correct permissions
* Restart Claude Desktop after making changes
* If the file doesn't exist, you may need to create it
Credits
This server uses the API from github.com/mptwaktusolat/api-waktusolat.