AlayaCare MCP Server

AlayaCare MCP Server

Bridges the AlayaCare home care platform with AI agents, enabling natural language queries for PSW details, client info, visit schedules, and geo-based proximity analysis.

Category
Visit Server

README

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)

Tools exposed to the AI agent

Tool What it answers
list_psws Who are all the active PSWs and where do they live?
get_psw Details on a specific PSW
list_clients Who are all the active clients and where are their service addresses?
get_client Details on a specific client
get_visits What visits are scheduled in a date range?
get_psw_schedule What is a specific PSW's full schedule?
get_psw_utilization Which PSWs are over/under-utilized?
find_nearest_clients Which clients live closest to a given PSW?
find_nearest_psw_for_client Which PSWs live closest to a given client?
analyze_schedule_travel 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 start

Configuration (.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=3000

Connecting to N8N

Option A: SSE transport (recommended for N8N cloud / remote)

  1. Run the server with MCP_TRANSPORT=sse on a host reachable by N8N
  2. In N8N, add an MCP Client node
  3. Set the SSE URL to http://your-server:3000/sse

Option B: stdio transport (N8N self-hosted, same machine)

  1. Run with MCP_TRANSPORT=stdio (default)
  2. 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.

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