How to Use the Health Gorilla MCP in Vercel AI SDK
Build live clinical frontends that stream patient and lab data directly into your UI with the Vercel AI SDK.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Health Gorilla MCP to Vercel AI SDK
Create your Vinkius account to connect Health Gorilla to Vercel AI SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Find Patients and Providers in Real-Time
Stop forcing users to wait for loading spinners. When you connect this Health Gorilla MCP Server to your AI agent, you can build a UI where data appears as the user types. The agent uses `match_patient` to stream a list of potential matches into your React components, and `get_patient_demographics` fills in the rest of the form the moment a selection is made. This same principle applies to finding doctors. Your agent can power a live search box with `search_providers`, filtering by location or specialty on the fly. Clicking a provider's name triggers a call to `get_provider_details`, instantly populating their information without a full page reload. It makes your application feel connected and responsive, not sluggish.
Stream Order Status Directly to Your UI
Users shouldn't have to hit refresh to see if their lab results are ready. Use your Vercel AI SDK agent to call `list_orders` and populate a patient's dashboard. When they click on a specific order, the agent uses `get_order_status` to fetch the very latest update. Because the Vercel AI SDK streams tool output, you can design components that update field-by-field as data arrives from the MCP server. You can show the 'received' status immediately, then have it flip to 'in_progress' a moment later as that part of the API response streams in. This gives your users a truly live view of the process.
Build Interactive Diagnostic Data Reviews
Give clinicians an interface that helps them, instead of getting in their way. Your agent can use `search_lab_tests` to power a search bar that suggests tests and displays turnaround times as the doctor types their query. After an order is completed, your agent can call `get_lab_results` and stream the structured data directly into a chart or formatted report in your Next.js app. It can also use `list_patient_results` to pull a patient's entire history, letting you render a trendline for a specific value over time. Your frontend stays clean while the agent handles the clinical data fetching.
Set up Health Gorilla MCP in Vercel AI SDK
Prerequisites
- Node.js 18+ and a TypeScript project
-
ai+@modelcontextprotocol/sdkpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install ai @modelcontextprotocol/sdkplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Create the Streamable HTTP transport
Use
StreamableHTTPClientTransportwith your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and use tools
Call
mcpClient.tools()to auto-discover all Health Gorilla tools. Pass them directly togenerateText()orstreamText()— no manual schema definitions needed. - 4
Works with any model provider
Swap
openai("gpt-4o")for any AI SDK provider — Anthropic, Google, Mistral. The MCP tools work identically across all supported models.
import { experimental_createMCPClient as createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const transport = new StreamableHTTPClientTransport(
new URL("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
);
const mcpClient = await createMCPClient({ transport });
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "List recent Health Gorilla transactions",
});
console.log(text);
await mcpClient.close(); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Health Gorilla. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Health Gorilla MCP in Vercel AI SDK
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Health Gorilla MCP today
We host it, we monitor it, we maintain it. You just paste one token.