shdc-appointment-mcp
MCP server for managing appointments on the Shanghai SHDC site, handling captcha, SMS verification, patient data, and submission with user confirmation.
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
- 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, andregister_submit. If no, do not register; only use search tools to return hospital location, available experts, and appointment slots. - Call
auth_get_captcha, read the returned image, then callauth_send_sms_code. - Call
auth_loginwith the SMS code. The access token is saved locally. - Call
search_hospitals,search_departments,list_available_experts, andlist_expert_slots. - Call
list_patients; if needed, usepatient_add_startandpatient_add_next. - Call
appointment_start, thenappointment_nextto select patient, get captcha, send SMS, and provide the SMS code. - Call
appointment_confirmwithconfirm=true. - 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.
flowIdvalues 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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.