Sec Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Sec Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
MCP server for analyzing SEC filings (10-K, 10-Q, 8-K) with industry-aware financial extraction and BERT-based NLP.
# Clone
git clone https://github.com/YOUR_USERNAME/SEC-MCP.git
cd SEC-MCP
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install
pip install -e ".[dev]"
# Configure EDGAR identity (required by SEC)
cp .env.example .env
# Edit .env and set EDGAR_IDENTITY="Your Name [email protected]"| Tool | Description |
|---|---|
search_company | Search by ticker/name → CIK, ticker, SIC code, industry |
get_filing_list | List filings, filter by form type (10-K, 10-Q, 8-K) |
| Tool | Description |
|---|---|
get_financials | Full standardized extraction: metrics, ratios, validation, opt. statements |
get_financials_batch | Same as above for N tickers in parallel |
get_income_statement | Just the income statement rows |
get_balance_sheet | Just the balance sheet rows |
get_cash_flow | Just the cash flow rows |
get_financial_ratios | Just computed ratios (margins, ROA, ROE, leverage, etc.) |
compare_companies | Side-by-side metrics + ratios for multiple tickers |
| Tool | Description |
|---|---|
get_filing_text | Full filing or specific section text (supports aliases like 'risk factors') |
| Tool | Description |
|---|---|
analyze_sentiment | FinBERT sentiment on text or filing section |
summarize_filing | Hierarchical BART summarization |
extract_entities | NER (ORG, PER, LOC, MONEY, DATE, PERCENT) |
analyze_filing | Combined sentiment + summary + entities in one call |
The SIC code is used to classify a company into one of 5 industry classes:
| Class | SIC Range | Revenue Strategy |
|---|---|---|
| standard | Everything else | First match: Revenues, RevenueFromContractWithCustomer, SalesRevenueNet, … |
| bank | 6020–6299 | Try total (Revenues, NetRevenues), then aggregate NII + non-interest + trading + fees |
| insurance | 6310–6411 | Try total, then aggregate premiums + investment income + fees |
| reit | 6500–6553 | Lease revenue + other income |
| utility | 4900–4991 | Electric + gas utility revenue |
xbrl_mappings.py maps ~250 XBRL concepts to 20+ standardized metrics. Each metric has an ordered list of concepts to try — earlier entries are preferred. Some entries are marked aggregate=True (sum all matching, used for multi-component revenue like banks).
Every extraction runs these checks:
Warnings are returned in the validation array so the AI can explain or retry.
python -m sec_mcp.server.env or in the MCP server env.get_financials("AAPL")compare_companies(["AAPL","MSFT","GOOGL"])get_income_statement("MS")get_filing_text with section='risk factors'{
"mcpServers": {
"sec-mcp": {
"command": "python",
"args": ["-m", "sec_mcp.server"],
"cwd": "/path/to/SEC-MCP",
"env": {
"EDGAR_IDENTITY": "Your Name [email protected]"
}
}
}
}| Variable | Default | Description |
|---|---|---|
EDGAR_IDENTITY | SEC-MCP [email protected] | Your identity for SEC EDGAR API |
SENTIMENT_MODEL | ProsusAI/finbert | Sentiment analysis model |
SUMMARIZATION_MODEL | facebook/bart-large-cnn | Summarization model |
NER_MODEL | dslim/bert-base-NER | NER model |
MAX_CHUNK_TOKENS | 512 | Max tokens per chunk |
CHUNK_OVERLAP_TOKENS | 128 | Overlap between chunks |
src/sec_mcp/
├── server.py # MCP tool definitions (14 tools)
├── edgar_client.py # EDGAR API wrapper (company search, filings, text)
├── financials.py # Standardized extraction engine + validation
├── xbrl_mappings.py # XBRL concept → metric dictionary (5 industry classes)
├── models.py # Pydantic models (StandardizedFinancials, ratios, etc.)
├── config.py # Environment config
└── nlp/
├── sentiment.py # FinBERT
├── summarizer.py # BART
└── ner.py # NERModels are lazy-loaded (downloaded on first use, ~2.5GB total):
# Run tests
pytest
# Run tests (skip slow model tests)
pytest -m "not slow"
# Lint
ruff check src/ tests/MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.