Health tools for agents
Beta — This feature is subject to change. The MCP specification and our implementation may evolve.
Health tools for agents is Flexpa's public registry of health MCP servers, tools, and local models. One MCP connection lets an AI agent discover them. The registry lists servers from Flexpa and other providers, indexes their tools, and returns the connection instructions for each one. The registry does not require authentication.
A Flexpa application access token exposes the same two registry tools at /mcp; it does not grant access to patient records tools. /mcp/consent accepts only patient access tokens. Those tools require a patient access token obtained through Flexpa Consent. See Health records for agents for patient connections.
Endpoint
POST https://api.flexpa.com/mcp
#Configuration
#Ask your agent
Copy the prompt into your agent to set up Flexpa's health tool search. The agent reads flexpa.com/agents.md, follows the setup steps for its app, and guides you through any steps you need to complete. Once connected, it can find health tools for the task you describe.
Setup prompt
Connect this agent to Flexpa’s health tool search.
Read https://www.flexpa.com/agents.md and follow the setup instructions. Help me complete any steps that need my input.
If I have not already told you what I need help with, ask me. Otherwise, find relevant health tools for my request.
The registry exposes two MCP tools. Search for a task, then act on the result's kind: a tool runs through execute_tool, an mcp_server is a connection to add in your MCP client, an mcp_tool is a tool on one of those servers, and a local_resource links to models that run locally. Browse the entries in the registry on the Health tools for agents page.
Trophe is Flexpa's local nutrition journal. It saves foods, meals, and targets in Markdown files, calculates daily or period totals, and exports the journal as NDJSON or FHIR R5. Kinbook is Flexpa's local family history tool, with GEDCOM and FHIR export. Pass --db with an absolute path to choose Kinbook's SQLite file. Both are open source and run on your machine over stdio without an account or OAuth.
Search for Trophe or Kinbook with include_locked: true and kind: "mcp_server" to get install and launch commands. These entries remain locked in the registry because the client must run a separate local server. Both tools use Bun; Trophe requires Bun 1.3.13 or newer. Trophe also has a CLI for agents with shell access. Follow each repository's setup guide and agent skill before using its tools. Both cards show Tool + SKILL and link to their SKILL.md: Trophe skill and Kinbook skill. Their connection metadata includes skillUrl.
#Remote privacy policies
Read each provider's privacy policy before authorizing a connection:
Remote connection metadata includes privacyPolicyUrl in search results and connection guidance.
#Flexpa Health Bridge
Flexpa Health Bridge is a macOS-only research app for local access to Apple Health data from iPhone and Apple Watch. It requires macOS 14 or later and a recent Swift toolchain. Read the setup and security guides before building the app. Import an encrypted iPhone backup or Health export; live HealthKit sync is not available.
Read the repository's setup and security guides before use. Pair each agent in the app, then use the generated configuration for its local MCP endpoint. It uses a per-agent bearer token, not OAuth. Let the MCP client make the token's first request; a test with curl would bind the token to the wrong process. Search for Flexpa Health Bridge with include_locked: true and kind: "mcp_server" for setup details.
#OpenMed local models
OpenMed on Hugging Face provides medical named entity recognition (NER) models that agents can run locally. Carefully read the OpenMed documentation and the selected model card before use. Check the entity labels, language, license, runtime requirements, and limitations. Download the selected model, run inference locally, and review its extracted entities before use.
Search for OpenMed NER with include_locked: true and kind: "local_resource". This entry is a model repository link. It has no MCP endpoint or executable input schema. execute_tool returns local_setup_required with the repository, documentation, requirements, and usage guidance.
Finds tools and MCP servers by task or exact tool name. An exact match on a tool name ranks first, then matches sort by relevance. By default, results include only entries executable through your Flexpa connection.
Parameters
- querystringRequired
A task such as search for a health insurance company, or an exact tool name such as get-action-plans. 1 to 500 characters.
- limitinteger
Maximum number of matches to return (default 5, maximum 20)
- include_lockedboolean
Include entries that need another connection, such as servers that require their own authorization or a local install (default false)
- kindstring
Return only tool, mcp_tool, mcp_server, or local_resource entries
The response is { "matches": [...] }. The Example and Locked entry tabs show the fields a client acts on; the Full match tab shows everything the registry returns for one match. Every match includes name, kind, title, description, tags, provider, locked, and score, plus fields for its kind:
tool — inputSchema as JSON Schema, ready for execute_tool.
mcp_server — status of configured or pending_configuration. Configured servers add mode: "direct", documentationUrl, and connect details for your MCP client. A hosted server's connect has transport: "streamable-http" with its OAuth metadata; Trophe and Kinbook have transport: "stdio" with their install steps, command, and args. Health Bridge uses transport: "streamable-http", location: "local", and bearer-token pairing.
local_resource — resourceType, repositoryUrl, documentationUrl, requirements, and instructions. Set up the model locally after reading its documentation.
mcp_tool — serverName, toolName, source, documentationUrl, and schemaStatus. When schemaStatus is available the match includes inputSchema; when it is requires_connection, read the server's tools/list after connecting.
locked: true means the entry cannot run through this Flexpa connection. It can require another connection or local model setup. For example, patient records with include_locked: true returns the Flexpa Consent entry with its connection URL. Add https://api.flexpa.com/mcp/consent and complete OAuth to use the patient records tools.
Request
{
"name": "search_tools",
"arguments": {
"query": "search for a health insurance company"
}
}
Response
{
"matches": [
{
"name": "directory.search_endpoints",
"kind": "tool",
"title": "Search health insurance and healthcare providers",
"description": "Search the Endpoint Directory by payer, provider, brand, acronym, or state. Uses fuzzy matching and returns up to 10 matches. Ask which state before searching for BCBS, Blue Cross, Blue Shield, or Medicaid. Only CONNECTED endpoints can be used for authorization. Use directory.check_lob_support to verify plan support.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Payer, provider, brand, or state"
}
},
"required": ["query"]
},
"locked": false
}
]
}
Runs a tool from the registry. The registry validates the arguments against the tool's input schema and checks your connection before the tool runs. It never calls a provider. For an mcp_server entry that needs its own authorization or a local install, it returns a connection_required error with the provider and connect details; only a caller that already has access, such as a patient token on flexpa.consent, gets a success result with connected: true. For an mcp_tool entry it returns the server and original tool name to call there.
Parameters
- namestringRequired
The namespaced tool name from search_tools results, such as directory.search_endpoints
- argumentsobjectRequired
The tool's arguments, as described by its inputSchema. Pass {} when the tool takes none.
A success returns the tool's own result. The Example tab shows directory.search_endpoints for Aetna, trimmed to the first endpoint. A failure returns a tool error with a code and a message:
unknown_tool — no entry has that name. The error includes up to five matches for the name.
invalid_arguments — the arguments do not match the input schema. The error lists the issues.
connection_required — the entry is locked for your connection. The error includes the connection details.
direct_tool_required — the entry is an mcp_tool. Call the original toolName on serverName.
local_setup_required — the entry links to local models. Read the returned documentation and set up the model locally.
server_unavailable — the server's connection configuration is pending.
rate_limited — the capability's limit of 60 calls per minute is exhausted. Retry after retry_after seconds.
execution_failed — the tool ran and could not complete.
Request
{
"name": "execute_tool",
"arguments": {
"name": "directory.search_endpoints",
"arguments": {
"query": "Aetna"
}
}
}
Response
{
"count": 8,
"endpoints": [
{
"id": "3f3b2c76-0e41-4d8a-b446-569e51f0c02d",
"name": "aetna",
"label": ["Aetna"],
"organizationName": "Aetna",
"organizationType": "PAYER",
"isBCBS": false,
"status": "CONNECTED",
"supportedLOBs": {
"medicaid": true,
"medicare_advantage": true,
"chip": true,
"aca_on_exchange": true,
"aca_off_exchange": true,
"employer": true,
"original_medicare": false,
"veterans": false
}
}
]
}
#Use cases
Health service discovery — Let an agent search the registry for a task such as lab results or patient records, then connect to the matching server with its published instructions and authorization flow.
Tool lookup by name — Resolve an exact tool name such as get-action-plans to its owning server, source, and connection details before the agent connects.
Payer and provider selection — Use the Endpoint directory for agents capabilities to help a user find their health insurance company or healthcare provider and validate plan type support before starting Flexpa Consent.
#Manual setup
Every option adds the same server: name flexpa, URL https://api.flexpa.com/mcp, Streamable HTTP transport, no authentication. Use these when your agent cannot install connections itself.
#Claude Desktop / Claude.ai
- Open custom connectors
- Add a connector named Flexpa with the server URL
- Click "Connect"
No authorization flow is required. The registry is public.
Server URL
https://api.flexpa.com/mcp
#Claude Code
Run the command in the project that should use the connection, then start Claude Code there. The --transport http flag selects Streamable HTTP.
Claude Code
claude mcp add flexpa \
--transport http \
https://api.flexpa.com/mcp
#Hermes
Run the command, then run /reload-mcp in Hermes or start a new session. You can also merge the entry into ~/.hermes/config.yaml. See the Hermes MCP documentation.
hermes mcp add flexpa \
--url https://api.flexpa.com/mcp
#OpenCode
Run the command in the project, then run opencode mcp list to check the connection. OpenCode 2 also reads the entry from opencode.jsonc under mcp.servers. See the OpenCode MCP documentation.
OpenCode
opencode mcp add flexpa \
--url https://api.flexpa.com/mcp
#Other MCP clients
Merge the entry into the client's MCP configuration, keep the other servers and settings, then save and reconnect. Any client that supports remote MCP servers over Streamable HTTP can use the same URL.
mcpServers
{
"mcpServers": {
"flexpa": {
"type": "http",
"url": "https://api.flexpa.com/mcp"
}
}
}
#Next steps