Rehabilitation Monitoring MCP Server
The Rehabilitation Monitoring MCP Server enables comprehensive rehabilitation patient monitoring, risk assessment, reporting, and research retrieval through a standardized MCP interface.
Patient Data & Information
Retrieve individual patient information using a patient ID, drawing from CSV datasets covering patient records, therapy sessions, wearable sensor measurements, and medication adherence logs.
Risk Assessment
Calculate rehabilitation risk scores for individual patients or the entire cohort, with a configurable lookback window (1–365 days).
Identify patients with declining rehabilitation outcomes over a specified time period.
Reporting & Alerts
Generate detailed markdown rehabilitation reports for a single patient or the whole cohort, optionally enriched with external research content via Firecrawl.
Create and persist alerts when risk scores or decline indicators cross configurable thresholds.
Research Retrieval
Search for rehabilitation research papers and summaries from external sources using the Firecrawl API, with customizable queries and result limits.
Guided Prompts
Use built-in prompts to summarize patient progress, create monitoring reports, explain risk classifications, and recommend follow-up actions.
Configuration
Supports overriding the default data directory and configuring Firecrawl API keys via environment variables.
Click on "Install 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., "@Rehabilitation Monitoring MCP ServerCalculate risk scores for all patients"
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.
Rehabilitation Monitoring MCP Server
An MCP (Model Context Protocol) server for rehabilitation monitoring built with the Python SDK. The server exposes rehabilitation datasets, monitoring tools, reporting workflows, and research retrieval capabilities through a standardized MCP interface.
Development Approach
This project was developed using an LLM-assisted development workflow inspired by the MCP tutorial on building MCP servers with LLMs. Functionality was designed, implemented, tested, and refined iteratively through prompt-driven development, MCP tool testing, and human review.
The project evolved from basic rehabilitation-monitoring tools into more advanced workflows, including risk assessment, decline detection, intervention planning, alert generation, and an agentic rehabilitation workflow for reviewing and updating patient plans.
Reference:
Related MCP server: openemr-mcp
User Interface
The project includes a Gradio-based clinical dashboard (app.py) that provides a graphical interface for interacting with the rehabilitation-monitoring workflows.
Available dashboard views:
Cohort Overview
Patient Information
Risk Assessment
Declining Outcomes
Review Workflow
Alerts
Intervention Plans
AI Assistant
The dashboard is implemented on top of the existing MCP server functionality and does not modify the underlying MCP workflows. The dashboard also includes a rule-based AI Assistant that allows users to ask natural-language rehabilitation-monitoring questions. The assistant dynamically selects and combines information from existing MCP tools to provide patient-level and cohort-level summaries, risk explanations, rehabilitation concerns, intervention recommendations, alert information, and monitoring insights.
AI Agent Documentation
The repository includes an AGENTS.md file that provides project-specific guidance for AI coding agents such as Goose, Claude Code, GitHub Copilot, Codex, and Cursor.
The document describes:
project goals
repository structure
MCP tools and workflows
development workflow
testing instructions
coding conventions
risk-classification logic
persistence behaviour
project-specific constraints
AI-assisted development guidelines
The AGENTS.md file serves as the primary reference for AI agents working on the rehabilitation-monitoring MCP server.
What it provides
Tools
get_patient_informationcalculate_patient_risk_scoresidentify_declining_rehabilitation_outcomesgenerate_rehabilitation_reportscreate_patient_alertscreate_intervention_planreview_and_update_patient_plansearch_rehabilitation_research
Prompts
generate_patient_progress_summariescreate_rehabilitation_monitoring_reportsexplain_risk_classificationsrecommend_follow_up_actions
Resources
rehab://data/patients.csvrehab://data/therapy_sessions.csvrehab://data/wearable_measurements.csvrehab://data/medication_adherence.csvrehab://alerts
Data directory
By default the server reads CSV files from ./data. You can override that with REHAB_DATA_DIR.
Expected filenames:
patients.csvtherapy_sessions.csvwearable_measurements.csvmedication_adherence.csv
Firecrawl research search
The research search tool uses the Firecrawl API. Set:
FIRECRAWL_API_KEYoptionally
FIRECRAWL_API_URLif you use a different endpoint
The tool uses Firecrawl to retrieve rehabilitation-related research papers and summaries from external sources.
Example MCP Usage
Examples:
Calculate patient risk scores
Generate rehabilitation reports
Identify declining rehabilitation outcomes
Create patient alerts
Retrieve rehabilitation-related research
Example prompts:
Use the rehab-monitor MCP server to calculate patient risk scores.
Use the rehab-monitor MCP server to generate a rehabilitation report for patient P001.
Use the rehab-monitor MCP server to search rehabilitation research related to stroke recovery.
Example dashboard workflows:
Review a patient rehabilitation plan.
Monitor rehabilitation alerts.
Review intervention plans.
Monitor rehabilitation risk levels across the patient cohort.
Ask natural-language rehabilitation-monitoring questions through the AI Assistant.
Sample Data
The repository includes synthetic rehabilitation monitoring datasets containing:
patient records
therapy session data
wearable sensor measurements
medication adherence records
These datasets are intended for MCP development and testing purposes only and do not contain real patient information.
Run
Run the MCP Server
uv run rehab-monitorOr run the server module directly:
uv run python -m rehab_monitor.serverRun the Gradio Dashboard
uv run python app.pyThe dashboard will be available at:
http://127.0.0.1:7860The Gradio dashboard uses the existing MCP tools and workflows without modifying the underlying server logic.
Available Tools
6 toolscalculate_patient_risk_scoresB
Calculate rehabilitation risk scores using patient records, therapy sessions, wearable measurements, and medication adherence data.
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | No | Optional patient identifier. If omitted, the report covers all patients in the CSV data. | |
| lookback_days | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description should fully disclose behavioral traits. It mentions calculation and data sources but omits whether the tool is read-only or mutates any state, required permissions, side effects, or output format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no redundant information, and the action (calculate) and resources (risk scores) are front-loaded. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and moderate complexity (multiple data sources). The description fails to explain what the risk scores look like, how they are formatted, or any thresholds. It also does not mention that omitting patient_id covers all patients, though the schema does. Overall incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has two parameters with 50% description coverage (patient_id has a description, lookback_days does not). The tool description adds context on data sources but does not explain lookback_days or provide additional semantics beyond the schema for patient_id. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool calculates rehabilitation risk scores and lists specific data sources (patient records, therapy sessions, wearable measurements, medication adherence). It effectively distinguishes from siblings like 'identify_declining_rehabilitation_outcomes' which focuses on decline detection rather than scoring.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites, context, or conditions for invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_patient_alertsB
Create and persist alerts for patients whose rehabilitation risk or declines cross the configured thresholds.
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | No | Optional patient identifier. | |
| lookback_days | No | ||
| risk_threshold | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry full behavioral disclosure. It indicates a write operation ('create and persist') but does not mention side effects (e.g., whether it overwrites existing alerts), authorization needs, or error conditions. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that front-loads the purpose. It is concise with no superfluous information, though structured formatting (e.g., parameter list) could improve readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has three parameters with low schema coverage and no output schema or annotations. The description does not hint at the return value (e.g., created alert details) or error handling. Given its complexity as a creation tool, more context is needed for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only one of three parameters (patient_id) has a schema description. The description adds context for risk_threshold and lookback_days by linking them to the threshold-crossing logic, but does not fully explain their meanings or valid values. It complements the schema modestly but leaves gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (create and persist alerts) and the condition (patients whose rehabilitation risk or declines cross thresholds). It distinguishes from siblings like calculate_patient_risk_scores, but the term 'declines' is slightly ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (when thresholds are crossed) but does not explicitly state when not to use or provide alternatives. It lacks guidance on prerequisites, such as requiring risk scores or decline identification first.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_rehabilitation_reportsA
Generate a markdown rehabilitation report for one patient or the whole cohort.
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | No | Optional patient identifier. | |
| lookback_days | No | ||
| include_research | No | Include a Firecrawl-backed rehabilitation research section. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Mentions generating a report and optional Firecrawl research section, but does not clearly state whether it is read-only, any side effects, permissions, or rate limits. 'Generate' suggests non-destructive, but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence front-loads key purpose. No wasted words, but could benefit from breaking out options (e.g., single patient vs cohort, optional research inclusion).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 parameters, no output schema, and no annotations, description fails to provide sufficient context. Missing behavioral traits, output format details, and how 'whole cohort' is specified. Leaves agent uncertain about usage boundaries.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 67% of parameters (patient_id, include_research have descriptions; lookback_days missing). Description adds no extra meaning beyond schema. Does not explain lookback_days or parameter interactions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'generate' and resource 'markdown rehabilitation report', and distinguishes between 'one patient or the whole cohort'. This differentiates it from sibling tools like calculate_patient_risk_scores or search_rehabilitation_research.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage for generating reports, but no explicit guidance on when to use this versus siblings like identify_declining_rehabilitation_outcomes or search_rehabilitation_research. No when-not-to-use information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_patient_informationC
Get patient information from the available rehabilitation data sources.
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | Yes | Patient identifier. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description offers minimal behavioral context beyond the verb 'get'. It does not disclose whether the operation is read-only, what data sources are queried, or any side effects, leaving the agent with little understanding of the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no extraneous words. However, it could include more useful information without becoming overly verbose, so it is slightly above average but not perfect.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of five sibling tools and no output schema, the description is too minimal. It fails to specify what kind of patient information is retrieved (e.g., demographics, medical history), making it incomplete for an agent to use effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the parameter description ('Patient identifier.') is clear. However, the tool description adds no additional meaning beyond the schema, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves patient information from rehabilitation data sources, but it is somewhat broad and does not distinguish from sibling tools that also involve patient data, like calculate_patient_risk_scores.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description lacks any context about prerequisites, exclusions, or specific scenarios, providing no help for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
identify_declining_rehabilitation_outcomesC
Identify patients whose rehabilitation outcomes are declining across the available measurements.
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | No | Optional patient identifier. | |
| lookback_days | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but does not disclose behavioral traits like how decline is determined, what measurements are used, or that lookback_days controls the time window. Lacks transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise but under-specified. It could be improved by adding key details about parameters without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description is incomplete. It does not explain the output format, the meaning of 'declining', or how the parameters affect results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50% (only patient_id has a description). The tool description adds no meaning for either parameter, failing to explain that lookback_days sets the time range or how patient_id filters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Identify' and the resource 'patients whose rehabilitation outcomes are declining', which distinguishes it from sibling tools like calculate_patient_risk_scores or create_patient_alerts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description only states what it does, not when it should be chosen over similar tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_rehabilitation_researchC
Search Firecrawl for rehabilitation-related research papers and summaries.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | No | rehabilitation therapy outcome monitoring occupational therapy physical therapy |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully convey behavioral traits. It only states what the tool does, but lacks details on side effects, idempotency, or constraints like rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence. It is front-loaded with the verb. Could be improved by brief parameter hints, but overall concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple search tool with two parameters and no output schema, the description is minimally adequate but lacks details about output format, what 'Firecrawl' is, or how to refine searches.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds no meaning for the parameters (query and limit). The schema provides defaults and constraints, but the description should explain how to formulate queries or how limit affects results.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (Search) and resource (Firecrawl for research papers and summaries). It is specific and distinct from sibling tools which focus on patient-specific operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Sibling tools are listed but no explicit when/when-not or selection criteria provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
calculate_patient_risk_scores - First observed
create_patient_alerts - First observed
generate_rehabilitation_reports - First observed
get_patient_information - First observed
identify_declining_rehabilitation_outcomes - First observed
search_rehabilitation_research
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: risk calculation, alert creation, report generation, patient info retrieval, outcome decline detection, and research search. No overlap in functionality.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., calculate_patient_risk_scores, create_patient_alerts, generate_rehabilitation_reports). No deviations.
Six tools is well-scoped for a rehabilitation monitoring server, covering the core tasks without being too few or excessive.
The tools cover risk assessment, alerting, reporting, patient info, outcome decline identification, and research. Minor gaps exist (e.g., no tool for inputting or updating patient measurements), but the surface is largely complete for monitoring and analysis.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for US nursing facility search and ownership lookup (NursingHomeDatabase).
MCP server for Altmetric APIs - track research attention across news, policy, social media, and more
An MCP server that automatically collects feedback on your MCP server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides healthcare tools for interacting with FHIR data and medical resources on EMRs like Cerner and Epic1MIT
- AlicenseAqualityCmaintenanceAn MCP server that connects AI assistants to OpenEMR instances to manage patient records, clinical trends, and medication safety. It provides 17 tools for tasks such as patient search, drug interaction checks, and generating comprehensive health trajectories and visit preparations.17MIT
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that bridges AI applications with FHIR healthcare data systems, enabling patient data access, clinical data retrieval, and data quality assessment.4-
- AlicenseAqualityCmaintenanceMCP server for healthcare claims workflow scoring, validation, and feedback, supporting denial risk, prior authorization, and reimbursement assessment.8MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/miiakorhonen/rehab-monitor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server