Anthropic (Claude)
MCP Client Configuration Guide
Configure Anthropic Claude to access b.well's healthcare data and services through b.well Health SDK for AI. This guide includes configuration parameters and code examples for quickly setting up the MCP client in Anthropic's Messages API.
Prerequisites
Install the Anthropic Python library:
pip install anthropicRequired Credentials:
| Credential | Source | Notes |
|---|---|---|
| Anthropic API Key | Anthropic platform account | Required for all requests |
| b.well User Token | OAuth 2.0 Token Exchange | Bearer token for user authentication |
MCP Configuration Parameters:
Anthropic connects to b.well's MCP server through the tools parameter in the Messages API. Configure the MCP tool with these parameters:
| Parameter | Value | Description |
|---|---|---|
type | "url" | Indicates URL-based MCP integration |
name | "bwell-mcp-fhir-agent" | Identifier for b.well MCP server |
url | https://mcpfhiragent.{ENVIRONMENT}.icanbwell.com/fhir/ | b.well MCP server endpoint (client-sandbox) |
authorization_token | User access token | Bearer token for user authentication |
Code Example: Bearer Token Authentication
Use this approach when you have a user access token from b.well's OAuth 2.0 token exchange
import anthropic
client = anthropic.Anthropic(api_key="{insert your anthropic key here}")
person_id = "{insert person id here}"
user_token = "{insert your user token here}"
mcp_fhir_agent_url = "https://mcpfhiragent.client-sandbox.icanbwell.com/fhir/"
response = client.beta.tools.messages.create(
model="claude-sonnet-4-5",
tools=[{
"type": "url",
"name": "bwell-mcp-fhir-agent",
"url": mcp_fhir_agent_url,
"authorization_token": user_token,
}],
messages=[
{"role": "user", "content": f"Get Active Medications for person_id={person_id}"}
],
betas=["mcp-client-2025-04-04"]
)
print(response.content)Updated 8 days ago
