SEC EDGAR MCP Server for Financial Filings
Access SEC EDGAR financial filings and data via the MCP server for community-driven, API-style retrieval of corporate disclosures.
npx -y @stefanoamorelli/sec-edgar-mcpOverview
The SEC EDGAR MCP Server exposes SEC EDGAR corporate filings and related metadata through a Model Context Protocol (MCP) compatible API. It lets developers and AI systems retrieve structured filing text, metadata, and preprocessed context chunks for consumption by language models or downstream applications. By serving filings via MCP-style endpoints, the project makes it straightforward to plug EDGAR content into LLM-based workflows, agents, and document search pipelines.
This server is useful for teams that need programmatic, community-driven access to EDGAR disclosures without building and hosting their own custom ingestion and context-serving stack. It supports indexing and chunking of filings, metadata search, and an HTTP API suitable for integration with agents and model-context managers.
GitHub: https://github.com/stefanoamorelli/sec-edgar-mcp
Features
- MCP-compatible HTTP API for model context retrieval
- Access to raw filing text and parsed metadata (CIK, company name, filing type, accession, date)
- Document chunking for efficient LLM context windows
- Full-text search and filtering by filing type, date range, or CIK
- Pluggable storage backends (SQLite/Postgres + filesystem or object storage for file blobs)
- Docker-ready and local development modes
- Rate limiting and basic caching for repeated requests
- Scripts to ingest and update EDGAR bulk filings or to point at local copies
Installation / Configuration
Clone the repository and install dependencies:
Environment configuration (example .env):
# Datastore (SQLite/SQLAlchemy URL or PostgreSQL URL)
DATABASE_URL=sqlite:///./data/edgar.db
# Directory where filing text and blobs are stored
EDGAR_DATA_DIR=./data/filings
# Server settings
MCP_HOST=0.0.0.0
MCP_PORT=8080
# Optional: API key for rate limiting/auth (if enabled)
API_KEY=your_api_key_here
Initialize the database and ingest sample data:
# Initialize schema (tooling may vary by repo version)
# Ingest filings from a local directory or from SEC bulk files
Run the server (example using Uvicorn/FastAPI):
Docker (example Dockerfile / docker-compose usage):
# Build and run with docker-compose (if a compose file is provided)
Note: Adjust paths and commands to match the repository’s current scripts and module names.
Available Resources
Common HTTP endpoints and behavior (examples — check the repo docs for exact paths):
| Endpoint | Method | Description |
|---|---|---|
| /mcp | GET | MCP capability document (lists available tools/resources) |
| /context | GET | Retrieve context chunks or full text for a filing by CIK, accession or filing type |
| /filings/{accession} | GET | Download raw filing text and metadata |
| /search | GET | Full-text or metadata search across filings |
| /health | GET | Server health and readiness checks |
Example curl requests:
Fetch MCP capability document:
Get filing context for a company (placeholder values):
Download a specific filing by accession:
Python example using requests:
=
=
# JSON with chunks and metadata
Use Cases
- LLM-driven financial research: Retrieve 10-K/10-Q sections (risk factors, MD&A) as context chunks to feed to an LLM for summarization, question answering, or comparison across firms.
- Due diligence and M&A screening: Programmatically fetch and search recent filings for red flags across target companies.
- Compliance monitoring and alerting: Periodically ingest new EDGAR filings and trigger workflows when specific keywords or filing types appear.
- Data enrichment for quant workflows: Combine structured metadata (CIK, filing date, form type) with filing text to build datasets for signals, backtesting, or NLP models.
- Building domain-specific agents: Use the MCP API as a context provider for agents that answer investor questions or prepare reports, letting the agent request only relevant chunks.
Getting Help and Contributing
- Check the GitHub repository for issue tracking, contribution guidelines, and example ingestion scripts: https://github.com/stefanoamorelli/sec-edgar-mcp
- Open an issue for bugs or feature requests, and consult the README and example configs for repo-specific setup details.
This server is intended for developers integrating EDGAR data into AI systems and analytics pipelines; confirm licensing and SEC data usage policies before large-scale redistribution.