Skip to main content

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+

📦 Dependencies

Install all required dependencies:

# Using uv
uv sync

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.

🚀 Getting Started

Clone the repository:

git clone https://github.com/lsaavedr/mcp-duty-pharma.git
cd mcp-duty-pharma

📦 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
{
  "MCP Duty Pharma": {
    "command": "uv",
    "args": ["tool", "run", "mcp_duty_pharma"]
  }
}
  • in yaml format
mcpServers:
  - name: MCP Duty Pharma
    command: uv
    args:
      - tool
      - run
      - mcp_duty_pharma

🔒 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.

Metadata

Release files for mcp-duty-pharma 0.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-duty-pharma 0.1.17
File Size Uploaded
mcp_duty_pharma-0.1.17.tar.gz 55.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-duty-pharma 0.1.17
File Interpreter ABI Platform
mcp_duty_pharma-0.1.17-py3-none-any.whl Python 3 none any Details

Total release size: 61.1 kB

Release files / mcp_duty_pharma-0.1.17.tar.gz

Download URL mcp_duty_pharma-0.1.17.tar.gz
Size 55.0 kB
Tags Source
SHA-256 checksum
How to use checksums
81650b11b61a07c37aacc45da7a11b5a1feccdebc04f1ddaae83c4c6a76e2145
BLAKE2b-256 checksum
How to use checksums
5aaa39d6a8e771118f3ccd170b469f9733bdc246c2a6648efb688b51aeccd6d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2025.

Transparency log

Release files / mcp_duty_pharma-0.1.17-py3-none-any.whl

Download URL mcp_duty_pharma-0.1.17-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a937b6fad26fb824dd9dca13d67f128d6a7266dee6709260271f2ac748ac210f
BLAKE2b-256 checksum
How to use checksums
f84422f27adff112631cd5d704dc62666e725c1b44ed822dc6d176212c15a9a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.17 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page