Purpose
backwork-mcp is the official MCP (Model Context Protocol) server for the Backwork healthcare API. It gives AI assistants controlled access to Medicare and payer medical policies, medical code intelligence, prior authorization checks, claim validation, compliance reviews, drug formulary evidence, and Webhook operations.
Key capabilities
The server provides eight workflow-level tools rather than one tool per API endpoint. Each tool calls the Backwork API only through the operation catalog in src/api-operations.ts, returns readable text and structuredContent, and cites the policy sources used. Tool names consistently use the backwork_ prefix to make them identifiable when coexisting with other MCP servers. The default interface is intentionally kept at the workflow level so agents see fewer options and require fewer tool calls for common tasks.
All tools include title, description, inputSchema, outputSchema, and MCP annotations. If a tool marked read-only provides a write-scope operation, or a tool marked non-destructive provides DELETE, the server will refuse to start. Successful calls return readable text and structuredContent containing message, along with Backwork API data and meta when available.
Usage
There are two connection methods:
- Hosted remote endpoint:https://backworkhealth.com/mcp,仅接受 OAuth. Do not send the Backwork API key as a bearer token to this address. OAuth authorization is read-only (backwork:mcp read), so the hosted server only provides read operations and does not provide Webhook management and compliance confirmation.
- Local stdio: Uses a live key with write scope and can access all tools and operations.
Calls consume the organization's request quota like other /api/v1 calls. bwk_test_ keys are only valid for the sandbox (https://backworkhealth.com/api/sandbox/v1),覆盖政策搜索、代码查询、预授权检查和覆盖评估;使用时需将 BACKWORK_API_BASE to that URL.
Configuration for each client:
- Claude Code: Add --scope user to make it available in all projects, then run claude, open /mcp, select backwork, complete browser login and the Backwork consent screen, and check with claude mcp get backwork.
- Claude Code plugin: The backwork plugin packages the hosted MCP server with four research skills (prior authorization, coverage checks, policy changes, denial appeal preparation), and can be installed from this repository's plugin marketplace; then run /mcp, select plugin:backwork:backwork, and complete OAuth login. New accounts start with 100 free credits.
- Claude Desktop: Add the hosted remote method in Settings > Connectors > Add custom connector, with name Backwork and address https://backworkhealth.com/mcp;本地 The stdio method requires editing claude_desktop_config.json and restarting.
- Cursor: Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (a single project); open OAuth login on first connection.
- VS Code: Add to the workspace's .vscode/mcp.json; you are prompted to log in when the server starts; the local stdio method prompts for a key once and stores it via VS Code.
- ChatGPT: Connect as a custom MCP connection to the hosted server in developer mode. The three tools return small cards rendered inline in ChatGPT. You need to enable Developer mode in Settings → Security and login, then go to chatgpt.com/plugins to add a connection, choose OAuth for authentication, and approve the read-only backwork:mcp read authorization. After the server is updated, select Refresh on the connection page.
- Claude.ai skills: The same four skills can be used in claude.ai and require the Backwork connector to call tools. Use node scripts/build-claude-skills.mjs to build a zip for each skill (output to dist/claude-skills/), then upload them in Customize > Skills. Custom skills require a Pro, Max, Team, or Enterprise plan with code execution enabled.
- Other MCP clients: Clients that can run local commands use the Claude Desktop stdio configuration; clients that support remote URLs with OAuth can use the hosted address directly. Clients that only support remote URLs with static headers need a self-hosted private server (API key or dual-authentication mode) and must send the key as a bearer header.
Response format and sources
Every tool accepts an output format parameter: use "markdown" for readable output, or "json" to make the text content mirror the returned structuredContent.
When a Backwork API response references a policy document, structuredContent.provenance carries the information needed for agent citations, and the text output ends with a short --- Sources --- block. source_check.source_url and source_check.last_fetched_at take precedence over legacy source metadata; an explicit unknown fetch time remains null. Policy evidence also retains the API's source_check: source URL, last fetch time, SHA-256 of the fetched content, and source_accuracy audit samples. These samples measure the source record and do not represent certainty about an individual policy or coverage decision.
Policies with explicit applicability also retain the optional applicability_scope, applicability_markets, applicability_evidence, and applicability_note fields. Shared market documents and index singleton documents are listed in the publisher's state index; that discovery evidence cannot establish a member's plan or product coverage. document_scoped policy applicability is unknown when there is no state, line of business, or index market.
Production availability
The operations the server exposes depend on two things:
- Availability: The Backwork OpenAPI document can mark an operation as x-backwork-availability: unavailable-in-production, and the server hides those operations when targeting the production API. No operations are currently marked.
- Access permissions: Operations that require write scopes (x-backwork-required-scopes) are not provided to read-only OAuth authorizations. On the hosted server, this hides backwork_webhook_management and the acknowledge and bulk_acknowledge operations of backwork_compliance_review. Read-only connections also do not get backwork_system_health diagnostics, the idempotency_key input of backwork_claim_validation, or backwork_compliance_review with confirmation input. Backwork APAn I key (stdio or HTTP with bwk_ bearer) gains access to all tools and operations, with the key's own scope enforced by the API.
Tools with no available operations are hidden; partially available tools have the withheld operations removed from the action input. Servers pointing to other Backwork deployments ignore availability markers, and BACKWORK_MCP_EXPOSE_UNAVAILABLE_TOOLS=true has the same effect for production environments, but neither lifts the write-scope rules.
Self-hosting
A Streamable HTTP server can be run. HTTP mode requires every request to carry Authorization: Bearer, and by default that bearer is a Backwork API key. For hosted remote MCP deployments, OAuth protected resource discovery can be enabled so that Claude-compatible clients can authenticate users through an authorization server. The server publishes OAuth protected resource metadata at /.well-known/oauth-protected-resource and includes that URL in the WWW-Authenticate challenge.
For private single-tenant deployments where the key is supplied by the server environment, BACKWORK_MCP_ALLOW_ENV_KEY=true can be set, but only for loopback or private network deployments protected by network access controls. Public deployments should require a per-request bearer token, set BACKWORK_MCP_ALLOWED_HOSTS / BACKWORK_MCP_PUBLIC_HOST, and set BACKWORK_MCP_ALLOWED_ORIGINS only to the exact browser origins allowed to connect.
This repository can be deployed as an API-only Vercel project. Production OAuth discovery fails closed by default unless BACKWORK_OAUTH_SIGNING_SECRET is at least 32 characters and Redis or Vercel KV is configured for one-time consent and authorization code storage.
Use cases
- Query Medicare or payer medical policies to determine whether a code is covered or requires prior authorization
- Medical code intelligence queries and code match rationale checks
- Claim validation and compliance review
- Drug formulary evidence queries
- Denial appealsPreparation and coverage checks (via Claude Code plugin skills)
Limitations
- The hosted endpoint supports only OAuth read-only authorization and does not provide write operations such as webhook management and compliance confirmation
- Calls consume organization request quota
- bwk_test_ test keys work only in the sandbox and cover only some features
- Policy applicability evidence cannot establish a member's plan or product coverage, and indexed lists do not increase confidence or resolve authorization questions
- Grounding checks for code matches do not constitute a coverage guarantee
- Cards load no network resources and follow the ChatGPT light and dark themes
- Custom Claude.ai skills require a paid plan with code execution enabled
- The materials do not provide specific pricing, quota consumption ratios, or other billing details