shdc-appointment-mcp

shdc-appointment-mcp

MCP server for managing appointments on the Shanghai SHDC site, handling captcha, SMS verification, patient data, and submission with user confirmation.

Category
Visit Server

README

SHDC Appointment MCP

TypeScript MCP stdio server for the Shanghai SHDC appointment site.

This server keeps the user in the loop for all captcha, SMS, patient identity, and final submission steps. It does not bypass verification or submit a registration without explicit confirmation.

Setup

npm install
npm run build

Run with:

npm start

For local development:

npm run dev

Data Storage

Session data is stored locally under .shdc-appointment-mcp/session.enc.json, encrypted with a key derived from the current OS user and machine identity.

Safety

The server masks phone numbers and document numbers in tool responses and logs. It stores the access token only in encrypted local storage.

MCP Client Configuration

After npm run build, configure your MCP client to launch:

{
  "mcpServers": {
    "shdc-appointment": {
      "command": "node",
      "args": ["C:/Users/RIRKO/Documents/医疗agent/dist/index.js"]
    }
  }
}

Typical Chat Flow

  1. Before account registration, ask whether the user has already completed an offline first visit / hospital registration at the target hospital. If yes, use register_start, register_next, register_get_captcha, register_send_sms_code, register_confirm, and register_submit. If no, do not register; only use search tools to return hospital location, available experts, and appointment slots.
  2. Call auth_get_captcha, read the returned image, then call auth_send_sms_code.
  3. Call auth_login with the SMS code. The access token is saved locally.
  4. Call search_hospitals, search_departments, list_available_experts, and list_expert_slots.
  5. Call list_patients; if needed, use patient_add_start and patient_add_next.
  6. Call appointment_start, then appointment_next to select patient, get captcha, send SMS, and provide the SMS code.
  7. Call appointment_confirm with confirm=true.
  8. Call appointment_submit.

Registration Flow

The account registration tools wrap the official real-name registration flow. The first registration field is offlineFirstVisit; the MCP must confirm the user has already completed an offline first visit / hospital registration before collecting registration PII. If the user answers no, the registration flow is closed and the assistant should only provide hospital location, available experts, and appointment slot information.

The tools do not bypass captcha, SMS verification, or agreement confirmation. register_submit only submits after register_confirm has been called with confirm=true, and it does not automatically log in with the user's password.

Testing Notes

  • Keep one MCP stdio process alive for a full flow. flowId values are in-memory state, so they will not survive restarting the MCP process between tool calls.
  • The search tools match hospital and department names returned by the official site. They do not diagnose symptoms or map a symptom such as "fracture" to a hospital automatically.
  • On Windows, ad-hoc PowerShell test scripts may corrupt Chinese arguments or file paths if piped with the wrong encoding. Prefer a real MCP client session, or write helper command files as UTF-8 without BOM.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured