Build a remote MCP server for health: tools, auth and review-ready metadata
Design a remote MCP server for public health reference data: drug, nutrition and recall tools, auth, a TypeScript example and review checks.
Build a remote MCP server for health
Short answer: a health server for public reference data needs read-only lookup tools that return sources and dates, no authentication, no personal health identifiers as parameters and descriptions that state the dataset, the country and that results are reference information. Personal records are a different server and need OAuth.
Basis: the MCP specification, the official TypeScript SDK docs (v2, package @modelcontextprotocol/server, read 2026-12-04) and our scanner rule pages. Tool sets are our recommendation, not a requirement. Anything marked (unverified) is not confirmed in those sources.
Recommended tool set
Return a source and date with every entry so the model can cite.
search_drug_reference
- Title: Search drug reference
- Description: see the example below.
- Input:
namestring, required - Annotations:
readOnlyHinttrue,destructiveHintfalse,openWorldHintfalse
get_nutrition
- Title: Get nutrition facts
- Description: "Use this for calories and nutrients of one food per 100 g from the reference food table. Returns source and table version."
- Input:
foodstring, required - Annotations:
readOnlyHinttrue,destructiveHintfalse,openWorldHintfalse
search_recalls
- Title: Search recalls
- Description: "Use this to search public product recalls by product name or date range. Returns recall date, reason and notice link."
- Input:
querystring;sincestring YYYY-MM-DD - Annotations:
readOnlyHinttrue,destructiveHintfalse,openWorldHintfalse
Annotations are hints, not security (see annotations explained). Here openWorldHint is true only where a tool reaches arbitrary outside parties, and false for a fixed domain. All are fixed public datasets: read-only and closed-domain.
Auth
Recommendation: no authentication. This is public read-only data, which the checks accept. Hold any upstream key on your server so no user ever types one (schema.secret-param). Add no write tools to a no-auth server, because auth.write-tools-unauthenticated warns when it lists create, update or delete tools. Without sign-in your protection is rate limiting and bounded results; see rate limits and 429s.
Transport
Serve Streamable HTTP on one HTTPS path such as https://mcp.example.com/mcp (auth.https). In the v2 SDK, createMcpHandler(factory) builds a fresh McpServer for every request, so the endpoint is stateless and needs no sticky sessions (sessions and serverless). The handler checks no Host, Origin or token itself, so put those checks in front of it. Still on SSE? See the migration guide. Keep the handshake fast (latency.handshake).
Minimal TypeScript example
This targets SDK v2; coming from v1, use the SDK's migration guide. In v2 inputSchema is a z.object(...). Replace lookup with your own code.
import { createMcpHandler, McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod/v4';
const handler = createMcpHandler(() => {
const server = new McpServer({ name: 'acme-health-reference', version: '1.0.0' });
server.registerTool(
'search_drug_reference',
{
title: "Search drug reference",
description:
"Use this to look up reference information on one drug by generic or brand name in the Acme national formulary (country: Canada). Returns indications, standard warnings, source and last-updated date. Reference information only; not medical advice.",
inputSchema: z.object({
name: z.string().describe('Generic or brand drug name')
}),
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false }
},
async (args) => {
const result = await lookup(args); // your upstream call
if (!result) return { isError: true, content: [{ type: 'text', text: 'No formulary entry for that name. Try the generic name.' }] };
return { content: [{ type: 'text', text: JSON.stringify(result) }] };
}
);
return server;
});
export default handler; // web-standard runtimes; wrap with toNodeHandler on Node
Say "reference information, not medical advice" in the description and keep it factual.
Errors, size and speed
Return isError: true with text that says what was wrong and how to fix it; messages such as "Internal Server Error" fail review (errors.unhelpful-message). Reviewers run every tool with valid input and reject failures (errors.fixture-failed). Keep a call under 3 seconds where you can: the scanner warns above 3 and fails above 15 (latency.tool-call). For slower work see tool timeouts, cap result size (response size limits) and never echo keys or tokens in output (errors.secrets-in-output). Run the same calls in CI so a regression never reaches review.
Getting models to pick your tools
The leaderboard method shows the model every tool in the category as a function named <server>__<tool>, with your description and input schema, and records the first tool it calls. Your name, description and schema are the whole pitch. In the December 4 2026 run, 84.3% (86 of 102) of health trials ended with no tool called. Health prompts describe a drug, a food or a condition in plain words. State the dataset, country and currency of the data in the first sentence. With 84.3% no-tool trials in this category, many presented servers do not fit what users ask, so a narrow, honest scope is the way to be picked for the right questions. Do not promise outcomes. Limits apply: the harness is offline, uses one model family, and measures selection, not correct answers. Rewrite method and prompt sets are in writing tool descriptions models pick; write about your own task and sibling tools, never about other servers (desc.injection-directive).
Pitfalls our rules catch
- Outcome claims and wellness copy trip desc.promotional; plan text trips desc.pricing-mention.
- Personal health identifiers as parameters fail schema.secret-param.
- Descriptions must not steer the model to give or withhold advice (desc.injection-directive).
- Tools failing on a valid drug or food name fail review (errors.fixture-failed).
Submission checklist
- Run the scan at https://mcpshipyard.com/scan and clear every blocker.
- Every tool has
title, a description, aninputSchemaand explicitreadOnlyHint,destructiveHintandopenWorldHint(annotations explained). - Reproduce the failures in works in Inspector, fails in Claude before you submit.
- Claude: walk the Claude connector directory submission checklist.
- ChatGPT: walk the ChatGPT app submission checklist.
- Optional listings: Grok Build (formerly Cursor) and the official registry.
- Set up monitoring before launch.
- Description names dataset, country and update date; no clinical claims (recommendation).
- Server holds no user health records.
Check your server against these rules at https://mcpshipyard.com/scan.
Check your server against these rules
Scan runs the checks from this guide against a live URL and lists each failing rule with its fix.