sec-edgar-mcp

A SEC EDGAR MCP (Model Context Protocol) Server

https://github.com/stefanoamorelli/sec-edgar-mcp

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

ai artificial-intelligence edgar edgar-database finance genai llm mcp mcp-server model-context-protocol model-context-protocol-server
Last synced: 4 months ago · JSON representation ·

Repository

A SEC EDGAR MCP (Model Context Protocol) Server

Basic Info
Statistics
  • Stars: 118
  • Watchers: 2
  • Forks: 38
  • Open Issues: 3
  • Releases: 9
Topics
ai artificial-intelligence edgar edgar-database finance genai llm mcp mcp-server model-context-protocol model-context-protocol-server
Created 9 months ago · Last pushed 4 months ago
Metadata Files
Readme Funding License Citation Security

README.md

# SEC EDGAR MCP

License: AGPL-3.0 Python: 3.11+ Platform: Windows | Mac | Linux Build Status PyPI Conda Version Verified on MseeP

https://github.com/user-attachments/assets/d310eb42-b3ca-467d-92f7-7d132e6274fe

[!IMPORTANT] EDGAR® and SEC® are trademarks of the U.S. Securities and Exchange Commission. This open-source project is not affiliated with or approved by the U.S. Securities and Exchange Commission.

Introduction 📣

SEC EDGAR MCP is an open-source MCP server that connects AI models to the rich dataset of SEC EDGAR filings. EDGAR (Electronic Data Gathering, Analysis, and Retrieval) is the U.S. SEC's primary system for companies to submit official filings. It contains millions of filings and "increases the efficiency, transparency, and fairness of the securities markets" by providing free public access to corporate financial information. This project makes that trove of public company data accessible to AI assistants (LLMs) for financial research, investment insights, and corporate transparency use cases.

Using the Model Context Protocol (MCP) – an open standard that "enables seamless integration between LLM applications and external data sources and tools" – the SEC EDGAR MCP server exposes a comprehensive set of tools for accessing SEC filing data. Under the hood, it leverages the EdgarTools Python library to fetch data from official SEC sources and performs direct XBRL parsing for exact financial precision. This means an AI agent can ask questions like "What's the latest 10-K filing for Apple?" or "Show me Tesla's exact revenue from their latest 10-K" and the MCP server will retrieve the answer directly from EDGAR's official data with complete accuracy and filing references.

[!TIP] If you use this software, please cite it following CITATION.cff, or the following APA entry:

Amorelli, Stefano (2025). SEC EDGAR MCP (Model Context Protocol) Server [Computer software]. GitHub. https://github.com/stefanoamorelli/sec-edgar-mcp

Usage 🚀

Once the SEC EDGAR MCP server is running, you can connect to it with any MCP-compatible client (such as an AI assistant or the MCP CLI tool). The client will discover the available EDGAR tools and can invoke them to get real-time data from SEC filings. For example, an AI assistant could use this server to fetch a company's recent filings or query specific financial metrics without manual web searching.

For comprehensive guides, examples, and tool documentation, visit the SEC EDGAR MCP Documentation.

Docker Configuration

To use SEC EDGAR MCP with Docker, add the following configuration to your MCP client:

json { "mcpServers": { "sec-edgar-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "SEC_EDGAR_USER_AGENT=Your Name (name@domain.com)", "stefanoamorelli/sec-edgar-mcp:latest" ], "env": {} } } }

Demo: Here's a demonstration of an AI assistant using SEC EDGAR MCP to retrieve Apple's latest filings and financial facts (click to view the video):

SEC EDGAR MCP - Demo - Watch Video

In the demo above, the assistant uses SEC EDGAR MCP tools to retrieve Apple's filings and financial data, showcasing how EDGAR information is fetched and presented in real-time with exact precision and filing references. 📊

Documentation 📚

For installation and setup instructions, visit the SEC EDGAR MCP Quickstart Guide. For complete tool documentation, usage examples, and configuration guides, visit the SEC EDGAR MCP Documentation.

Architecture 🏗️

The SEC EDGAR MCP server acts as a middleman between an AI (MCP client) and the SEC's EDGAR backend:

  • 🔸 MCP Client: Could be an AI assistant (like Claude or other MCP-compatible tools) or any app that speaks the MCP protocol. The client sends JSON-RPC requests to invoke tools and receives JSON results.

  • 🔸 MCP Server (SEC EDGAR MCP): This server defines comprehensive EDGAR tools and handles incoming requests. It features:

    • Company Tools: CIK lookup, company information, and company facts
    • Filing Tools: Recent filings, filing content, 8-K analysis, and section extraction
    • Financial Tools: Financial statements with direct XBRL parsing for exact precision
    • Insider Trading Tools: Form 3/4/5 analysis with detailed transaction data
  • 🔸 EDGAR Data Sources: The server uses the edgartools Python library to access:

    • SEC EDGAR REST API: Official SEC endpoint for company data and filing metadata
    • Direct XBRL Parsing: Extracts financial data directly from SEC filings using regex patterns for exact numeric precision
    • Filing Content: Downloads and parses complete SEC filing documents (.txt format)

Key Features: - Deterministic Responses: All tools include strict instructions to prevent AI hallucination and ensure responses are based only on SEC filing data - Exact Precision: Financial data maintains exact numeric precision (no rounding) as filed with the SEC - Filing References: Every response includes clickable SEC URLs for independent verification - Flexible XBRL Extraction: Uses pattern matching to find financial concepts without hardcoded mappings

How it works: The MCP client discovers available tools (company lookup, financial statements, insider transactions, etc.). When invoked, each tool fetches data from SEC sources, applies deterministic processing rules, and returns structured JSON with filing references. This ensures AI responses are accurate, verifiable, and based solely on official SEC data.

Integrations

In its current form, the MCP server is configured to use the stdio transport. Integrations with platforms such as Dify will require switching to streamable HTTP, or possibly SSE depending on the required backwards compatibility). This can be done by passing a different --transport argument to server.py. However, it may also require editing server.py, because other arguments such as host may need to be passed to the FastMCP constructor.

References 📚

  • SEC EDGAR – About EDGAR, SEC.gov (2024). EDGAR is the SEC's database for electronic company filings.

  • Model Context Protocol (MCP) – Official documentation and SDKs. ModelContextProtocol.io – An open standard for connecting LLMs to tools.

  • EdgarTools – A modern Python library for accessing SEC EDGAR data with powerful filing analysis capabilities. GitHub repo, Documentation.

Contributors 🤝

A big thank you to all the contributors who have helped make this project better!

License ⚖️

This open-source project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means: - You can use, modify, and distribute this software - If you modify and distribute it, you must release your changes under AGPL-3.0 - If you run a modified version on a server, you must provide the source code to users - See the LICENSE file for full details

For commercial licensing options or other licensing inquiries, please contact stefano@amorelli.tech.


© 2025 Stefano Amorelli – Released under the GNU Affero General Public License v3.0. Enjoy! 🎉

Owner

  • Name: Stefano Amorelli
  • Login: stefanoamorelli
  • Kind: user
  • Location: Tallinn, Estonia

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software in your research or work, please cite it as follows."
authors:
  - family-names: Amorelli
    given-names: Stefano
    orcid: "https://orcid.org/0009-0004-4917-0999"
title: "SEC EDGAR MCP (Model Context Protocol) Server"
version: 1.0.0-alpha
date-released: 2025-04-06
url: https://github.com/stefanoamorelli/sec-edgar-mcp

GitHub Events

Total
  • Create event: 15
  • Issues event: 11
  • Release event: 6
  • Watch event: 83
  • Delete event: 3
  • Issue comment event: 21
  • Push event: 61
  • Public event: 1
  • Pull request review event: 4
  • Pull request event: 33
  • Fork event: 27
Last Year
  • Create event: 15
  • Issues event: 11
  • Release event: 6
  • Watch event: 83
  • Delete event: 3
  • Issue comment event: 21
  • Push event: 61
  • Public event: 1
  • Pull request review event: 4
  • Pull request event: 33
  • Fork event: 27

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 42
  • Total Committers: 2
  • Avg Commits per committer: 21.0
  • Development Distribution Score (DDS): 0.024
Past Year
  • Commits: 42
  • Committers: 2
  • Avg Commits per committer: 21.0
  • Development Distribution Score (DDS): 0.024
Top Committers
Name Email Commits
Stefano Amorelli s****o@a****h 41
JC (Jonathan Chen) 1****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 8
  • Total pull requests: 25
  • Average time to close issues: 8 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 7
  • Total pull request authors: 7
  • Average comments per issue: 1.63
  • Average comments per pull request: 0.44
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 8
  • Pull requests: 25
  • Average time to close issues: 8 days
  • Average time to close pull requests: 2 days
  • Issue authors: 7
  • Pull request authors: 7
  • Average comments per issue: 1.63
  • Average comments per pull request: 0.44
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tahitimoon (2)
  • lijiajun1997 (1)
  • stefanoamorelli (1)
  • sgoley (1)
  • YHL04 (1)
  • gregbengis (1)
  • JKChai (1)
Pull Request Authors
  • stefanoamorelli (17)
  • lwsinclair (2)
  • dijonkitchen (2)
  • harinlee83 (1)
  • sgoley (1)
  • gerwaric (1)
  • cybermaggedon (1)
Top Labels
Issue Labels
good first issue (1)
Pull Request Labels
codex (10)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 853 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: sec-edgar-mcp

SEC EDGAR MCP server for company filings and financial data

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 853 Last month
Rankings
Dependent packages count: 9.3%
Average: 31.0%
Dependent repos count: 52.7%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/publish_conda.yml actions
  • actions/checkout v1 composite
  • stefanoamorelli/conda-package-publish-action v3-hotfix composite
uv.lock pypi
  • aiohappyeyeballs 2.6.1
  • aiohttp 3.11.18
  • aiosignal 1.3.2
  • annotated-types 0.7.0
  • anyio 4.9.0
  • async-timeout 5.0.1
  • attrs 25.3.0
  • beautifulsoup4 4.13.4
  • certifi 2025.4.26
  • charset-normalizer 3.4.2
  • click 8.1.8
  • colorama 0.4.6
  • exceptiongroup 1.2.2
  • frozenlist 1.6.0
  • h11 0.16.0
  • httpcore 1.0.9
  • httpx 0.28.1
  • httpx-sse 0.4.0
  • idna 3.10
  • lxml 5.4.0
  • markdown-it-py 3.0.0
  • mcp 1.7.1
  • mdurl 0.1.2
  • multidict 6.4.3
  • propcache 0.3.1
  • pydantic 2.11.4
  • pydantic-core 2.33.2
  • pydantic-settings 2.9.1
  • pygments 2.19.1
  • python-dotenv 1.1.0
  • python-multipart 0.0.20
  • requests 2.32.3
  • rich 14.0.0
  • sec-edgar-mcp 0.1.0
  • secedgar 0.6.0a0
  • shellingham 1.5.4
  • sniffio 1.3.1
  • soupsieve 2.7
  • sse-starlette 2.3.4
  • starlette 0.46.2
  • tqdm 4.67.1
  • typer 0.15.3
  • typing-extensions 4.13.2
  • typing-inspection 0.4.0
  • urllib3 2.4.0
  • uvicorn 0.34.2
  • yarl 1.20.0
pyproject.toml pypi