# MedRates

> Search US hospital prices, compare costs, and find insurance-negotiated rates.

- name: fyi.medrates/mcp
- version: 1.0.0
- connection class: unknown (unknown)
- trust: 84/100
- quality: 64/100 (needs work)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/fyi.medrates%2Fmcp
- tools: https://api.protogrid.dev/v1/servers/fyi.medrates%2Fmcp/tools

**Not classified yet.** The remote endpoints have not been probed successfully, or the listing has nothing to connect to.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "medrates": {
      "type": "http",
      "url": "https://mcp.medrates.fyi/mcp"
    }
  }
}
```


## Trust

- hygiene: 100
- liveness: 98
- freshness: 45
- provenance: 85
- drivers: +repository +dns-namespace +website +reachable +uptime-96% -stale-217d
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 64/100 (needs work)

### protocol: n/a (weight 25)

- n/a `protocol.modern`, `protocol.stateless`, `protocol.transport`, `protocol.list_ttl`: no remote answered a protocol handshake (not probed yet, unreachable, or local-only)

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 64 (weight 30)

- pass `tools.descriptions`: every tool has a description
- warn `tools.description_length`: 3 tools have descriptions over 1,024 characters, which crowds the context
- pass `tools.schemas`: every tool has an object input schema
- fail `tools.annotations`: no tool declares readOnlyHint or destructiveHint, so clients cannot tell safe calls from risky ones
- fail `tools.directory_hints`: no tool declares all four of readOnlyHint, destructiveHint, idempotentHint and openWorldHint; missing: search (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); search_nlp (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); price_quote (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); …
- pass `tools.token_cost`: about 3,375 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump

### stability: n/a (weight 15)

- n/a `stability.changes`, `stability.rug_pull`: tool history not recorded yet

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 6, about 3,375 tokens to load them all
- badge: [![protogrid quality](https://protogrid.dev/badge/fyi.medrates/mcp.svg)](https://protogrid.dev/servers/fyi.medrates/mcp)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Tool changes

_No tool definition changes recorded._

## Remotes

- https://mcp.medrates.fyi/mcp (streamable-http, auth unknown, reachable true, uptime30d 0.95689654)

## Packages

_none_

## Tools (6)

- `hospitals`: Find hospitals by name/city/state, or list a sample of hospitals.

    Returns hospital names, IDs, EINs, NPIs, and per-campus locations with
    addresses and coordinates. Use hospital IDs to filter other search tools.

    The result is capped (~100 hospitals) for performance, so the unfiltered
    list is only a sample. To locate a SPECIFIC hospital, pass ``search`` (a
    name/city/state substring) — it filters server-side and returns the matches.

    NOTE: This lists US HOSPITALS only — not non-US providers, independent imaging
    centers, ambulatory surgery centers, clinics, or other freestanding facilities.

    Args:
        search: Optional name/city/state substring to find a specific hospital.

    Returns:
        JSON array of hospitals with id, name, display_name, ein, npi,
        cms_certification_number, and locations (address, city, state, lat/lng).
    
- `payer_network_info`: Look up network-geography facts for a named insurance payer.

    Call this whenever an AI agent or user asks whether a plan covers
    out-of-state care, whether an insurer has nationwide coverage, or what
    BlueCard / PPO network mechanism the payer uses.

    Returns JSON with network_scope ('national', 'state', etc.),
    nationwide_via ('bluecard_ppo', 'national_ppo', 'none'), and a
    source_url to cite.  Returns {"network_scope": "unknown"} when the
    payer is not in the database.

    Args:
        payer_name: Insurance payer name as the user stated it (e.g.
                    'Blue Cross Blue Shield of Texas', 'UnitedHealthcare
                    Choice Plus', 'Aetna PPO', 'Medicare').

    Returns:
        JSON object with network_scope, home_state, nationwide_via,
        source_url, match_pattern, and notes fields.
    
- `payers`: List available insurance payers and plan types.

    Returns all payer + plan combinations found in the hospital price data.
    Optionally filter to payers available at a specific hospital.

    Use the payer names and plan types from this list as inputs to
    the search_nlp and price_quote tools for insurance-specific rates.

    NOTE: These are payers with negotiated rates at US HOSPITALS in the database.
    The same payers may have different rates at non-hospital facilities.

    Args:
        hospital_id: Optional hospital ID to filter payers for that hospital.

    Returns:
        JSON array of {name, plan_type, display_name} objects.
    
- `price_quote`: Get price quotes for specific procedure codes, grouped by hospital.

    This is the most detailed pricing tool. Provide exact CPT/HCPCS codes
    and get per-hospital price estimates with totals. Supports insurance
    filtering and geographic search.

    Default location is San Jose, CA if no coordinates provided — always pass the user's location for best results.

    NOTE: Hospital results come from US hospital price files. Doctors' offices
    and clinics are included when provider_type is practice or any and a payer
    with contract files is given; practice rates are payer-product contract
    rates for one visit or service.

    Args:
        codes: Comma-separated CPT/HCPCS codes (e.g. "70551,70552,70553").
        lat: Patient latitude — always provide the user's location for best results.
        lng: Patient longitude — always provide the user's location for best results.
        radius_miles: Search radius in miles (default 25).
        payer: Insurance company name to filter rates (e.g. "Blue Cross", "Aetna").
        plan_type: Insurance plan type (e.g. "PPO", "HMO", "Indemnity").
        plan_category: Plan category filter (e.g. "Commercial", "Medicare", "Medicaid").
        plan_name: Specific plan name for exact matching.
        drg_codes: Comma-separated MS-DRG codes for inpatient bundled pricing.
        include_bundle: If true, also include ancillary procedure codes
                        (anesthesia, facility fees, etc.) in the total estimate.
        limit: Max hospitals to return (default 5).
        zip_code: Optional 5-digit ZIP the user gave, used ONLY to build a
                  localized deep link to the search page — does NOT affect
                  pricing (pricing uses lat/lng).
        provider_type: "hospital", "practice", or "any" (default). "practice"
            adds doctors' offices and clinics; office prices always need a payer.

    Returns:
        JSON with hospitals sorted by total estimated cost. Each hospital
        includes individual line items, total estimate, distance, last_updated
        (ISO date of the per-hospital MRF ingest), and mrf_date (ISO date the
        hospital self-reported in the MRF file).
        Only high-confidence results are included: hospitals with no usable price
        on any item are dropped. When the API returns hospitals but all are
        filtered out, filtered_low_confidence=true is set.
        When a payer is specified, negotiated/estimated-rate items include
        plan_category (Commercial, Medicare, Medicaid, Other). Items priced
        from cash/standard charges only will not have plan_category.
        overall_rating: CMS Care Compare overall quality rating (1–5) when
        available; present it neutrally as "CMS quality: N/5 stars". Do NOT
        use it to rank, recommend, or discourage any hospital, and do NOT
        infer clinical quality from it.
    
- `search`: Search for medical procedure prices by code or description.

    Use this for direct lookups when you know a CPT/HCPCS code (e.g. "70551")
    or want to search by keyword (e.g. "MRI", "knee replacement").

    For code-like queries → exact match on procedure code.
    For text queries → searches code, description, and code_type fields.

    Supports filtering by insurance payer, clinical setting, and location
    (via zip code or lat/lng coordinates with a radius).

    NOTE: Hospital results come from US hospital price files. Doctors' offices
    and clinics are included when provider_type is practice or any and a payer
    with contract files is given; practice rates are payer-product contract
    rates for one visit or service.

    Args:
        query: CPT/HCPCS code (e.g. "70551") or text search (e.g. "MRI brain").
               Must be at least 2 characters.
        code_type: Filter by code type: "CPT", "HCPCS", "MS-DRG", "RC", etc.
        hospital_id: Filter to a specific hospital (use the hospitals tool to find IDs).
        payer_name: Filter by insurance payer name (e.g. "Blue Cross", "Aetna").
        plan_name: Filter by plan name (e.g. "PPO", "HMO").
        setting: Filter by clinical setting: "inpatient" or "outpatient".
        zip_code: US zip code for geographic filtering (alternative to lat/lng).
        lat: Latitude for geographic filtering (use with lng and radius_miles).
        lng: Longitude for geographic filtering (use with lat and radius_miles).
        radius_miles: Search radius in miles from the zip code or lat/lng location.
        page: Page number (default 1).
        page_size: Results per page (default 25, max 100).
        provider_type: "hospital", "practice", or "any" (default). "practice"
            adds doctors' offices and clinics; office prices always need a payer.

    Returns:
        JSON with matching charge items including procedure codes, descriptions,
        gross charges, cash prices, and negotiated rate ranges per hospital.
        Only high-confidence results (with at least one usable price) are included.
        Each result includes last_updated (ISO date of the per-hospital MRF ingest)
        and mrf_date (ISO date the hospital self-reported in the MRF file).
        When all results are filtered out, filtered_low_confidence=true is set
        so the agent can say "no high-confidence prices found" rather than
        asserting that no prices exist.
    
- `search_nlp`: Natural language search for medical procedure prices.

    Understands free-text queries like:
      - "MRI brain near San Jose with Blue Cross PPO"
      - "How much does a colonoscopy cost in Palo Alto?"
      - "knee replacement, no insurance, Mountain View"

    Extracts procedure, location, and insurance from the query, resolves
    CPT/DRG codes (using static synonyms + LLM), geocodes the city,
    and searches with optional geo-filtering and payer matching.

    You can provide structured fields (lat/lng, payer, setting) to override
    or supplement what the NLP extraction detects from the query text.

    NOTE: Results are from US HOSPITALS only — not non-US providers, independent
    imaging centers, ambulatory surgery centers (ASCs), or other freestanding facilities.
    For outpatient procedures (MRIs, CTs, minor surgeries), independent
    facilities may offer lower prices than hospitals.

    Args:
        query: Natural language query describing what you're looking for.
        radius_miles: Search radius from the detected city (default 25 miles).
        code_type: Filter by code type: "CPT", "HCPCS", "MS-DRG".
        setting: Filter by clinical setting: "inpatient" or "outpatient".
        lat: Override latitude (e.g. from browser geolocation). Skips geocoding.
        lng: Override longitude (e.g. from browser geolocation). Skips geocoding.
        zip_code: 5-digit ZIP to search near — alternative to lat/lng.
        payer: Insurance payer name (e.g. "Blue Cross"). Overrides NLP extraction.
        plan_type: Plan type (e.g. "PPO", "HMO"). Overrides NLP extraction.
        limit: Max results (default 25).

    Returns:
        JSON with extracted entities (procedure, city, insurance), resolved codes,
        and matching charge items with prices and hospital info.
        Only high-confidence results (with at least one usable price) are included.
        Each result includes last_updated (ISO date of the per-hospital MRF ingest)
        and mrf_date (ISO date the hospital self-reported in the MRF file).
        When all results are filtered out, filtered_low_confidence=true is set.
    
