# SEC EDGAR Financial Intelligence MCP Server (`andrew_avina/sec-edgar-mcp`) Actor

10 years of XBRL financials on any public company in 6 seconds.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## sec-edgar-mcp

**10 years of XBRL financials on any public company in 6 seconds.**

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-brightgreen)](https://apify.com/store)
[![Pricing](https://img.shields.io/badge/Pricing-from%20%240.50%2F1k%20results-blue)](https://apify.com/pricing)
[![Data Source](https://img.shields.io/badge/Data-SEC%20EDGAR-orange)](https://www.sec.gov/edgar)
[![Category](https://img.shields.io/badge/Category-Finance%20%2F%20Investing-purple)](https://apify.com/store)
[![MCP Ready](https://img.shields.io/badge/MCP-Server%20Ready-red)](https://modelcontextprotocol.io)

---

### What Is This?

The SEC's EDGAR system contains **more than 20 million filings** from every public company, investment fund, and regulated entity that has ever filed with the Commission â€” going back to the early 1990s. It's the most comprehensive public financial database in existence. The problem is the interface: EDGAR's search is built for lookup, not analysis. Extracting structured financial data from a 10-K means parsing XBRL, navigating inline HTML, handling company name variations, and reconciling CIK numbers â€” before you've done any actual analysis.

This actor provides four modes of structured access to EDGAR. **Filing search** lets you full-text search across any filing type (10-K, 10-Q, 8-K, S-1, DEF14A, and 30+ others) with filters by company name, CIK, date range, and form type â€” returns document-level metadata ready to feed a downstream processing pipeline. **Company financials** pulls structured XBRL data â€” revenue, net income, total assets, EPS, and 15+ other metrics â€” going back up to 10 fiscal years, normalized and ready to analyze without touching a single XML file. **Insider trading tracker** pulls Form 4 filings by company or individual insider, giving you every reported open-market purchase and sale with transaction date, price, and shares. **Recent filings monitor** returns a live feed of all new filings matching a company or form type filter.

It runs in **Batch mode** for one-shot research pipelines and **MCP server mode** for live financial research in Claude Desktop or any MCP-compatible AI assistant. Financial analysts use it to build comparable company analyses in minutes. M&A teams use it to pull financials on acquisition targets without Bloomberg. Investigative journalists use it to track insider activity and follow the money through SEC disclosures.

---

### Who Uses This

**Buy-Side Financial Analysts**
You need to build a 5-year financial model for a mid-cap software company. Pulling revenue, gross profit, operating income, and EPS from 20 quarterly 10-Qs manually takes 4â€“6 hours. The financials mode returns all of it, structured and labeled, in under 10 seconds. You spend your time on the model, not the data extraction.

**M&A Due Diligence Teams**
You're evaluating a public company as an acquisition target. You need the last 8 years of revenue and margin trends, every 8-K that mentions material contracts or litigation, and the last 12 months of insider selling activity. This actor handles all three data pulls in three calls â€” financials mode, filing search mode, and insider tracker mode â€” giving you a structured due diligence snapshot before you've even signed an NDA.

**Hedge Fund Quantitative Researchers**
You're building a factor model that ingests structured financial data from 500+ public companies. EDGAR's XBRL is the cleanest source for normalized financials across filers, but parsing it at scale requires significant infrastructure. This actor exposes XBRL financials as a clean API call â€” batch across your universe, get structured output, feed your model directly.

**Investigative Journalists and Financial Reporters**
You're investigating whether insiders at a pharmaceutical company sold shares before a failed drug trial announcement. The insider tracker mode returns every Form 4 filing for the company's officers and directors, with transaction dates, prices, and relationship to the filer â€” exactly what you need to build a timeline of unusual activity.

**Venture Investors and Startup Analysts**
You need to understand the financial trajectory of every public company in a target sector before making a private market investment. The financials mode gives you 10-year revenue and margin trends for any public comp in seconds â€” building sector benchmarks that used to require a Bloomberg terminal.

---

### Key Features

| Feature | Detail |
|---|---|
| Mode 1: Filing search | Full-text search across 20M+ EDGAR filings by form type, company, CIK, date |
| Mode 2: Company financials | Structured XBRL data â€” 15+ metrics, up to 10 fiscal years, any public company |
| Mode 3: Insider trading | Form 4 data â€” every reported transaction by officers, directors, and 10%+ holders |
| Mode 4: Recent filings | Live feed of new filings by company or form type |
| Financial metrics | Revenue, net income, gross profit, operating income, EPS, total assets, total liabilities, stockholders' equity, cash and equivalents, operating cash flow, capex, and more |
| Form types supported | 10-K, 10-Q, 8-K, S-1, S-1/A, DEF14A, 4, 13F, SC 13G, SC 13D, 20-F, 6-K, and 30+ others |
| Company lookup | By ticker, company name (partial match), or CIK number |
| Historical depth | Financial data to 2014 (10-year XBRL); filing metadata to 1994 |
| MCP server mode | Live tool-use in Claude Desktop, Claude Code, any MCP client |
| Batch mode | One-shot runs for pipeline ingestion |

---

### Quick Start

#### Batch Mode â€” Company Financials

**Input:**
```json
{
  "mode": "batch",
  "query_mode": "financials",
  "company": "Salesforce",
  "metrics": ["revenue_usd", "net_income_usd", "gross_profit_usd", "operating_income_usd", "eps_diluted"],
  "years": 8
}
````

**Output:**

```json
{
  "entity_name": "Salesforce, Inc.",
  "cik": "1108524",
  "ticker": "CRM",
  "financials": [
    {
      "fiscal_year": 2024,
      "period_end": "2024-01-31",
      "revenue_usd": 34857000000,
      "net_income_usd": 4136000000,
      "gross_profit_usd": 26323000000,
      "operating_income_usd": 1731000000,
      "eps_diluted": 4.20,
      "form_source": "10-K",
      "filed_date": "2024-03-07"
    },
    {
      "fiscal_year": 2023,
      "period_end": "2023-01-31",
      "revenue_usd": 26492000000,
      "net_income_usd": 208000000,
      "gross_profit_usd": 19985000000,
      "operating_income_usd": -64000000,
      "eps_diluted": 0.21,
      "form_source": "10-K",
      "filed_date": "2023-03-09"
    }
  ]
}
```

#### Batch Mode â€” Insider Trading

**Input:**

```json
{
  "mode": "batch",
  "query_mode": "insider_trading",
  "company": "NVDA",
  "transaction_types": ["P", "S"],
  "date_from": "2024-01-01",
  "max_results": 50
}
```

**Output (truncated):**

```json
[
  {
    "entity_name": "NVIDIA Corporation",
    "cik": "1045810",
    "insider_name": "Huang Jen-Hsun",
    "insider_title": "President and Chief Executive Officer",
    "transaction_date": "2024-06-13",
    "transaction_type": "S",
    "shares": 120000,
    "price_per_share": 135.18,
    "total_value": 16221600,
    "shares_owned_after": 75982394,
    "form_type": "4",
    "file_date": "2024-06-17",
    "filing_url": "https://www.sec.gov/Archives/edgar/data/1045810/000104581024000049/0001045810-24-000049-index.htm"
  }
]
```

#### MCP Server Mode

```json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "npx",
      "args": [
        "apify-actor-mcp",
        "--actor-id", "your-username/sec-edgar-mcp",
        "--token", "YOUR_APIFY_TOKEN"
      ]
    }
  }
}
```

Then in Claude: *"Pull the last 5 years of revenue and net income for Microsoft and compare their operating margin trend."*

***

### MCP Tools Exposed

#### `search_filings`

Full-text search across EDGAR filings by company, form type, date, and keyword.

```json
{
  "tool": "search_filings",
  "arguments": {
    "company": "Palantir",
    "form_types": ["10-K", "10-Q"],
    "date_from": "2023-01-01",
    "date_to": "2024-12-31",
    "max_results": 10
  }
}
```

#### `get_company_financials`

Return structured XBRL financial data for any public company.

```json
{
  "tool": "get_company_financials",
  "arguments": {
    "company": "AAPL",
    "metrics": ["revenue_usd", "net_income_usd", "total_assets_usd", "operating_cash_flow_usd"],
    "years": 10
  }
}
```

#### `get_insider_transactions`

Return Form 4 insider trading data for a company or specific insider.

```json
{
  "tool": "get_insider_transactions",
  "arguments": {
    "company": "META",
    "transaction_types": ["P", "S"],
    "date_from": "2024-01-01",
    "max_results": 100
  }
}
```

#### `monitor_recent_filings`

Return the most recent filings for a company or set of form types.

```json
{
  "tool": "monitor_recent_filings",
  "arguments": {
    "company": "Tesla",
    "form_types": ["8-K"],
    "max_results": 20
  }
}
```

#### `get_filing_document`

Retrieve the full text and metadata for a specific filing by accession number.

```json
{
  "tool": "get_filing_document",
  "arguments": {
    "accession_number": "0001045810-24-000049"
  }
}
```

***

### Input Schema

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `"batch"` | `"batch"` or `"mcp"` |
| `query_mode` | string | required | `"search"`, `"financials"`, `"insider_trading"`, `"recent_filings"` |
| `company` | string | â€” | Company name, ticker, or CIK number |
| `form_types` | array | all | Filing form types: `["10-K"]`, `["10-Q","8-K"]`, etc. |
| `date_from` | string | â€” | ISO 8601 filing date start |
| `date_to` | string | â€” | ISO 8601 filing date end |
| `keyword` | string | â€” | Full-text keyword for filing search mode |
| `metrics` | array | all | Financial metrics for financials mode (see supported list below) |
| `years` | integer | `5` | Number of fiscal years for financials mode (max 10) |
| `transaction_types` | array | all | Insider transaction types: `"P"` (purchase), `"S"` (sale), `"A"` (award) |
| `insider_name` | string | â€” | Filter insider transactions by specific individual |
| `max_results` | integer | `100` | Maximum records to return |
| `sort_by` | string | mode-dependent | Sort field (varies by mode) |

**Supported financial metrics:** `revenue_usd`, `net_income_usd`, `gross_profit_usd`, `operating_income_usd`, `ebitda_usd`, `eps_basic`, `eps_diluted`, `total_assets_usd`, `total_liabilities_usd`, `stockholders_equity_usd`, `cash_and_equivalents_usd`, `operating_cash_flow_usd`, `capex_usd`, `long_term_debt_usd`, `shares_outstanding`

***

### Use Case Recipes

#### Recipe 1: Comparable Company Analysis (Comps)

Pull 5-year revenue and margin data for 5 SaaS comparables:

```json
{
  "query_mode": "financials",
  "company": "Workday",
  "metrics": ["revenue_usd", "gross_profit_usd", "operating_income_usd", "net_income_usd"],
  "years": 5
}
```

Run for each comp (Salesforce, ServiceNow, Veeva, HubSpot) â€” output feeds directly into a comps table without manual data entry.

#### Recipe 2: Pre-Announcement Insider Activity

Check for unusual insider selling before a major announcement:

```json
{
  "query_mode": "insider_trading",
  "company": "MRNA",
  "transaction_types": ["S"],
  "date_from": "2024-01-01",
  "date_to": "2024-06-30",
  "max_results": 200
}
```

**Outcome:** Complete insider sale record with prices, dates, and post-transaction ownership â€” build a timeline against any 8-K announcements.

#### Recipe 3: Material Event Monitoring

Track all 8-K filings for a portfolio of 10 companies:

```json
{
  "query_mode": "recent_filings",
  "company": "TSLA",
  "form_types": ["8-K"],
  "max_results": 30
}
```

**Outcome:** Recent material event disclosures â€” run across your portfolio and pipe to a Slack alert or portfolio management system.

#### Recipe 4: S-1 Pipeline Monitoring

Monitor all new S-1 and S-1/A filings for upcoming IPOs in tech:

```json
{
  "query_mode": "search",
  "form_types": ["S-1", "S-1/A"],
  "keyword": "software artificial intelligence",
  "date_from": "2024-01-01",
  "max_results": 50
}
```

**Outcome:** AI/software IPO pipeline with filing dates and company names â€” feed a deal sourcing workflow.

***

### Connecting to Claude Desktop / Claude Code

**Claude Desktop:**

```json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "npx",
      "args": [
        "apify-actor-mcp",
        "--actor-id", "your-username/sec-edgar-mcp",
        "--token", "apify_api_YOURTOKEN"
      ],
      "env": {}
    }
  }
}
```

**Claude Code:**

```json
{
  "mcpServers": {
    "sec-edgar": {
      "command": "npx",
      "args": ["apify-actor-mcp", "--actor-id", "your-username/sec-edgar-mcp", "--token", "apify_api_YOURTOKEN"]
    }
  }
}
```

Sample prompts once connected:

- *"Compare the revenue growth rate for Apple vs. Microsoft over the last 8 years."*
- *"Show me every insider purchase at Nvidia in the last 6 months."*
- *"What 8-K filings has Tesla made in 2024?"*
- *"Pull the 10-year financial history for Amazon including operating cash flow."*

***

### Pricing

| Volume | Price |
|---|---|
| First 1,000 results | $0.50 |
| 1,001 â€“ 50,000 results | $0.40/1k |
| 50,000+ results | $0.30/1k |

**ROI context:** Bloomberg Terminal costs $24,000/year per seat. FactSet and S\&P Capital IQ run $10,000â€“$30,000/year. This actor provides the same underlying EDGAR data â€” normalized, structured, and API-accessible â€” at a fraction of the cost. For a research team running 500 company lookups per month, total cost is under $25.

***

### Data Source and Freshness

- **Primary:** SEC EDGAR full-text search system (efts.sec.gov) and EDGAR company facts API (data.sec.gov)
- **XBRL source:** SEC EDGAR company facts endpoint â€” standardized structured financial data reported directly by filers
- **Update frequency:** EDGAR updates continuously as filings are accepted; actor reflects filings within 1 hour of SEC acceptance
- **Financial data depth:** XBRL mandatory since 2009 for large accelerated filers; actor provides data back to FY2014 with high reliability
- **Insider trading:** Form 4 filings required within 2 business days of transaction; actor reflects same-day filing data

***

### Technical Notes

- Company lookup supports ticker, full name, and CIK number â€” all are resolved to a canonical CIK internally
- XBRL data quality varies by filer; small companies and foreign private issuers (20-F) may have incomplete XBRL tagging
- Financial figures are in USD (or converted from functional currency where reported); always check the `form_source` field to know which filing the data came from
- EPS figures use diluted weighted average shares unless `eps_basic` is explicitly requested
- Insider transaction type codes: `P` = open-market purchase, `S` = open-market sale, `A` = award/grant, `D` = disposition to issuer, `F` = tax withholding
- Accession numbers use the format `XXXXXXXXXX-YY-NNNNNN` (e.g., `0001045810-24-000049`)
- The SEC imposes rate limits of 10 requests/second; the actor manages throttling automatically

***

### Support

- **Issues:** File a GitHub issue on the actor repository
- **Apify Community:** [community.apify.com](https://community.apify.com)
- **SEC EDGAR full-text search:** [efts.sec.gov/LATEST/search-index](https://efts.sec.gov/LATEST/search-index)
- **SEC EDGAR company facts API:** [data.sec.gov/api/xbrl/companyfacts](https://data.sec.gov/api/xbrl/companyfacts/)
- **EDGAR filing viewer:** [www.sec.gov/cgi-bin/browse-edgar](https://www.sec.gov/cgi-bin/browse-edgar)

# Actor input Schema

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

Operation mode: 'search' (full-text filing search), 'financials' (XBRL company financials), 'insider\_trades' (Form 4 tracking), 'recent' (latest filings monitor)

## `query` (type: `string`):

Full-text search phrase matched across all SEC filing text (e.g. 'supply chain disruption', 'going concern', 'AI revenue')

## `companyName` (type: `string`):

Company name or ticker symbol to filter results (e.g. 'Apple', 'TSLA', 'Microsoft Corporation'). Used in all modes.

## `formType` (type: `string`):

SEC filing form type to filter: 10-K (annual report), 10-Q (quarterly), 8-K (material event), S-1 (IPO), DEF 14A (proxy), 4 (insider trades), or 'all'

## `dateFrom` (type: `string`):

Filter filings filed on or after this date (YYYY-MM-DD format, e.g. 2024-01-01)

## `dateTo` (type: `string`):

Filter filings filed on or before this date (YYYY-MM-DD format, e.g. 2024-12-31)

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

Maximum number of results to return (max 200). Higher limits use more compute units.

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

When enabled, starts an MCP-compatible HTTP server on port 4321 instead of running a batch query. Use this to connect Claude, GPT-4, or any MCP-compatible AI assistant directly to SEC EDGAR data in real time.

## Actor input object example

```json
{
  "mode": "search",
  "query": "",
  "companyName": "",
  "formType": "all",
  "dateFrom": "",
  "dateTo": "",
  "limit": 50,
  "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/sec-edgar-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/sec-edgar-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/sec-edgar-mcp --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SEC EDGAR Financial Intelligence MCP Server",
        "description": "10 years of XBRL financials on any public company in 6 seconds.",
        "version": "0.1",
        "x-build-id": "Mz0pajSBkLl75tUQr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/andrew_avina~sec-edgar-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-andrew_avina-sec-edgar-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~sec-edgar-mcp/runs": {
            "post": {
                "operationId": "runs-sync-andrew_avina-sec-edgar-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~sec-edgar-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-andrew_avina-sec-edgar-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": "Mode",
                        "enum": [
                            "search",
                            "financials",
                            "insider_trades",
                            "recent"
                        ],
                        "type": "string",
                        "description": "Operation mode: 'search' (full-text filing search), 'financials' (XBRL company financials), 'insider_trades' (Form 4 tracking), 'recent' (latest filings monitor)",
                        "default": "search"
                    },
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Full-text search phrase matched across all SEC filing text (e.g. 'supply chain disruption', 'going concern', 'AI revenue')",
                        "default": ""
                    },
                    "companyName": {
                        "title": "Company Name or Ticker",
                        "type": "string",
                        "description": "Company name or ticker symbol to filter results (e.g. 'Apple', 'TSLA', 'Microsoft Corporation'). Used in all modes.",
                        "default": ""
                    },
                    "formType": {
                        "title": "Form Type",
                        "enum": [
                            "all",
                            "10-K",
                            "10-Q",
                            "8-K",
                            "S-1",
                            "DEF 14A",
                            "4",
                            "13F",
                            "SC 13G",
                            "424B4"
                        ],
                        "type": "string",
                        "description": "SEC filing form type to filter: 10-K (annual report), 10-Q (quarterly), 8-K (material event), S-1 (IPO), DEF 14A (proxy), 4 (insider trades), or 'all'",
                        "default": "all"
                    },
                    "dateFrom": {
                        "title": "Date From",
                        "type": "string",
                        "description": "Filter filings filed on or after this date (YYYY-MM-DD format, e.g. 2024-01-01)",
                        "default": ""
                    },
                    "dateTo": {
                        "title": "Date To",
                        "type": "string",
                        "description": "Filter filings filed on or before this date (YYYY-MM-DD format, e.g. 2024-12-31)",
                        "default": ""
                    },
                    "limit": {
                        "title": "Result Limit",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of results to return (max 200). Higher limits use more compute units.",
                        "default": 50
                    },
                    "serveMcp": {
                        "title": "MCP Server Mode",
                        "type": "boolean",
                        "description": "When enabled, starts an MCP-compatible HTTP server on port 4321 instead of running a batch query. Use this to connect Claude, GPT-4, or any MCP-compatible AI assistant directly to SEC EDGAR data in real time.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
