# HHS Open Payments Intelligence MCP — CMS Drug & Device $ (`andrew_avina/hhs-open-payments-mcp`) Actor

Search the CMS Open Payments (Sunshine Act) database via a Model Context Protocol (MCP) server. Track financial relationships between pharmaceutical companies and physicians: speaking fees, consulting payments, royalties, research funding, and other transfers of value. This Ap...

- **URL**: https://apify.com/andrew\_avina/hhs-open-payments-mcp.md
- **Developed by:** [Andrew Avina](https://apify.com/andrew_avina) (community)
- **Categories:** MCP servers, Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 result item returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Open Payments Intelligence MCP — Physician-Industry Financial Relationships

Search the CMS Open Payments (Sunshine Act) database via a Model Context Protocol (MCP) server. Track financial relationships between pharmaceutical companies and physicians: speaking fees, consulting payments, royalties, research funding, and other transfers of value. This Apify Actor exposes structured payment data to AI assistants (Claude, GPT-4, Cursor), compliance systems, and investigative research pipelines — no API key required.

---

### What Is Open Payments?

The Physician Payments Sunshine Act (42 U.S.C. § 1320a-7h), enacted as part of the Affordable Care Act in 2010, requires pharmaceutical manufacturers, medical device companies, and group purchasing organizations (GPOs) to report all financial transfers to physicians and teaching hospitals to CMS annually. CMS publishes this data as the Open Payments program.

Coverage includes:
- **General payments:** Consulting fees, speaking honoraria, food and beverage, travel, gifts, royalties, entertainment, education, grants, and charitable contributions
- **Research payments:** Payments tied to formal clinical research agreements
- **Ownership interests:** Physician ownership stakes in the reporting company

The dataset covers 2013–present with an 18–24 month reporting lag. The 2022 program year data includes approximately $3.57 billion in general payments to over 600,000 physicians and 1,100+ teaching hospitals from 1,700+ reporting companies.

---

### Who Uses This

#### Healthcare Journalists & Investigative Reporters
- ProPublica's Dollars for Docs, STAT News, KFF Health News, and similar investigative teams routinely mine Open Payments to surface undisclosed conflicts of interest
- Reporters covering FDA advisory panels verify panel members' industry payments
- Local TV and newspaper health reporters personalize national pharma payment stories with local physician data
- Science journalists cross-reference payment data with published bylines and media appearances

#### Academic Researchers
- **Medical ethics researchers** studying the correlation between industry payments and prescribing patterns, publication bias, and clinical guideline authorship
- **Health economists** analyzing market-level pharma spending by therapeutic area and geography
- **Sociologists of science** studying how financial ties shape scientific consensus
- **Meta-analysts** screening for conflicts of interest in systematic reviews

#### Healthcare Compliance Officers
- Hospital and health system compliance departments screening new physician employees
- IRB administrators verifying investigator disclosures for clinical trial protocols
- Journal editors verifying author conflict-of-interest declarations
- Medical school administrators monitoring faculty external activities

#### Pharma & Biotech Intelligence
- **KOL mapping teams** quantifying which physicians receive the most funding in a therapeutic area, indicating thought leader status
- **Competitive intelligence** tracking competitor promotional spend by specialty and geography
- **Sales operations** validating that HCP engagement is properly disclosed and compliant
- **Medical affairs** identifying which investigators have existing industry relationships

#### Legal & Regulatory
- **Healthcare attorneys** building cases around undisclosed conflicts (whistleblower / False Claims Act)
- **Expert witness firms** screening proposed experts for industry financial ties
- **Government investigators** (OIG, state AG) auditing improper relationships
- **Payers and health plans** evaluating whether high-cost drug prescribers have industry financial ties

---

### What You Get

Each payment record contains:

| Field | Description |
|-------|-------------|
| `physician_first_name` | Physician/recipient first name |
| `physician_last_name` | Physician/recipient last name |
| `physician_specialty` | Physician primary specialty |
| `company` | Reporting manufacturer or GPO name |
| `amount` | Total payment amount in USD |
| `payment_type` | Nature of payment (Consulting Fee, Speaking Fee, Royalty, etc.) |
| `year` | Open Payments program year |
| `source` | Always `cms.gov` |

---

### Quick Start

#### Batch Mode — Company Lookup

Find all payments made by a specific company in 2022:

```json
{
  "mode": "company",
  "company": "Pfizer",
  "year": 2022,
  "limit": 100
}
````

#### Batch Mode — Physician Lookup

Find all payments received by a physician:

```json
{
  "mode": "physician",
  "physicianName": "Smith",
  "year": 2022,
  "limit": 50
}
```

#### Batch Mode — General Search

Search with multiple filters:

```json
{
  "mode": "search",
  "specialty": "Oncology",
  "paymentType": "Consulting Fee",
  "minAmount": 50000,
  "year": 2022,
  "limit": 50
}
```

#### MCP Server Mode (AI assistant integration)

```json
{
  "serveMcp": true
}
```

Then configure your MCP client:

**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "open-payments": {
      "url": "http://your-apify-run-url:4321"
    }
  }
}
```

***

### MCP Tools Reference

#### `search_payments`

Search payments with multiple filters: physician name, company, specialty, payment type, minimum amount, and year.

**Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| `physician_name` | string | Physician first or last name |
| `company` | string | Company name (partial match) |
| `specialty` | string | Physician specialty |
| `min_amount` | number | Minimum payment USD |
| `payment_type` | string | Nature of payment |
| `year` | integer | Program year (default 2022) |
| `limit` | integer | Max results (1–1000, default 25) |

**Example MCP call:**

```json
{
  "name": "search_payments",
  "arguments": {
    "specialty": "Oncology",
    "payment_type": "Consulting Fee",
    "min_amount": 100000,
    "year": 2022,
    "limit": 20
  }
}
```

**Example response:**

```json
[
  {
    "physician_first_name": "James",
    "physician_last_name": "Wilson",
    "physician_specialty": "Oncology",
    "company": "Bristol-Myers Squibb Company",
    "amount": 287500.00,
    "payment_type": "Consulting Fee",
    "year": "2022",
    "source": "cms.gov"
  }
]
```

***

#### `get_company_payments`

Get all payments made by a specific company to physicians.

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `company_name` | string | Yes | Full or partial company name |
| `year` | integer | No | Program year (default 2022) |
| `limit` | integer | No | Max results (default 25, max 1000) |

**Example MCP call:**

```json
{
  "name": "get_company_payments",
  "arguments": {
    "company_name": "AstraZeneca",
    "year": 2022,
    "limit": 100
  }
}
```

***

#### `get_physician_payments`

Get all payments received by a specific physician.

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `physician_name` | string | Yes | First name, last name, or full name |
| `year` | integer | No | Program year (default 2022) |
| `limit` | integer | No | Max results (default 25, max 1000) |

**Example MCP call:**

```json
{
  "name": "get_physician_payments",
  "arguments": {
    "physician_name": "Harrington",
    "year": 2022,
    "limit": 50
  }
}
```

***

### Input Parameters (Batch Mode)

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `"search"` | Query mode: search, company, physician |
| `company` | string | `""` | Company name filter |
| `physicianName` | string | `""` | Physician name filter |
| `specialty` | string | `""` | Physician specialty filter |
| `paymentType` | string | `""` | Nature of payment filter |
| `minAmount` | number | `0` | Minimum amount USD |
| `year` | integer | `2022` | Program year (2013–2022) |
| `limit` | integer | `25` | Max records (1–1000) |
| `serveMcp` | boolean | `false` | Start MCP server on port 4321 |

***

### Payment Types Reference

Open Payments uses the following nature-of-payment categories:

| Category | Description |
|----------|-------------|
| Food and Beverage | Meals, refreshments at company-sponsored events |
| Consulting Fee | Advisory board, strategic consulting |
| Speaking Fee | Promotional speaker programs, CME events |
| Royalty or License | Revenue from licensed IP, patents |
| Research | Payments tied to formal research agreements |
| Education | Educational materials, training |
| Travel and Lodging | Reimbursed travel to company events |
| Gift | Non-cash gifts (permitted with limits) |
| Charitable Contribution | Donations made on physician's behalf |
| Entertainment | Sporting events, concerts |
| Grant | Research grants not tied to a specific protocol |

***

### API Details

This actor queries the **CMS Open Payments data via the Socrata API** on data.cms.gov:

- **Primary endpoint:** `https://data.cms.gov/resource/7v3g-9rg4.json`
- **Query language:** SoQL (Socrata Query Language) with `$where`, `$limit`, `$order` parameters
- **Auth:** None required (unauthenticated) or optional Socrata App Token for higher rate limits
- **Rate limits:** ~1,000 requests/hour unauthenticated; higher with App Token
- **Data freshness:** CMS publishes annually with 18–24 month lag
- **Coverage:** 2013–2022 (2023 expected in late 2024/early 2025)
- **Data license:** Public domain (U.S. government work, CMS)

**Important caveat about API availability:** The CMS Open Payments data portal has experienced intermittent availability issues as CMS migrated from `openpaymentsdata.cms.gov` to `data.cms.gov`. The actor tries multiple known endpoints before returning a graceful error. When the API is unavailable, the actor returns:

```json
[{
  "_meta": {
    "error": "CMS Open Payments API unavailable",
    "fallback_tried": true,
    "note": "Try again later or query https://openpaymentsdata.cms.gov directly."
  }
}]
```

The actor **never crashes** — it always returns a 200 response with a valid JSON array.

***

### Rate Limits and Socrata App Token

To avoid rate limiting on data.cms.gov, you can obtain a free Socrata App Token:

1. Visit https://data.cms.gov/developer
2. Create an account and register an application
3. Copy your App Token
4. Set the `SOCRATA_APP_TOKEN` environment variable in the actor's environment configuration

With an App Token, rate limits are substantially higher for production use cases.

***

### Data Quality & Caveats

- **Reporting threshold:** Only payments above $10 are required to be reported; small transactions may be aggregated
- **Delay:** Data is published approximately 18–24 months after the program year ends
- **Self-reported:** Companies report their own payments; enforcement relies on whistleblowers and CMS audits
- **Name matching:** Physician names are entered by the company and may contain typos, abbreviations, or inconsistencies — fuzzy matching is used
- **Specialty field:** The specialty reported is the physician's self-reported primary specialty at time of registration, which may differ from their current practice
- **Teaching hospitals:** Payments to teaching hospitals are in a separate reporting category not covered by this actor's default dataset

***

### Comparison to Alternatives

| Source | Data | Auth | Cost | Access |
|--------|------|------|------|--------|
| **CMS Open Payments** (this actor) | U.S. physician payments 2013–2022 | None | Free | Socrata API |
| ProPublica Dollars for Docs | Curated subset, older years | None | Free | Web only |
| openpaymentsdata.cms.gov | Same as above | None | Free | Web/API |
| Komodo Health | Enriched, linked to Rx data | Auth | Enterprise | API |
| IQVIA | Global HCP engagement | Auth | Enterprise | API |
| Definitive Healthcare | Enriched physician profiles | Auth | Subscription | API |

This actor is the only way to query the official CMS Open Payments Socrata API programmatically from within an AI assistant or automated pipeline.

***

### Common Investigative Queries

#### Top-Paid Oncologists from a Single Company

```json
{"name": "search_payments", "arguments": {"company": "Merck", "specialty": "Oncology", "year": 2022, "limit": 50}}
```

#### All Speaker Bureau Payments Above $50K

```json
{"name": "search_payments", "arguments": {"payment_type": "Speaking Fee", "min_amount": 50000, "year": 2022, "limit": 100}}
```

#### Royalty Payments to Physicians (Inventor Relationships)

```json
{"name": "search_payments", "arguments": {"payment_type": "Royalty or License", "min_amount": 100000, "year": 2022, "limit": 50}}
```

#### A Specific Company's Total Physician Payment Activity

```json
{"name": "get_company_payments", "arguments": {"company_name": "Novo Nordisk", "year": 2022, "limit": 500}}
```

***

### Support & Feedback

- **CMS Open Payments web:** https://openpaymentsdata.cms.gov
- **Socrata API docs:** https://dev.socrata.com/docs/endpoints.html
- **CMS developer portal:** https://data.cms.gov/developer
- **MCP spec:** https://modelcontextprotocol.io/
- **Apify platform:** https://apify.com

This actor is built and maintained as part of the AeternaOS SECC platform — sovereign executive command infrastructure for AI-native businesses.

# Actor input Schema

## `mode` (type: `string`):

Selects which query strategy to run in batch mode. 'search' = general search with all filters. 'company' = focused company payment lookup. 'physician' = focused physician payment lookup.

## `company` (type: `string`):

Pharmaceutical or medical device company name (full or partial). Examples: 'Pfizer', 'AstraZeneca', 'Merck', 'Johnson & Johnson', 'Boston Scientific', 'Medtronic', 'Novartis'. Used for both 'search' and 'company' modes.

## `physicianName` (type: `string`):

Physician first name, last name, or full name to search. Examples: 'Smith', 'John Smith', 'Mary Johnson'. Used for both 'search' and 'physician' modes.

## `specialty` (type: `string`):

Medical specialty of the recipient physician. Examples: 'Oncology', 'Cardiology', 'Neurology', 'Orthopedic Surgery', 'Internal Medicine', 'Psychiatry'.

## `paymentType` (type: `string`):

Nature of payment or transfer of value. Examples: 'Food and Beverage', 'Consulting Fee', 'Speaking Fee', 'Royalty or License', 'Research', 'Education', 'Travel and Lodging', 'Gift'.

## `minAmount` (type: `number`):

Return only payments greater than or equal to this amount in USD. Example: 10000 for $10K+ payments. The CMS API applies this filter server-side when possible.

## `year` (type: `integer`):

Open Payments program year to query. Data available from 2013–2022. Most recent complete year is 2022. Note: CMS publishes data with an 18-24 month lag.

## `limit` (type: `integer`):

Maximum number of payment records to return (max 1000). Results are sorted by payment amount descending.

## `serveMcp` (type: `boolean`):

When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this to connect Claude Desktop, Cursor, or any MCP client to the CMS Open Payments database. The actor runs continuously until stopped.

## Actor input object example

```json
{
  "mode": "search",
  "company": "",
  "physicianName": "",
  "specialty": "",
  "paymentType": "",
  "minAmount": 0,
  "year": 2022,
  "limit": 25,
  "serveMcp": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("andrew_avina/hhs-open-payments-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("andrew_avina/hhs-open-payments-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call andrew_avina/hhs-open-payments-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=andrew_avina/hhs-open-payments-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "HHS Open Payments Intelligence MCP — CMS Drug & Device $",
        "description": "Search the CMS Open Payments (Sunshine Act) database via a Model Context Protocol (MCP) server. Track financial relationships between pharmaceutical companies and physicians: speaking fees, consulting payments, royalties, research funding, and other transfers of value. This Ap...",
        "version": "0.1",
        "x-build-id": "cXh7rMQbHeYe6QM6k"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/andrew_avina~hhs-open-payments-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-andrew_avina-hhs-open-payments-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/andrew_avina~hhs-open-payments-mcp/runs": {
            "post": {
                "operationId": "runs-sync-andrew_avina-hhs-open-payments-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/andrew_avina~hhs-open-payments-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-andrew_avina-hhs-open-payments-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Query Mode",
                        "enum": [
                            "search",
                            "company",
                            "physician"
                        ],
                        "type": "string",
                        "description": "Selects which query strategy to run in batch mode. 'search' = general search with all filters. 'company' = focused company payment lookup. 'physician' = focused physician payment lookup.",
                        "default": "search"
                    },
                    "company": {
                        "title": "Company Name",
                        "type": "string",
                        "description": "Pharmaceutical or medical device company name (full or partial). Examples: 'Pfizer', 'AstraZeneca', 'Merck', 'Johnson & Johnson', 'Boston Scientific', 'Medtronic', 'Novartis'. Used for both 'search' and 'company' modes.",
                        "default": ""
                    },
                    "physicianName": {
                        "title": "Physician Name",
                        "type": "string",
                        "description": "Physician first name, last name, or full name to search. Examples: 'Smith', 'John Smith', 'Mary Johnson'. Used for both 'search' and 'physician' modes.",
                        "default": ""
                    },
                    "specialty": {
                        "title": "Physician Specialty",
                        "type": "string",
                        "description": "Medical specialty of the recipient physician. Examples: 'Oncology', 'Cardiology', 'Neurology', 'Orthopedic Surgery', 'Internal Medicine', 'Psychiatry'.",
                        "default": ""
                    },
                    "paymentType": {
                        "title": "Payment Type / Nature",
                        "enum": [
                            "",
                            "Food and Beverage",
                            "Consulting Fee",
                            "Speaking Fee",
                            "Royalty or License",
                            "Research",
                            "Education",
                            "Travel and Lodging",
                            "Gift",
                            "Charitable Contribution",
                            "Entertainment",
                            "Grant"
                        ],
                        "type": "string",
                        "description": "Nature of payment or transfer of value. Examples: 'Food and Beverage', 'Consulting Fee', 'Speaking Fee', 'Royalty or License', 'Research', 'Education', 'Travel and Lodging', 'Gift'.",
                        "default": ""
                    },
                    "minAmount": {
                        "title": "Minimum Payment Amount (USD)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Return only payments greater than or equal to this amount in USD. Example: 10000 for $10K+ payments. The CMS API applies this filter server-side when possible.",
                        "default": 0
                    },
                    "year": {
                        "title": "Program Year",
                        "minimum": 2013,
                        "maximum": 2022,
                        "type": "integer",
                        "description": "Open Payments program year to query. Data available from 2013–2022. Most recent complete year is 2022. Note: CMS publishes data with an 18-24 month lag.",
                        "default": 2022
                    },
                    "limit": {
                        "title": "Result Limit",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of payment records to return (max 1000). Results are sorted by payment amount descending.",
                        "default": 25
                    },
                    "serveMcp": {
                        "title": "MCP Server Mode",
                        "type": "boolean",
                        "description": "When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this to connect Claude Desktop, Cursor, or any MCP client to the CMS Open Payments database. The actor runs continuously until stopped.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
