Athena Health MCP Server
A Model Context Protocol (MCP) server for integrating with Athena Health's API to manage appointments, providers, departments, and patient data.
Overview
This MCP server provides tools for:
- Appointment management (create, update, cancel, view)
- Provider and department information
- Patient search functionality
- Available appointment slot discovery
Setup
Prerequisites
- Python 3.8+
- Required environment variables:
ATHENA_CLIENT_ID
: Your Athena Health API client IDATHENA_CLIENT_SECRET
: Your Athena Health API client secretATHENA_PRACTICE_ID
: Your practice IDATHENA_BASE_URL
: (Optional) API base URL (defaults to production)
Installation
- Install dependencies:
- Set environment variables:
- Run the server:
Available Tools
1. get_appointments
Retrieve appointments for a specific date range with optional filtering.
Parameters:
start_date
(required): Start date in YYYY-MM-DD formatend_date
(required): End date in YYYY-MM-DD formatprovider_id
(optional): Provider ID to filter appointmentsdepartment_id
(optional): Department ID to filter appointments
Example:
2. get_available_slots
Get available appointment slots for scheduling.
Parameters:
provider_id
(required): Provider IDdepartment_id
(required): Department IDappointment_type_id
(required): Appointment type IDstart_date
(required): Start date in YYYY-MM-DD formatend_date
(required): End date in YYYY-MM-DD format
Example:
3. create_appointment
Create a new appointment.
Parameters:
patient_id
(required): Patient IDprovider_id
(required): Provider IDdepartment_id
(required): Department IDappointment_type_id
(required): Appointment type IDappointment_date
(required): Appointment date in YYYY-MM-DD formatappointment_time
(required): Appointment time in HH formatreason_for_visit
(optional): Reason for the visit
Example:
4. update_appointment
Update an existing appointment.
Parameters:
appointment_id
(required): Appointment ID to updateappointment_date
(optional): New appointment date in YYYY-MM-DD formatappointment_time
(optional): New appointment time in HH formatreason_for_visit
(optional): Updated reason for the visitnotes
(optional): Additional notes
Example:
5. cancel_appointment
Cancel an appointment.
Parameters:
appointment_id
(required): Appointment ID to cancelcancellation_reason
(optional): Reason for cancellation
Example:
6. get_providers
Get list of providers with optional filtering.
Parameters:
department_id
(optional): Department ID to filter providersspecialty
(optional): Specialty to filter providers
Example:
7. get_departments
Get list of all departments.
Parameters: None
Example:
8. get_appointment_types
Get available appointment types with optional filtering.
Parameters:
department_id
(optional): Department ID to filter appointment typesprovider_id
(optional): Provider ID to filter appointment types
Example:
9. search_patients
Search for patients by various criteria.
Parameters:
first_name
(optional): Patient first namelast_name
(optional): Patient last namedate_of_birth
(optional): Date of birth in YYYY-MM-DD formatphone
(optional): Phone numberemail
(optional): Email address
Example:
API Endpoints
The server interacts with the following Athena Health API endpoints:
POST /oauth2/v1/token
- AuthenticationGET /v1/{practice_id}/appointments
- Get appointmentsGET /v1/{practice_id}/appointments/open
- Get available slotsPOST /v1/{practice_id}/appointments
- Create appointmentPUT /v1/{practice_id}/appointments/{id}
- Update appointmentGET /v1/{practice_id}/providers
- Get providersGET /v1/{practice_id}/departments
- Get departmentsGET /v1/{practice_id}/appointmenttypes
- Get appointment typesGET /v1/{practice_id}/patients
- Search patients
Authentication
The server automatically handles OAuth2 authentication using client credentials flow. Tokens are cached and refreshed as needed.
Error Handling
The server includes comprehensive error handling for:
- Authentication failures
- API request failures
- Invalid parameters
- Network errors
All errors are logged and returned as part of the tool response.
Usage Examples
Complete Workflow Example
- Get departments:
- Get providers in a department:
- Get appointment types:
- Search for available slots:
- Search for a patient:
- Create an appointment:
Response Format
All tool responses are returned as JSON strings containing the API response data. For example:
Troubleshooting
Common Issues
- Authentication Errors:
- Verify your
ATHENA_CLIENT_ID
andATHENA_CLIENT_SECRET
are correct - Ensure your API credentials have the necessary permissions
- Verify your
- Missing Environment Variables:
- The server will exit with an error message listing missing variables
- Set all required environment variables before running
- API Request Failures:
- Check that your
ATHENA_PRACTICE_ID
is correct - Verify the API endpoints are accessible from your network
- Review the error response for specific API error messages
- Check that your
Logging
The server logs all operations at INFO level. Check the console output for detailed information about:
- Authentication attempts
- API requests and responses
- Error details
Security Considerations
- Never commit API credentials to version control
- Use environment variables for all sensitive configuration
- The server automatically handles token refresh and secure storage
- All API communication uses HTTPS
Support
For issues with the MCP server implementation, check the logs for detailed error messages. For Athena Health API-specific issues, refer to the official Athena Health API documentation. # athenahealth-mcp
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with Athena Health's API for comprehensive healthcare practice management. Supports appointment scheduling, provider and department management, patient search, and available slot discovery through natural language.
Related MCP Servers
- -securityFlicense-qualityEnables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.Last updated -59JavaScript
- -securityAlicense-qualityThis server implementation allows AI assistants to interact with Asana's API, enabling users to manage tasks, projects, workspaces, and comments through natural language requests.Last updated -628TypeScriptMIT License
- -securityFlicense-qualityAn intelligent hospital appointment management system that allows users to add doctors/patients, book appointments, and view medical schedules through both a manual UI and an LLM-powered assistant interface.Last updated -JavaScript
- AsecurityAlicenseAqualityProvides seamless integration between AI assistants and Prometheus, enabling natural language interactions with your monitoring infrastructure. This server allows for effortless querying, discovery, and analysis of metrics.Last updated -102516TypeScriptMIT License