Inspiration
Mental-health intake is a sensitive workflow. People should not be forced through a generic booking flow before crisis signals are recognized, availability is checked, and consent is respected. We built TheraSync to explore what happens when AI agents can use a website’s real tools while the human remains in control.
What it does
TheraSync is a WebMCP-powered intake and therapist-matching co-pilot.
An agent can:
- Triage a person’s narrative
- Detect crisis and self-harm language
- Match therapists by specialty and modality
- Find recurring appointment slots
- Prepare a booking for human review
Crisis signals immediately stop routine scheduling and display emergency support options. Booking cannot be committed until a person reviews the summary and explicitly approves it.
How we built it
The app uses a React and TypeScript frontend, an Express backend, PostgreSQL, and Docker Compose.
We exposed two WebMCP tools:
triage_and_match_therapistscommit_intake_booking
The backend owns the authoritative safety checks, slot locking, consent validation, and database commit. The frontend supports the fallback window.__WEBMCP_TOOLS__ registry and progressive WebMCP browser APIs.
Challenges we ran into
WebMCP APIs are still evolving, so different environments expose tools through different browser APIs. We normalized the tool schema and supported multiple registration shapes.
We also had to ensure that crisis detection could not be bypassed by calling the backend directly, and that a booking could not be committed without an exact slot lock and explicit human consent.
Accomplishments that we’re proud of
We built a complete agent-to-browser-to-server workflow with:
- Crisis safety interception
- Structured therapist matching
- Recurring slot availability
- Two-phase slot locking
- Human-in-the-loop booking approval
- PostgreSQL persistence
- A polished demonstration experience
What we learned
WebMCP is more than exposing functions to an agent. The best agent-native experiences need clear contracts, visible state changes, graceful errors, safety boundaries, and meaningful moments where the person remains in control.
What’s next for TheraSync
Next, we would add secure authentication, timezone-aware scheduling, audit logs, real provider integrations, stronger clinical safety escalation, privacy controls, and secure notification delivery.
This prototype uses a fictional therapist directory and is not intended for real clinical care.
Built With
- ai-agents
- artificial-intelligence
- css
- docker
- express.js
- html
- javascript
- model-context-protocol
- node.js
- postgresql
- react
- typescript
- web
- webmcp
Log in or sign up for Devpost to join the conversation.