NextGen Office MCP server for AI agents

Live

SMART ON FHIR

CLINICAL RECORDS

AI

NextGen Office gives your agent read access to clinical records over FHIR: search patients, and read problems, medications, observations, encounters, clinical notes, care plans, and coverage.

  • 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.
NextGen Office
agent · Acme Q3
Run
What problems are on patient 61207's list?
S
nextgenoffice_condition_search
122ms
Clinical agent
Patient 61207 has 3 active problems: type 2 diabetes, hypertension, and hyperlipidemia.
Sources: NextGen Office FHIR Condition
nextgenoffice
3 conditions
18:29
Message Claude...

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

CALL ANY TOOL
48 read-only tools for clinical records in NextGen Office over FHIR: search and read patients, problems, medications, observations, encounters, documents, care plans, coverage, and orders.
nextgenoffice_allergy_intolerance_read
Read allergy intolerance
Get one AllergyIntolerance resource from NextGen Office by its FHIR ID. Returns the AllergyIntolerance with its allergy and intolerance details, with substances coded in RxNorm, reactions, severity and status. Use this when you have the ID; use nextgenoffice_allergy_intolerance_search to find records.
Parameters
Name
Type
Required
Description
allergy_intolerance_id
string
Required
FHIR logical ID of the AllergyIntolerance resource to return. Example: 12345.
nextgenoffice_allergy_intolerance_search
Search allergy intolerance
nextgenoffice_care_plan_read
Read care plan
nextgenoffice_care_plan_search
Search care plan
nextgenoffice_condition_read
Read condition
nextgenoffice_condition_search
Search condition
nextgenoffice_coverage_search
Search coverage
nextgenoffice_device_read
Read device
nextgenoffice_diagnostic_report_read
Read diagnostic report
nextgenoffice_diagnostic_report_search
Search diagnostic report
nextgenoffice_document_reference_search
Search document reference
nextgenoffice_encounter_read
Read encounter
nextgenoffice_goal_search
Search goal
nextgenoffice_immunization_read
Read immunization
nextgenoffice_location_read
Read location
nextgenoffice_medication_administration_search
Search medication administration
nextgenoffice_medication_dispense_read
Read medication dispense
nextgenoffice_medication_dispense_search
Search medication dispense
nextgenoffice_next_page
Next page
nextgenoffice_observation_read
Read observation
nextgenoffice_observation_search
Search observation
nextgenoffice_organization_read
Read organization
nextgenoffice_organization_search
Search organization
nextgenoffice_practitioner_read
Read practitioner
nextgenoffice_practitioner_role_search
Search practitioner role
nextgenoffice_procedure_read
Read procedure
nextgenoffice_procedure_search
Search procedure
nextgenoffice_provenance_read
Read provenance
nextgenoffice_service_request_read
Read service request
nextgenoffice_service_request_search
Search 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);

// NextGen Office tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["nextgenoffice"], toolNames: [
    "nextgenoffice_patient_search",
    "nextgenoffice_condition_search",
    "nextgenoffice_observation_search"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Find Maria Lopez and list her problems and latest vital signs" }] });
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: ["nextgenoffice"] }, pageSize: 100,
});

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

// Execute the tool call with the user's vaulted NextGen Office 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: ["nextgenoffice"] }, 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 problems and latest vital signs" }],
  tools,
});

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

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

await agent.run("Find Maria Lopez and list her problems and latest vital signs");
Try these prompts
Copy any prompt into your agent. Each maps directly to a NextGen Office 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
List this patient's problems and health concerns.
Copy the prompt
Copied
Show this patient's insurance coverage.
Clinical data
Copy the prompt
Copied
Get this patient's latest vital signs.
Copy the prompt
Copied
List lab and radiology reports for this patient.
Copy the prompt
Copied
Show medications administered to this patient.
Visits and documents
Copy the prompt
Copied
List this patient's visits from this year.
Copy the prompt
Copied
Find the clinical notes for this patient's last visit.
Copy the prompt
Copied
List this patient's orders and referrals.
SEE HOW AUTH WORKS
Each user signs in to NextGen Office 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
NextGen Office
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
NextGen Office
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
NextGen Office
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
NextGen Office
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 NextGen Office token looks fine in a demo. In production every chart read 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.
NextGen Office 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 NextGen Office as the user or through a shared service account?
As the user. Each user signs in to NextGen Office once with SMART on FHIR, and Scalekit stores and refreshes their tokens. Every chart read in your audit trail is attributed to that user, not a shared service account.
Where is the NextGen Office 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 NextGen Office?
Yes. Every NextGen Office tool is read-only, so the agent can search and read chart data but cannot change it. Filter by tool name in listScopedTools to narrow it further, for example to patient, condition, and observation tools only. Scalekit also enforces scope checks before every API call.
What happens when a user revokes NextGen Office 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.
Which records can the agent read in NextGen Office?
Patients and their problems, allergies, medications, immunizations, observations, encounters, clinical notes, care plans, care teams, goals, coverage, devices, procedures, orders, and referrals, plus practitioners, locations, and organizations. nextgenoffice_next_page fetches further pages of 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"": {
""nextgenoffice"": {
""url"": ""https://mcp.scalekit.com/nextgenoffice"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.nextgenoffice]
url = ""https://mcp.scalekit.com/nextgenoffice""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""nextgenoffice"": {
""url"": ""https://mcp.scalekit.com/nextgenoffice"",
""type"": ""http""
}
}
}