AdvancedMD MCP server for AI agents

Live

SMART ON FHIR

CLINICAL RECORDS

AI

AdvancedMD gives your agent clinical records over FHIR: search patients, encounters, conditions, observations, and medications, book appointments, and pull a full patient record.

  • Per-user credentials: each call uses the actual user's token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
AdvancedMD
agent · Acme Q3
Run
Pull the latest vitals for patient 48213.
S
advancedmd_observation_lastn
164ms
Clinical agent
Latest vitals for patient 48213: blood pressure 128/82, heart rate 74 bpm, and BMI 26.1, all recorded at the March 4 visit.
Sources: AdvancedMD FHIR Observation, vital-signs
advancedmd
3 observations
18:29
Message Claude...

Tools your clinical agent reaches for on AdvancedMD, scoped per user.

CALL ANY TOOL
89 tools for clinical records in AdvancedMD over FHIR: read and search patients, encounters, conditions, observations, medications, and care plans, and create, update, or delete core resources.
advancedmd_allergy_intolerance_create
Create allergy intolerance
Create a new FHIR AllergyIntolerance resource recording a patient's allergy or intolerance to a substance.
Parameters
Name
Type
Required
Description
code
string
Required
Code identifying the substance (RxNorm, SNOMED, or NDF-RT)
code_system
string
Required
Code system URI for the substance code
patient_id
string
Required
FHIR logical ID of the patient
category
string
Optional
Category: food, medication, environment, biologic
clinical_status
string
Optional
Clinical status: active, inactive, resolved
code_display
string
Optional
Human-readable display for the substance
criticality
string
Optional
Criticality: low, high, unable-to-assess
note
string
Optional
Free-text note about the allergy
onset_date_time
string
Optional
Date/time of allergy onset (ISO 8601)
type
string
Optional
Type: allergy or intolerance
advancedmd_allergy_intolerance_delete
Delete allergy intolerance
advancedmd_allergy_intolerance_read
Read allergy intolerance
advancedmd_allergy_intolerance_search
Search allergy intolerance
advancedmd_allergy_intolerance_update
Update allergy intolerance
advancedmd_care_team_read
Read care team
advancedmd_care_team_search
Search care team
advancedmd_conceptmap_translate
Conceptmap translate
advancedmd_device_read
Read device
advancedmd_device_search
Search device
advancedmd_diagnostic_report_create
Create diagnostic report
advancedmd_diagnostic_report_delete
Delete diagnostic report
advancedmd_diagnostic_report_update
Update diagnostic report
advancedmd_encounter_read
Read encounter
advancedmd_encounter_search
Search encounter
advancedmd_immunization_read
Read immunization
advancedmd_immunization_search
Search immunization
advancedmd_medication_request_create
Create medication request
advancedmd_medication_request_delete
Delete medication request
advancedmd_medication_request_read
Read medication request
advancedmd_medication_request_search
Search medication request
advancedmd_medication_request_update
Update medication request
advancedmd_observation_lastn
Observation lastn
advancedmd_patient_create
Create patient
advancedmd_patient_delete
Delete patient
advancedmd_patient_read
Read patient
advancedmd_patient_search
Search patient
advancedmd_patient_update
Update patient
advancedmd_provenance_read
Read provenance
advancedmd_related_person_search
Search related person

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// AdvancedMD tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["advancedmd"], toolNames: [
    "advancedmd_patient_search",
    "advancedmd_observation_lastn",
    "advancedmd_appointment_create"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Find patient Maria Lopez and pull her latest vitals" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["advancedmd"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Find patient Maria Lopez and pull her latest vitals" }],
  tools,
});

// Execute the tool call with the user's vaulted AdvancedMD token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["advancedmd"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Find patient Maria Lopez and pull her latest vitals" }],
  tools,
});

// Tool call runs with the user's vaulted AdvancedMD token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["advancedmd"] }, pageSize: 100,
});

const agent = new Agent({
  name: "clinical_agent",
  model: "gemini-2.5-pro",
  instruction: "AdvancedMD tools scoped to this user",
  tools,
});

await agent.run("Find patient Maria Lopez and pull her latest vitals");
Try these prompts
Copy any prompt into your agent. Each maps directly to a AdvancedMD tool. Click to copy, paste into your agent, done.
Patient records
Copy the prompt
Copied
Search for patients named Maria Lopez born in 1984.
Copy the prompt
Copied
Pull everything on file for this patient in one bundle.
Copy the prompt
Copied
List active conditions for this patient.
Clinical data
Copy the prompt
Copied
Get the latest vital signs for this patient.
Copy the prompt
Copied
Show active medication requests for this patient.
Copy the prompt
Copied
List lab diagnostic reports for this patient from the last 6 months.
Scheduling and charting
Copy the prompt
Copied
Book an appointment for this patient with Dr. Chen next Tuesday at 10am.
Copy the prompt
Copied
Reschedule this appointment to Thursday.
Copy the prompt
Copied
Record a penicillin allergy for this patient.
SEE HOW AUTH WORKS
Each user signs in to AdvancedMD once; Scalekit stores and refreshes their tokens. Credentials stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
AdvancedMD
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
AdvancedMD
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
AdvancedMD
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
AdvancedMD
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other healthcare and data connectors.
Support and Ops Teams
Meeting prep
Pulls agenda, participant context, and open action items before every meeting.
Support and Ops Teams
Support ticket automation agent
Fetches new Zendesk tickets, drafts a reply from Notion knowledge base articles, digests what it cannot answer to Slack, and archives the rest, acting as the support agent rather than a shared API key.
Support and Ops Teams
Email-to-calendar agent
Reads scheduling intent out of Gmail threads, resolves the times everyone actually has free, and creates the event on the user's own Google Calendar. No shared service account.
Engineering Teams
Slack triage
Polls Slack for new messages, classifies bugs and support requests with a LangGraph router, files GitHub issues or Zendesk tickets, and confirms in the thread.
Test other agents
See the same per-user auth pattern across other healthcare and data connectors.
OPS
Meeting prep agent
Assemble the agenda, HubSpot attendee history, and open action items from Gmail before every meeting on the calendar.
SUPPORT
Support ticket automation (Google ADK)
Fetch, annotate, and archive Zendesk tickets with Notion context, digesting anything it cannot answer to Slack.
OPS
Email-to-calendar scheduling agent
Read scheduling intent out of Gmail threads, resolve mutual free time, and create the Google Calendar event.
ENGINEERING
Slack triage agent
Classify new Slack messages as bugs or support requests, file the GitHub issue or Zendesk ticket, and reply in the thread.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared AdvancedMD token looks fine in a demo. In production every chart read and write looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
AdvancedMD today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access AdvancedMD as the user or through a shared service account?
As the user. Each user signs in to AdvancedMD once with SMART on FHIR, and Scalekit stores and refreshes their tokens. Every chart read and write in your audit trail is attributed to that user, not a shared service account.
Where is the AdvancedMD OAuth token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. Refresh is automatic. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in AdvancedMD?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the 53 read-only tools without the create, update, and delete tools. Scalekit also enforces scope checks before every API call.
What happens when a user revokes AdvancedMD access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
How do SMART on FHIR scopes limit what the agent can reach?
You choose the SMART on FHIR scopes when you create the connection, such as patient/Patient.read or patient/*.read, and they must match your AdvancedMD app registration. Every call runs inside those scopes and the signed-in user's access. Drop the create, update, and delete tools from toolNames to keep the agent read-only.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""advancedmd"": {
""url"": ""https://mcp.scalekit.com/advancedmd"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.advancedmd]
url = ""https://mcp.scalekit.com/advancedmd""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""advancedmd"": {
""url"": ""https://mcp.scalekit.com/advancedmd"",
""type"": ""http""
}
}
}