Metadata-Version: 2.4
Name: parsec-edgar
Version: 0.1.1
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Office/Business :: Financial :: Investment
Summary: Fast SEC EDGAR client and filing parser written in Rust: companies, filings, clean text, 10-K/10-Q/8-K Item sections, and an MCP server
Keywords: sec,edgar,10-k,filings,finance,mcp
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Issues, https://github.com/ciscoriordan/parsec-edgar/issues
Project-URL: Repository, https://github.com/ciscoriordan/parsec-edgar

# parsec-edgar

<!-- mcp-name: io.github.ciscoriordan/parsec-edgar -->

Fast SEC EDGAR client and filing parser written in Rust, for Python. It also installs the `parsec-edgar` command-line tool and MCP server.

- Look up companies by ticker or CIK
- List a company's filings with form and date filters, including full history back to 1994
- Convert filing HTML (or old plain-text submissions) to clean text, with table rows kept on one line
- Split 10-K, 10-Q and 8-K filings into Item sections (Item 1A Risk Factors, Item 7 MD&A, 8-K Item 2.02, and so on)
- Search the full text of EDGAR, and bulk-download filings by form and date
- Stays within the SEC fair-access limit (8 requests per second by default, 10 at most) and caches archive documents on disk

```sh
pip install parsec-edgar
```

Wheels are built for Linux (x86-64 and ARM64), macOS (Intel and Apple silicon) and Windows (x86-64), for Python 3.10 and newer.

## The SEC User-Agent requirement

The SEC requires every request to identify the caller with a name and contact email. Pass it to `Client`, or set `PARSEC_EDGAR_USER_AGENT` (the `EDGAR_IDENTITY` variable used by edgartools also works):

```sh
export PARSEC_EDGAR_USER_AGENT="Example Corp admin@example.com"
```

## Python

```python
import parsec_edgar as pe

client = pe.Client("Example Corp admin@example.com", cache_dir="~/.cache/parsec-edgar")
client.company("BRK.B")                     # {'cik': 1067983, 'ticker': 'BRK-B', ...}
filings = client.filings("MSFT", form=["10-K", "10-Q"], since="2024")
latest = client.latest("AAPL", "10-K")      # a filing dict
text = client.text(latest)                  # clean text
for s in client.sections(latest):
    print(s["id"], s["title"], len(s["text"]))

pe.html_to_text(html)                       # parse documents you already have
pe.extract_sections(text, "10-K")
```

Lookup failures raise `LookupError`, bad arguments raise `ValueError`, and network or HTTP failures raise `parsec_edgar.EdgarError`. Network calls release the GIL, so one client can be shared across threads; it stays within its rate limit.

## Command line

```sh
parsec-edgar company AAPL
parsec-edgar filings AAPL --form 10-K --limit 5
parsec-edgar sections AAPL --form 10-K --item 1A --item 7     # JSON
parsec-edgar crawl --form 8-K --since 2026-11-05 --until 2026-11-06 --out 8k
```

`python -m parsec_edgar` runs the same command.

## MCP server

`parsec-edgar mcp` runs a [Model Context Protocol](https://modelcontextprotocol.io) server, so Claude and other LLM clients can look up companies, list filings, search the full text of EDGAR and read filings one section at a time. With [uv](https://docs.astral.sh/uv/) there is nothing to install first:

```sh
claude mcp add parsec-edgar -s user -e PARSEC_EDGAR_USER_AGENT="Example Corp admin@example.com" -- uvx parsec-edgar mcp
```

For Claude Desktop, add this to `claude_desktop_config.json` and restart it:

```json
{
  "mcpServers": {
    "parsec-edgar": {
      "command": "uvx",
      "args": ["parsec-edgar", "mcp"],
      "env": { "PARSEC_EDGAR_USER_AGENT": "Example Corp admin@example.com" }
    }
  }
}
```

The [project README](https://github.com/ciscoriordan/parsec-edgar#readme) describes the MCP tools, bulk crawling, full-text search, the accuracy benchmark and the Rust library.

## License

MIT

