# sec-edgar-mcp

MCP server providing direct access to US SEC EDGAR filings, XBRL financial statements, and insider trading records.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 374
- Author: stefanoamorelli
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/stefanoamorelli/sec-edgar-mcp
- Updated: 2026-10-03
- HTML: https://affpapa.org/en/nevibecode/mcp/sec-edgar-mcp

## What it does

This server connects AI assistants to the US Securities and Exchange Commission EDGAR database. Powered by `sec-edgar-toolkit`, it resolves company CIK identifiers, fetches corporate facts, and reads regulatory filings such as 10-K or 10-Q. The tooling parses XBRL data to retrieve balance sheets and cash flows. It also extracts insider transactions from Forms 3, 4, and 5, attaching the original filing URL to every response.

Running the tool requires Python 3.11+ or a Docker container. You must supply a valid `SEC_EDGAR_USER_AGENT` environment variable with your name and email. The SEC API immediately drops calls without it.

In addition to stdio, a streamable HTTP mode operates on port 9870. Because it lacks built-in authentication, exposing that port outside private networks poses a security risk.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `SEC_EDGAR_USER_AGENT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add sec-edgar-mcp -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- uvx sec-edgar-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add sec-edgar-mcp --env SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- uvx sec-edgar-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sec-edgar-mcp": {
            "command": "uvx",
            "args": [
                "sec-edgar-mcp"
            ],
            "env": {
                "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sec-edgar-mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "sec-edgar-mcp"
            ],
            "env": {
                "SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> sec-edgar-mcp uvx sec-edgar-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>

## When to use it
- retrieve XBRL-parsed balance sheets and income statements from 10-K filings
- look up company CIK numbers and corporate details
- extract insider transaction records from Forms 3, 4, and 5
- pull specific sections from annual and quarterly SEC filings

## Example prompts
- Pull the cash flow statement from the latest 10-K filing for Tesla
- Look up the CIK and recent Form 4 insider trades for Apple
- Extract the risk factors section from the newest 10-Q report of Microsoft

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
