eClinicalWorks MCP server for AI agents

Live

SMART ON FHIR

CLINICAL RECORDS

AI

eClinicalWorks gives your agent clinical records over FHIR: search patients, conditions, medications, and observations, write clinical notes and telephone encounters, place orders and referrals, and create tasks.

  • 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.
eClinicalWorks
agent · Acme Q3
Run
Pull everything on file for patient 55210 before tomorrow's visit.
S
eclinicalworks_patient_everything
238ms
Clinical agent
Patient 55210's record includes 4 active problems, 6 current medications, and 2 encounters in the last 90 days.
Sources: eClinicalWorks FHIR $everything
eclinicalworks
1 bundle
18:29
Message Claude...

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

CALL ANY TOOL
77 tools for clinical records in eClinicalWorks over FHIR: read and search patients, encounters, conditions, medications, and observations, add notes, vitals, and diagnoses, place orders and referrals, and manage coverage.
eclinicalworks_allergy_intolerance_create
Create allergy intolerance
Record an allergy or adverse reaction for a patient in eClinicalWorks. The entry lands in the chart's App Data tab, where a clinician reconciles it into the chart. Returns a transaction-response Bundle whose entry[0].response.location holds the new resource's FHIR ID (check entry[0].response.status for eCW error codes). Use eclinicalworks_allergy_intolerance_search to check existing allergies first. eCW requires a signed write contract for this scope.
Parameters
Name
Type
Required
Description
patient_id
string
Required
FHIR logical ID of the patient (the `id` returned by eCW, an opaque string; not an MRN or account number). Example: 12345.
substance
string
Required
Name of the allergen, shown as the allergy name in eCW. Example: Penicillin.
clinical_status
string
Optional
Allergy status: active or inactive. One of: `active`, `inactive`.
code
string
Optional
Optional code of the allergen (for example a SNOMED or RxNorm code). Example: 764146007.
code_system
string
Optional
Code system URI for code. Example: http://snomed.info/sct or http://www.nlm.nih.gov/research/umls/rxnorm.
criticality
string
Optional
Criticality: high, low or unable-to-assess. One of: `high`, `low`, `unable-to-assess`.
onset_date_time
string
Optional
Date the allergy was identified, as an ISO 8601 date-time with offset. Example: 2026-01-15T10:00:00-05:00.
reaction
string
Optional
Reaction text in eCW's '<reaction type> : <reaction>' format, where the type is Side Effects, Lack of Therapeutic Effect or Contraindication (eCW uses Allergy when no type is given). Example: Contraindication : hives.
eclinicalworks_allergy_intolerance_read
Read allergy intolerance
eclinicalworks_allergy_intolerance_search
Search allergy intolerance
eclinicalworks_care_plan_read
Read care plan
eclinicalworks_care_team_search
Search care team
eclinicalworks_condition_create
Create condition
eclinicalworks_coverage_delete
Delete coverage
eclinicalworks_coverage_read
Read coverage
eclinicalworks_coverage_update
Update coverage
eclinicalworks_device_search
Search device
eclinicalworks_diagnostic_report_read
Read diagnostic report
eclinicalworks_document_reference_pdf_create
Create document reference pdf
eclinicalworks_encounter_search
Search encounter
eclinicalworks_family_member_history_read
Read family member history
eclinicalworks_goal_search
Search goal
eclinicalworks_immunization_create
Create immunization
eclinicalworks_immunization_update
Update immunization
eclinicalworks_location_read
Read location
eclinicalworks_medication_administration_search
Search medication administration
eclinicalworks_medication_dispense_read
Read medication dispense
eclinicalworks_next_page
Next page
eclinicalworks_observation_read
Read observation
eclinicalworks_observation_search
Search observation
eclinicalworks_observation_vitals_create
Create observation vitals
eclinicalworks_patient_search
Search patient
eclinicalworks_practitioner_read
Read practitioner
eclinicalworks_procedure_read
Read procedure
eclinicalworks_procedure_search
Search procedure
eclinicalworks_related_person_read
Read related person
eclinicalworks_service_request_create
Create service request

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);

// eClinicalWorks tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["eclinicalworks"], toolNames: [
    "eclinicalworks_patient_search",
    "eclinicalworks_patient_everything",
    "eclinicalworks_condition_search"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Find Maria Lopez and list her active problems before tomorrow's visit" }] });
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: ["eclinicalworks"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Find Maria Lopez and list her active problems before tomorrow's visit" }],
  tools,
});

// Execute the tool call with the user's vaulted eClinicalWorks OAuth 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: ["eclinicalworks"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Find Maria Lopez and list her active problems before tomorrow's visit" }],
  tools,
});

// Tool call runs with the user's vaulted eClinicalWorks OAuth 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: ["eclinicalworks"] }, pageSize: 100,
});

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

await agent.run("Find Maria Lopez and list her active problems before tomorrow's visit");
Try these prompts
Copy any prompt into your agent. Each maps directly to a eClinicalWorks 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 this patient's lab observations from the last 6 months.
Charting
Copy the prompt
Copied
Write a progress note into this patient's encounter from today.
Copy the prompt
Copied
Create a telephone encounter for this patient's callback about refills.
Copy the prompt
Copied
Record a blood pressure reading of 128/82 for this patient.
Orders and coverage
Copy the prompt
Copied
Place a lab order for a lipid panel for this patient.
Copy the prompt
Copied
Create an outgoing referral for this patient to cardiology.
Copy the prompt
Copied
Add this insurance policy to the patient's demographics.
SEE HOW AUTH WORKS
Each user signs in to eClinicalWorks once, and Scalekit stores and refreshes their tokens. Credentials stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
eClinicalWorks
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
eClinicalWorks
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
eClinicalWorks
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
eClinicalWorks
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 connectors.
Support and Ops Teams
Meeting prep
Pulls agenda, participant context, and open action items before every meeting.
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 connectors.
OPS
Meeting prep agent
Assemble the agenda, HubSpot attendee history, and open action items from Gmail before every meeting on the calendar.
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 eClinicalWorks token looks fine in a demo. In production every chart entry 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.
eClinicalWorks 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 eClinicalWorks as the user or through a shared service account?
As the user. Each user signs in to eClinicalWorks 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 eClinicalWorks 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 eClinicalWorks?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the read and search tools without eclinicalworks_coverage_delete or eclinicalworks_organization_patient_pharmacy_delete, which remove an insurance policy or a pharmacy from a patient's record. Scalekit also enforces scope checks before every API call.
What happens when a user revokes eClinicalWorks 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.
Can the agent pull a patient's full record from eClinicalWorks in one call?
Yes. eclinicalworks_patient_everything runs the FHIR $everything operation on a patient and returns a Bundle of their record. For a narrower view, the search tools filter by resource type, and eclinicalworks_next_page follows the next link in long results.
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"": {
""eclinicalworks"": {
""url"": ""https://mcp.scalekit.com/eclinicalworks"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.eclinicalworks]
url = ""https://mcp.scalekit.com/eclinicalworks""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""eclinicalworks"": {
""url"": ""https://mcp.scalekit.com/eclinicalworks"",
""type"": ""http""
}
}
}