medicover-mcp

medicover-mcp

Enables AI agents to manage appointments on Medicover's Polish patient portal, including booking, rescheduling, and slot searching for patients and dependents.

Category
访问服务器

README

medicover-mcp

An MCP server that lets an AI agent manage appointments on Medicover's Polish patient portal (https://online24.medicover.pl/). It talks directly to the portal's private JSON API (reverse-engineered from real traffic — see NOTES.md); it does not drive a browser at runtime.

It is built for an unattended daily routine: hunt for scarce slots and optionally rebook an existing appointment to an earlier one — including for linked dependents (e.g. children).

Tools

Tool Purpose
list_patients The account holder + linked dependents, each with a stable patient_id (MRN).
list_appointments A patient's planned/past appointments (read-only).
search_slots Available slots by region + specialty (optionally doctor/clinic/date).
book_appointment Book a slot for a patient — patient_id required.
reschedule_appointment Move an appointment to another slot; "earlier-only" by default.
list_appointment_filters Resolve specialty/doctor/clinic/region names → IDs from history.
list_search_filters Clinics/doctors/languages bookable for a region + specialty.

Patient-scoped read tools default to the account holder; the write tools require an explicit patient_id so a booking can never land on the wrong person. Nothing else (messaging, records, prescriptions, payments, cancel-without-rebook) is exposed.

Authentication (two-phase)

Login uses SMS 2FA, which can't be in an unattended hot path, so:

  1. One-time bootstrap (interactive CLI, not a tool):

    export MEDICOVER_USERNAME=<your-MRN-or-login>
    export MEDICOVER_PASSWORD=<your-password>   # or omit to be prompted
    uv run medicover-auth login                 # prompts for the SMS code
    

    This completes OAuth + 2FA and saves the refresh token to a 0600 file (default ~/.config/medicover-mcp/credentials.json; override with MEDICOVER_STORE_PATH). Username/password are never stored.

  2. Unattended runtime: the MCP server loads the refresh token and silently refreshes the short-lived (~3 min) access token on every run. No password or SMS is ever needed during tool calls.

  3. On expiry/revocation: tools fail with session expired — run medicover-auth login; they never prompt for an SMS through a tool call.

Token-lifetime decision: the in-MCP request_sms_code/submit_sms_code fallback is not shipped — see the reasoning in NOTES.md.

Helpers: uv run medicover-auth status (shows whether creds exist, no secrets) and uv run medicover-auth logout (deletes them).

Setup

uv sync                 # create the venv and install
uv run medicover-auth login
uv run pytest           # run the tests (no network — HTTP is mocked)

MCP client config

Add to your MCP client (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "medicover": {
      "command": "uv",
      "args": ["--directory", "/abs/path/to/medicover", "run", "medicover-mcp"],
      "env": {
        "MEDICOVER_STORE_PATH": "/home/you/.config/medicover-mcp/credentials.json"
      }
    }
  }
}

(Run medicover-auth login once on the same machine first so the credential store exists.)

Environment variables

Var Used by Meaning
MEDICOVER_USERNAME / MEDICOVER_PASSWORD bootstrap only Login credentials (else prompted).
MEDICOVER_STORE_PATH bootstrap + server Credential file path (default ~/.config/medicover-mcp/credentials.json).
MEDICOVER_TIMEOUT server HTTP timeout seconds (default 30).

Example agent flow (earlier-slot hunt for a child)

  1. list_patients → find the child's patient_id.
  2. list_appointments(patient_id=child, state="Planned") → note the appointment to improve and its appointment_id/date.
  3. list_appointment_filters(patient_id=child) → get the region id and specialty id.
  4. search_slots(patient_id=child, region_ids=[...], specialty_ids=[...], start_date="today").
  5. If an earlier slot exists: reschedule_appointment(patient_id=child, appointment_id=..., booking_string=<slot>, new_slot_date=<slot date>) (refuses unless strictly earlier).

Safety

Read-before-write on booking/reschedule (the portal validates the slot at action time); reschedule never cancels without rebooking and defaults to earlier-only; polite request pacing with backoff; tokens/credentials are never logged or returned; request/response bodies (which carry medical data) are not logged.

Disclaimer

Unofficial, built against an undocumented private API that may change without notice. Use with your own account and within Medicover's terms. Not affiliated with Medicover.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选