Skip to main content
Glama
edgar-mcp

edgar-mcp

README.md
# SEC filings in Claude

Look up a public company's reports, compare its reported financial figures, and read the filing behind a number.

`edgar-mcp` connects Claude to EDGAR, the U.S. Securities and Exchange Commission's public filing database. It runs on your computer and returns text inside your assistant. It uses MCP, the protocol that lets assistants call external tools.

**Four tools · No SEC API key · Runs locally · MIT license**

[Example](#example-compare-apples-revenue) · [Setup](#setup) · [Limits](#limits) · [Development](#development)

## What you can ask

| Ask your assistant | What the tool returns |
| --- | --- |
| “Find NVIDIA's recent annual and quarterly reports.” | Filing dates, report types, and filing identifiers. |
| “Show Apple's annual revenue and the change from the previous year.” | Reported amounts, period dates, percentage changes, and the source filing for each amount. |
| “Read the risk factors in Apple's latest annual report.” | Text from that report's Risk Factors section, in pages you can continue reading. |

The tools retrieve records and calculate changes. Your assistant writes the explanation. This project is a self-directed demonstration; it has no hosted website or chart interface.

## Example: compare Apple's revenue

Below is a shortened table from the [saved SEC response](tests/fixtures/concept-apple-revenue.json) used by the tests, captured November 13, 2026. Amounts are shown in billions of U.S. dollars. This is a saved example, not a live quote.

| Reporting period | Revenue | Change from previous year |
| --- | ---: | ---: |
| September 28, 2025–September 26, 2026 | $478.834 billion | +15.1% |
| September 29, 2024–September 27, 2025 | $416.161 billion | +6.4% |
| October 1, 2023–September 28, 2024 | $391.035 billion | — |

All three values in this saved response were reported in Apple's annual report filed November 3, 2026, filing ID `0000320193-26-000026`. The dash omits the earlier comparison from this shortened table. The tool's text reply includes exact dollar amounts and the source filing beside each row.

Annual reports repeat prior years for comparison. For each period, the tool selects the value in the most recently filed annual report that includes it. A later correction can therefore change a historical value.

<details>
<summary>See the tool call</summary>

The assistant calls `get_financials` with these arguments:

```json
{
  "company": "AAPL",
  "concept": "RevenueFromContractWithCustomerExcludingAssessedTax",
  "period": "annual",
  "limit": 3
}
```

`concept` is the exact name SEC uses for a reported figure. Companies can use different names for revenue; the tool does not translate every accounting label automatically.

</details>

## Setup

You need Node.js 22 or later, Git, and an assistant that supports local MCP tools, such as Claude Code or Claude Desktop. EDGAR requires no API key. This server requires your name and contact email and sends them with requests to SEC.

```sh
git clone https://github.com/wagner-austin/edgar-mcp.git
cd edgar-mcp
npm ci
npm run build
```

Choose the instructions for your assistant below. Replace `/path/to/edgar-mcp` with the full path to the folder you just downloaded, and replace the example name and email with your own.

### Claude Code

```sh
claude mcp add edgar -e EDGAR_USER_AGENT="Jane Doe jane@example.com" -- node /path/to/edgar-mcp/dist/src/main.js
```

### Claude Desktop

Add the `edgar` entry to `mcpServers` in your `claude_desktop_config.json`. Keep any other servers already configured there.

```json
{
  "mcpServers": {
    "edgar": {
      "command": "node",
      "args": ["/path/to/edgar-mcp/dist/src/main.js"],
      "env": { "EDGAR_USER_AGENT": "Jane Doe jane@example.com" }
    }
  }
}
```

Once your assistant has loaded the tools, try: **“Use edgar to find Apple and list its three latest annual reports.”** You should receive filing dates and identifiers. If the server reports `CONFIG_INVALID`, check the name and email in `EDGAR_USER_AGENT`.

## Limits

- **Financial figures come from U.S. annual and quarterly reports.** These are forms 10-K and 10-Q. The tool does not build financial histories from foreign issuers' 20-F or 40-F reports.
- **Filing search does not include the full archive.** It reads the company's recent-filings list from SEC. It does not fetch the separate older-history files. A financial result can cite an older filing that `read_filing` cannot open.
- **Not every figure has the same name.** Requests need the exact SEC field name and unit. The tool reports missing data as an error; it does not estimate a replacement.
- **Quarterly figures must be reported as quarters.** The tool does not calculate a missing fourth quarter by subtracting nine-month results from the annual total.
- **Section reading depends on document headings.** It looks for numbered annual-report sections such as “Item 1A. Risk Factors.” Unusual formatting or a section supplied in a separate document can prevent extraction.
- **Results depend on SEC being reachable.** Each running server spaces requests at least 100 milliseconds apart and stops a request after 20 seconds. SEC can still reject a request.

## Tool reference

| Tool | Inputs and result |
| --- | --- |
| `find_company` | Search by ticker or company name; returns matches and SEC company IDs. |
| `list_filings` | Choose a company, report types, and optional date range; returns recent filings, newest first. |
| `get_financials` | Choose a company, exact financial field, and annual or quarterly periods; returns values, changes, and filing IDs. |
| `read_filing` | Choose a company and filing ID; returns document text or a numbered annual-report section. Long documents are split into pages. |

The [tool definitions](src/server.ts) list all arguments, defaults, and size limits. The [financial selection rules](src/concepts.ts) show how periods and later filings are chosen.

## Development

```sh
make check       # Check types and style, run tests and mutation checks, then build.
make test-live   # Run the separate tests that contact SEC.
```

The regular tests use a local HTTP server with [saved SEC responses](tests/fixtures/). The live tests require `EDGAR_USER_AGENT`; `make test-live` reads it from `.env` if that file exists.

`make check` requires 100% statement and branch coverage for the source and guard scripts. It also deliberately changes the code and checks that the tests detect those changes; this is mutation testing. These checks measure the test suite, not the accuracy of every SEC filing or an assistant's explanation.

[GitHub Actions](https://github.com/wagner-austin/edgar-mcp/actions/workflows/check.yml) runs `make check` on pushes and pull requests. See that page for the result of a particular commit.

## License

[MIT](LICENSE). Not affiliated with or endorsed by the U.S. Securities and Exchange Commission.