# Model Context Protocol (MCP)
Source: https://www.stedi.com/docs/healthcare/mcp-server

***

title: Model Context Protocol (MCP)
sidebarTitle: "Model Context Protocol (MCP)"
--------------------------------------------

Our Model Context Protocol (MCP) server defines a set of tools that AI agents can use to perform and troubleshoot eligibility checks through Stedi.

When building agents that work with eligibility data, we recommend using our MCP server. It excels at individual eligibility checks, especially when your agent needs to retrieve coverage data in real time. For example:

* A voice agent can use the MCP server to quickly verify benefits in a few seconds instead of calling payers over the phone. It can then place follow-up calls to payers only as needed - for example, to collect additional benefit details.
* A Revenue Cycle Management (RCM) workflow agent can use the MCP server to validate a patient's coverage before scheduling an appointment or submitting a claim.

You can also use the MCP server to perform individual checks with MCP clients. This is useful for testing your integration during development and for enabling operations teams to run ad-hoc checks or troubleshoot issues. Be sure to put measures in place to stay compliant with your organization's data-handling policies, HIPAA, and other applicable requirements.

## Why use the MCP server?

Performing eligibility checks successfully requires more than just calling Stedi's APIs. In addition to determining the right payer, you must know the required and recommended properties, know how to interpret errors, and build out a robust retry strategy for various failure cases.

The troubleshooting process can be complex. For example, if your check fails due to a payer connectivity issue, you should retry immediately. If it fails due to a `Subscriber Not Found` error, you must systematically diagnose the issue in order to successfully retrieve benefits information. We have best practices for entering [patient data](/healthcare/send-eligibility-checks#patient-information), [troubleshooting](/healthcare/eligibility-troubleshooting), and [retries](/healthcare/eligibility-troubleshooting#retry-strategy) in our docs - you'd typically need to implement this logic in your product and then maintain it over time.

The MCP server is helpful because it comes with all of this logic built in. Specifically, it allows agents to:

* **Find the correct payer:** The MCP server has a tool for searching Stedi's payer database. This allows agents to access information like payer IDs and supported transaction types as needed when answering questions or running eligibility checks.
* **Run eligibility checks:** The MCP server has a tool for constructing and submitting eligibility requests using available patient and provider data. If the first attempt fails, the server provides instructions about how to adjust inputs, retry, and move forward.
* **Troubleshoot rejection codes:** The MCP server provides instructions on what to do in these scenarios – for example, remove the member ID, adjust the name, or try alternate, related payer IDs. These are the same tactics our support team uses internally to resolve issues.

In essence, the MCP server allows you to tell your agent to "run an eligibility check" at the appropriate times during its workflow. You can focus on building your agent's core functionality, while the MCP server handles the complexities of eligibility checks.

### Limitations

The MCP server is designed for an agent that is performing and troubleshooting a single eligibility check. It's not intended for bulk eligibility checks, or for interpreting the benefits in an eligibility response.

* For bulk eligibility checks, use Batch Eligibility Check API directly. Visit [batch refresh checks](/healthcare/batch-refresh-eligibility-checks) for details.
* To interpret the eligibility response, you'll need to layer your own logic on top of the MCP server. For example, you'll need custom logic for tasks like determining whether a patient has active coverage for a particular service or retrieving the patient's copay. Visit [determine patient benefits](/healthcare/eligibility-active-coverage-benefits) for complete details.

### Data security and compliance

The MCP server uses the same security model as our existing APIs, including TLS encryption and API key authentication.

If you're using our MCP server with a third-party tool like Claude or ChatGPT, follow your organization's data handling policies to ensure that you stay compliant with HIPAA and other applicable requirements. For example, your organization likely requires a BAA with any third-party tool before using the tool with Stedi's MCP server.

## How the MCP server works

Your AI agent connects to the server using an MCP client. Once connected, the server gives your agent access to the available [tools](#tools) and [prompts](#prompts) for running eligibility checks.

![MCP Server Diagram](/images/healthcare-apis/mcp-server.svg)

The MCP server adds minimal overhead - you'll get the same fast response times from our APIs with added intelligence for your agents.

### Tools

Tools interact with Stedi's APIs to perform tasks. The MCP server provides the following tools for your agent to use:

{/* prettier-ignore-start */}

| Tool Name           | Description                                                                                                                                                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_for_payer`  | Calls the [Search Payers](/healthcare/api-reference/get-search-payers) endpoint to find a Stedi payer based on a provided payer ID or name. It even works with partial names or typos. For example, `cig` finds Cigna. |
| `eligibility_check` | Runs an eligibility check using the [Real-Time Eligibility Check JSON](/healthcare/api-reference/post-healthcare-eligibility) endpoint. The JSON format provides the most reliable results for AI agents.              |

{/* prettier-ignore-end */}

### Prompts

The MCP server includes prompts to help your agent recover from common eligibility errors. They cover the most common recoverable scenarios we see in production:

* How to handle common errors
* When to retry eligibility checks
* What to do when a payer isn't found

You and your agent stay in control of executing follow-up actions, such as troubleshooting and retries.

<Tip>
  Many LLM clients don't automatically read prompt definitions. You must
  explicitly instruct them to “read the prompts” or use a client-specific
  command. Otherwise, the model may never access prompt content.
</Tip>

## Install the MCP server

The eligibility MCP server is a Streamable HTTP MCP server hosted at [https://mcp.us.stedi.com/2025-07-11/mcp](https://mcp.us.stedi.com/2025-07-11/mcp).

To connect your agent:

* Create a [production API key](/healthcare/api-reference#api-key-types) for authentication.
* Add the following configuration to your agent's MCP client:
  ```json
  {
    "mcpServers": {
      "stedi-healthcare": {
        "type": "http",
        "url": "https://mcp.us.stedi.com/2025-07-11/mcp",
        "headers": {
          "Authorization": "STEDI_PROD_API_KEY"
        }
      }
    }
  }
  ```

## Example use

Here are some examples of how you might use the MCP server in different scenarios.

### Voice agent workflow

You can instruct your agent to use the MCP server to run eligibility checks. For example, you might give your voice agent the following prompt:

```
Read the prompts from Stedi's MCP server.
Then use Stedi's MCP server to check the patient's eligibility programmatically before making a phone call to the payer.
```

### RCM agent workflow

You can instruct your agent to use the MCP server to check patient eligibility before scheduling appointments. For example, you could give it the following prompt:

```
Read the prompts from Stedi's MCP server.
Then use Stedi's MCP server to check the patient's eligibility programmatically before scheduling an appointment.
```

### Payer search

You can use the MCP server directly in an MCP client to retrieve payer information. For example, after connecting the MCP server, you could give the client the following prompt:

```
Does Cigna support eligibility checks?
```

## MCP server vs. Stedi Agent

The Stedi Agent and the Model Context Protocol (MCP) server can both help you resolve failed eligibility checks and find payer information, but they serve different use cases.

* The [Stedi Agent](/healthcare/stedi-agent) is a Stedi-controlled, AI assistant within the Stedi portal. It's ready to use whenever you need it. Unlike the MCP server, you can't manage or invoke the Stedi Agent programmatically - you can only use it within the Stedi portal. The Stedi Agent is built on top of the MCP server, meaning it uses the MCP server's exposed tools to perform actions.
* The [MCP Server](/healthcare/mcp-server) provides a set of tools, which are a wrapper around Stedi's APIs, that AI agents can use to find payer information and perform and troubleshoot eligibility checks. The MCP server includes the same retry logic (in a prompt) that the Stedi Agent uses to automatically resolve eligibility check failures.

  You can use the MCP server to build your own AI agents tailored to your use case. Unlike the Stedi Agent, you'll need to install and configure the MCP server for your preferred AI agent.

## Pricing

The MCP server is available on all [paid Stedi plans](https://www.stedi.com/pricing). There is no charge for using the MCP server itself - you'll only be charged for related API requests.

Note that for eligibility checks, there's no charge for non-billable requests, such as those that return errors indicating that the payer is down. Visit [billing for eligibility checks](/healthcare/intro-eligibility-checks#billing-for-eligibility-checks) for details.