Integrating Claude with Haste Health
This guide provides step-by-step instructions for integrating Anthropic's Claude with your Haste Health platform using the Model Context Protocol (MCP). Claude can access your FHIR data through OAuth authentication, enabling AI-powered healthcare applications.
Overview
Claude integration with Haste Health involves:
- Registering a ClientApplication - Create OAuth credentials for Claude
- Installing Claude Desktop App - Set up the Claude application
- Configuring MCP Server - Connect Claude to Haste Health via MCP with OAuth
Prerequisites
Before you begin, ensure you have:
- ✅ A Haste Health account with admin access
- ✅ Access to create ClientApplication resources
- ✅ Your tenant and project identifiers
- ✅ Claude Desktop application installed (download from Claude.ai)
Step 1: Register a ClientApplication
First, create an OAuth client that Claude will use to authenticate with Haste Health.
- Admin App
- CLI
- Navigate to Security/ClientApplications in your Haste Health Admin App
- Click New
- Configure the following settings:
| Field | Value | Description |
|---|---|---|
| Name | Claude | Human-readable name |
| Grant Types | authorization_code and refresh_token | User authentication with refresh capability |
| Response Types | token | OAuth response type |
| Scope | openid profile email offline_access user/*.* | Access level (read-only or full access) |
| Redirect URIs | https://claude.ai/api/mcp/auth_callback | Redirect URI for OAuth flow |
Note that the redirect URI should be https://claude.ai/api/mcp/auth_callback per Claude Desktop's OAuth configuration requirements.
- Click Actions/Create
- ⚠️ Important: Copy and save the generated ID for later use.
haste-health api create ClientApplication '{
"resourceType": "ClientApplication",
"id": "claude",
"name": "Claude",
"grantType": [
"authorization_code",
"refresh_token"
],
"responseTypes": "token",
"redirectUri": [
"https://claude.ai/api/mcp/auth_callback"
],
"scope": "openid profile user/*.* offline_access"
}'
Response:
{
"resourceType": "ClientApplication",
"id": "claude",
"name": "Claude",
"grantType": [
"authorization_code",
"refresh_token"
],
"responseTypes": "token",
"redirectUri": [
"https://claude.ai/api/mcp/auth_callback"
],
"scope": "openid profile user/*.* offline_access"
}
Scope Configuration
Choose appropriate scopes based on what Claude needs to access:
Read-Only Access (Recommended for most cases):
"scope": "openid profile email user/*.read"
Specific Resource Types:
"scope": "openid profile email user/Patient.read user/Observation.read user/Condition.read"
Full Access (Use with caution):
"scope": "openid profile email offline_access user/*.*"
For more information, see Scopes documentation.
Step 2: Install Claude Desktop App
-
Download Claude:
- Visit Claude.ai
- Download the Claude Desktop application for your operating system (macOS, Windows, or Linux)
- Follow the installation instructions
-
Sign in to Claude:
- Launch the Claude Desktop application
- Sign in with your Anthropic account
-
Verify Installation:
- Open Claude Desktop
- Navigate to Settings → Developer
Step 3: Configure Claude Desktop
Configure Claude to connect with Haste Health via MCP.
- Go to Settings → Connectors in Claude Desktop
- Click Add Custom Connector
- Add Name as
Haste Health - Set the MCP Server URL to:
Replace
https://api.haste.health/w/[tenant]/[project]/api/v1/mcp[tenant]with your tenant name and[project]with your project ID. - Click Advanced Settings:
- Set ClientID to the ClientApplication ID created in Step 1
- Click Add
Step 4: Authenticate Claude with Haste Health
After configuring the MCP server:
- Click Connect on the Haste Health connector in Claude Desktop
- A browser window will open prompting you to log in to Haste Health
- Complete the OAuth flow to authorize Claude to access your Haste Health data
- Upon successful authentication, Claude will connect to Haste Health and access FHIR data as per the configured scopes.
Step 5: Test the Integration
Test that Claude can access your Haste Health data:
Example Prompts
List Patients:
Show me the first 10 patients in the system
Search for Observations:
Find all blood pressure observations from the last 30 days
Query Patient Data:
Get patient demographics for patient ID patient-123
Analyze Conditions:
List all patients with diabetes and their latest HbA1c readings
Clinical Summaries:
Create a summary of patient-456's recent encounters and medications
Troubleshooting
Common Issues
1. "Invalid Client" Error
Symptom: Claude cannot authenticate with Haste Health
Solutions:
- ✅ Check that the ClientApplication exists:
haste-health api read ClientApplication [client-id] - ✅ Ensure the ClientApplication has
authorization_codeandrefresh_tokengrant types - ✅ Verify the redirect URI is exactly
https://claude.ai/api/mcp/auth_callback(no port, with trailing slash)
2. "Insufficient Scope" Error
Symptom: Authentication works but data access fails
Solutions:
- ✅ Check the
scopefield in your ClientApplication resource - ✅ Ensure requested scopes in the config match what's configured in the ClientApplication
- ✅ Verify access policies grant permissions to your user account
3. "Redirect URI Mismatch" Error
Symptom: OAuth flow fails with redirect error
Solutions:
- ✅ Ensure ClientApplication
redirectUriis exactlyhttps://claude.ai/api/mcp/auth_callback - ✅ Do not include a port number
Use Cases
Clinical Decision Support
Use Claude to provide AI-powered clinical insights:
Analyze patient-123's recent lab results and suggest potential diagnoses based on current symptoms
Clinical Documentation
Generate clinical documentation:
Create a progress note for patient-456's encounter today, including vital signs, chief complaint, and plan
Patient Education
Create patient-friendly explanations:
Explain the diagnosis of Type 2 Diabetes to a patient in simple terms, including lifestyle modifications
Data Quality Auditing
Identify data quality issues:
Review all patients and identify those missing required demographic information or incomplete records
Natural Language Queries
Ask questions in plain English:
Show me all patients with hypertension who haven't had a blood pressure reading in the last year
Care Coordination
Coordinate patient care:
List all medications for patient-789 and check for potential interactions
Related Resources
- Model Context Protocol Specification
- Claude Documentation
- Client Registration - Complete ClientApplication documentation
- OAuth 2.0 Authorization codes - Authentication code grant details
- OAuth 2.0 Refresh tokens - Refresh token grant details
- Scopes - OAuth scope configuration
- Model Context Protocol - MCP overview and setup
- FHIR API Documentation - Available FHIR operations
Support
For issues or questions:
- Check the Troubleshooting section above
- Review Claude Developer logs for error details
- Verify your ClientApplication configuration
- Test OAuth authentication manually
- File an issue on the Haste Health GitHub repository