AlayaCare MCP Server
Enables n8n AI agents to query and manage AlayaCare data through MCP, allowing automation of home care workflows.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AlayaCare MCP Server Show me all missed visits in the last 7 days."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AlayaCare MCP Server
An MCP (Model Context Protocol) server that bridges the AlayaCare home care platform with AI agents — including N8N AI Agent workflows powered by Claude or GPT.
Architecture
N8N Workflow
└── AI Agent Node (LLM: Claude / GPT)
└── MCP Client Node ← built into N8N
└── AlayaCare MCP Server ← this project
└── AlayaCare REST API (basic auth)Related MCP server: MaterCare Homes MCP Server
Tools exposed to the AI agent
Tool | What it answers |
| Who are all the active PSWs and where do they live? |
| Details on a specific PSW |
| Who are all the active clients and where are their service addresses? |
| Details on a specific client |
| What visits are scheduled in a date range? |
| What is a specific PSW's full schedule? |
| Which PSWs are over/under-utilized? |
| Which clients live closest to a given PSW? |
| Which PSWs live closest to a given client? |
| What are the travel distances between a PSW's visits on a given day? |
Prerequisites
Node.js 18+
An AlayaCare account with API access enabled
Basic auth credentials (username + password) for the AlayaCare API
Addresses in AlayaCare must have latitude/longitude populated for geo tools to work (use a geocoding step or AlayaCare's built-in geocoding if available)
Setup
# 1. Clone and install
git clone https://github.com/deathracr/alayacare-mcp.git
cd alayacare-mcp
npm install
# 2. Configure environment
cp .env.example .env
# Edit .env with your AlayaCare credentials
# 3. Build
npm run build
# 4. Run
npm startConfiguration (.env)
# Your AlayaCare instance URL
ALAYACARE_BASE_URL=https://yourcompany.alayacare.com
# Basic auth credentials
ALAYACARE_USERNAME=your_api_username
ALAYACARE_PASSWORD=your_api_password
# Transport mode: "stdio" for N8N stdio node, "sse" for HTTP
MCP_TRANSPORT=stdio
# Port — only used when MCP_TRANSPORT=sse
MCP_PORT=3000Connecting to N8N
Option A: SSE transport (recommended for N8N cloud / remote)
Run the server with
MCP_TRANSPORT=sseon a host reachable by N8NIn N8N, add an MCP Client node
Set the SSE URL to
http://your-server:3000/sse
Option B: stdio transport (N8N self-hosted, same machine)
Run with
MCP_TRANSPORT=stdio(default)In N8N MCP node, choose stdio and point to
node /path/to/dist/index.js
Example questions your AI agent can answer
"Which PSWs are under-utilized this week?"
"Find the 5 clients closest to PSW #42."
"Show me all missed visits in the last 7 days."
"How many hours is Sarah Johnson scheduled for next week?"
"Which PSW lives closest to client #107?"
"Analyze the travel efficiency of PSW #15's schedule for tomorrow."
Important notes
Geocoding: The distance-based tools (find_nearest_clients, find_nearest_psw_for_client, analyze_schedule_travel) require that addresses in AlayaCare have latitude and longitude fields populated. If your AlayaCare instance stores only street addresses, you will need to run a geocoding step to enrich the data.
API endpoint paths: AlayaCare API paths are configured in src/alayacare/client.ts. If your instance uses different URL patterns, update the paths in getEmployees, getPatients, and getVisits.
Rate limiting: The client paginates automatically (100 records per page). For large datasets, consider adding caching.
Available Tools
10 toolsanalyze_schedule_travelA
Analyze a PSW's day schedule: visit order, gaps between visits, travel distances between consecutive stops, and total care hours. Identifies inefficient routing.
Inputs: employee_id (required), date.
find_nearest_clientsA
Given a PSW, rank all active clients by distance from the PSW's home address. Useful for identifying which clients are geographically closest and reducing travel time.
Inputs: employee_id (required), limit, max_distance_km.
find_nearest_psw_for_clientA
Given a client, rank all active PSWs by how close their home is to the client's service address. Useful for finding the most travel-efficient PSW assignment.
Inputs: patient_id (required), limit, max_distance_km.
get_clientA
Get detailed information about a single client / patient by their ID.
Inputs: patient_id (required).
get_pswA
Get detailed information about a single PSW / employee by their ID.
Inputs: employee_id (required).
get_psw_scheduleA
Get the full visit schedule for a specific PSW within a date range. Shows all their assigned clients, times, and locations.
Inputs: employee_id (required), end_date, start_date.
get_psw_utilizationA
Calculate utilization rates for PSWs — how many hours they are scheduled versus how many hours they are available. Identifies under- or over-utilized workers.
Inputs: end_date, start_date, employee_ids, max_utilization_pct, +1 more.
get_visitsB
Retrieve scheduled visits within a date range, optionally filtered by PSW or client. Returns each visit's timing, status, assigned PSW, and client.
Inputs: status, end_date, patient_id, start_date, +1 more.
list_clientsA
List all clients (patients) receiving care, including their service addresses. Use this to understand where visits take place geographically.
Inputs: status.
list_pswsA
List all Personal Support Workers (PSWs / employees) with their home addresses and status. Use this to understand who is on the team and where they live.
Inputs: status.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource and action: PSW management, client management, visit retrieval, schedule analysis, utilization, and distance-based matching. Even similar tools like get_visits and get_psw_schedule differ by scope and filter, causing no real ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_psws, get_client, find_nearest_clients). The naming is predictable and clearly indicates the operation and target resource.
Ten tools is well-scoped for a home-care scheduling domain. Each tool serves a clear purpose without redundancy, covering list/get, scheduling, analysis, and optimization in a balanced way.
The server covers the read and analysis side thoroughly: PSW/client info, visit retrieval, schedule analysis, and travel optimization. Missing write operations (create/update/delete) might be intentional for an analytics tool, but there is no direct way to modify schedules or assignments, which is a minor gap.
Maintenance
Related MCP Connectors
Build and manage AI-native customer support agents from Claude or any MCP client.
Connect, monitor, and control AI agents — tasks, approvals, schedules, and governance.
Telehealth support for Claude, Codex and Cursor: investigate cases and connect your tools.
AI life manager: tasks, home, health, wealth, childcare, pets & more — on your own data.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLM-based agents to interact with FHIR healthcare data through natural language prompts, providing full CRUD operations on FHIR resources, document processing, and semantic search capabilities.13102MIT
- AlicenseNot gradedqualityDmaintenanceAn AI-powered eldercare platform that enables AI agents to monitor passive sensors, generate personalized care plans, and access specialized healthcare knowledge bases. It provides tools for passive monitoring of senior activities, medical document OCR, and real-time alert management for caregivers.MIT

Watsonx.data Document Libraryofficial
AlicenseNot gradedqualityDmaintenanceBridges AI agents with watsonx.data document libraries, enabling natural language queries and intelligent retrieval from document libraries.24 PyPI5Apache 2.0
vClinic MCP Serverofficial
FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage virtual clinic data including patients, visits, diagnoses, treatments, lab/radiology orders, and search medical literature and internal knowledge base.-