Inspiration

Clinic front desks lose hours to the same calls: "Is the doctor free on Thursday?", "Cancel my slot", "Which floor is the dentist?" Calls get missed, patients no-show, and receptionists can't be everywhere. I wanted an AI receptionist that answers these requests instantly, but stays inside clear rules so staff can trust it.

What it does

ClinicPilot is an AI receptionist for a sample clinic (Sunrise Family Clinic, 55 doctors across 11 specialties).

  • Patients chat to book or cancel appointments, see real availability, and get step-by-step directions to the doctor's room. A Locate Doctor feature finds any room directly.
  • Staff get a secure web app with roles (viewer, editor, admin, super admin). New staff sign up and wait for owner approval.
  • Permissions are enforced on the server, so a viewer who tries to book is refused.
  • Observability Logs flag failed chats, tool errors, unanswered questions and escalations, so the owner can see where the AI fell short.

How I built it

The core is a self-hosted MCP server (Python, FastMCP, Streamable HTTP, spec 2025-11-25) that exposes every clinic action as a tool, backed by SQLite. An ASGI guard checks the session token and the caller's role before any tool runs. A Gemini agent calls these tools through function calling and only sees the tools its user is allowed to use. A Streamlit web app simulates the Alexa+ experience on top. Passwords use scrypt, sessions use hashed tokens that expire after 8 hours, and repeated failed logins lock the account.

Challenges

  • Confirming the server really speaks MCP spec 2025-11-25.
  • Long chats dropping connections until I raised the server keep-alive.
  • Nested TaskGroup errors that hid the real cause, so I wrote a helper to unwrap them.
  • Gemini models being retired or overloaded (404 and 503 errors), which I handled with retries and a fallback model.

What I learned

Keeping one MCP server as the single source of truth makes the agent easy to swap, and enforcing permissions on the server, not

What's next

Real reminder emails, more languages, and moving the agent to Amazon Bedrock.

Code: https://github.com/praveendataguy/clinic-pilot

Built With

Share this project:

Updates

Submission history