The MCP Duty Pharma server helps you locate pharmacies legally required to stay open during nights, weekends, and holidays.
Locate Nearby Duty Pharmacies: Find the ten closest pharmacies on duty today, sorted by distance to a specified address using the
get_nearby_duty_pharmaciestool.Safe Usage: Implements rate limiting and error handling to prevent excessive requests.
Integration: Easily installable in Claude Desktop or other environments.
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., "@MCP Duty Pharmafind pharmacies open near me right now"
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.
MCP Duty Pharma
MCP Duty Pharma helps you locate pharmacies legally required to stay open during nights, weekends, and holidays. Whether it's an emergency or just a late-night need, this tool ensures you always know where to go.
📋 System Requirements
Python 3.10+
Related MCP server: Maya MCP
📦 Dependencies
Install all required dependencies:
Required Packages
fastmcp: Framework for building Model Context Protocol servers
geoPy: Python library for accessing and geocoding/reverse geocoding locations.
httpx: HTTP client for Python, which provides a simple and intuitive API for making HTTP requests.
All dependencies are specified in pyproject.toml.
📑 Table of Contents
🛠️ MCP Tools
This MCP server provides the following tools to Large Language Models (LLMs):
get_nearby_duty_pharmacies
Get ten closest pharmacies on duty today, sorted by distance to the given address.
📦 Installation
You can install this MCP server in either Claude Desktop or elsewhere. To use this server, add the following configuration to the settings file:
in json format
in yaml format
🔒 Safety Features
Rate Limiting: Each geocoding call is rate-limited (e.g., 1-second delay) to avoid excessive requests that violate usage limits.
Error Handling: Catches geopy exceptions (timeouts, service errors) and returns safe [] results instead of crashing.
📚 Development Documentation
If you’d like to extend or modify this server:
Check duty-pharma.py for how each tool is implemented and how duty-pharma is integrated.
Look at geopy’s official docs for advanced usage like bounding boxes, language settings, or advanced data extraction.
Look at regional government APIs for more data sources.