Skip to content

Commit 60eedce

Browse files
docs: remove hero image from introduction page
1 parent edaf734 commit 60eedce

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

docs/introduction.mdx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@ title: Introduction
33
description: 'SEC Edgar MCP - Connect AI models to comprehensive SEC EDGAR filings data'
44
---
55

6-
<div align="center">
7-
<img
8-
className="block dark:hidden"
9-
src="/images/hero-light.png"
10-
alt="SEC Edgar MCP Hero Light"
11-
/>
12-
<img
13-
className="hidden dark:block"
14-
src="/images/hero-dark.png"
15-
alt="SEC Edgar MCP Hero Dark"
16-
/>
17-
</div>
18-
196
## Overview
207

218
SEC Edgar MCP is an open-source MCP (Model Context Protocol) server that connects AI models to the rich dataset of [SEC EDGAR filings](https://www.sec.gov/edgar). EDGAR (Electronic Data Gathering, Analysis, and Retrieval) is the U.S. SEC's primary system for companies to submit official filings, containing millions of filings that increase the efficiency, transparency, and fairness of securities markets.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ classifiers = [
1515
"License :: OSI Approved :: GNU Affero General Public License v3",
1616
"Operating System :: OS Independent",
1717
]
18-
dependencies = ["mcp[cli]>=1.7.1", "edgartools>=4.4.0", "requests>=2.31.0"]
18+
dependencies = ["mcp[cli]>=1.7.1", "sec-edgar-toolkit>=0.1.0", "requests>=2.31.0"]
1919

2020
[tool.setuptools.packages.find]
2121
where = ["."]

sec_edgar_mcp/core/client.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
11
from typing import Optional
2-
from edgar import Company, set_identity, find_company, search
2+
from sec_edgar_toolkit.core.global_functions import set_identity, find_company, search
3+
from sec_edgar_toolkit import Company as SECCompany
34
from ..utils.cache import TickerCache
45
from ..utils.exceptions import CompanyNotFoundError
56
from ..config import initialize_config
6-
import edgar
7+
from .filing_wrapper import wrap_filings
8+
9+
10+
class Company(SECCompany):
11+
"""Extended Company class with additional methods."""
12+
13+
def get_filings(self, form=None, **kwargs):
14+
"""Get filings with .latest() support."""
15+
filings = super().get_filings(form=form, **kwargs)
16+
return wrap_filings(filings)
17+
18+
def get_facts(self):
19+
"""Compatibility wrapper for get_company_facts."""
20+
# sec-edgar-toolkit uses get_company_facts instead of get_facts
21+
if hasattr(self, "get_company_facts"):
22+
return self.get_company_facts()
23+
# Fallback to original if it exists
24+
return super().get_facts() if hasattr(super(), "get_facts") else None
725

826

927
class EdgarClient:
10-
"""Wrapper around edgar-tools for consistent API access."""
28+
"""Wrapper around sec-edgar-toolkit for consistent API access."""
1129

1230
def __init__(self):
1331
self._user_agent = initialize_config()
14-
# Set identity for edgar-tools
32+
# Set identity for sec-edgar-toolkit
1533
set_identity(self._user_agent)
16-
# Also set the default user agent
17-
edgar.set_identity(self._user_agent)
1834
self._ticker_cache = TickerCache(self._user_agent)
1935

2036
def get_company(self, identifier: str) -> Company:
@@ -51,7 +67,7 @@ def get_cik_by_ticker(self, ticker: str) -> Optional[str]:
5167
def search_companies(self, query: str, limit: int = 10) -> list:
5268
"""Search for companies by name."""
5369
try:
54-
# Use edgar-tools search functionality
70+
# Use sec-edgar-toolkit search functionality
5571
results = search(query)
5672

5773
# Convert to list format and limit results

sec_edgar_mcp/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Suppress INFO logs from edgar library
77
logging.getLogger("edgar").setLevel(logging.WARNING)
88

9-
109
# Add system-wide instructions for deterministic responses
1110
DETERMINISTIC_INSTRUCTIONS = """
1211
CRITICAL: When responding to SEC filing data requests, you MUST follow these rules:

sec_edgar_mcp/tools/filings.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from typing import Dict, Union, List, Optional, Any
22
from datetime import datetime
3-
from edgar import get_filings
3+
from sec_edgar_toolkit.core.global_functions import get_filings as sec_get_filings
44
from ..core.client import EdgarClient
5+
from ..core.filing_wrapper import wrap_filings
56
from ..core.models import FilingInfo
67
from ..utils.exceptions import FilingNotFoundError
78
from .types import ToolResponse
@@ -27,8 +28,8 @@ def get_recent_filings(
2728
company = self.client.get_company(identifier)
2829
filings = company.get_filings(form=form_type)
2930
else:
30-
# Global filings using edgar-tools get_filings()
31-
filings = get_filings(form=form_type, count=limit)
31+
# Global filings using sec-edgar-toolkit get_filings()
32+
filings = wrap_filings(sec_get_filings(form=form_type, limit=limit))
3233

3334
# Limit results
3435
filings_list = []

0 commit comments

Comments
 (0)