sec-intelligence-mcp
Sec-intelligence-mcp is an MCP server for document-grounded financial AI over SEC filings, letting you retrieve, analyze, and compare real filing text with cited answers.
Health check –
pingreturnspongto confirm the server is reachable.Ingest SEC filings – fetch and index a company's recent 10-K, 10-Q, and 8-K filings for searching.
Search filings – semantic search across ingested filings, returning passages with citations.
Answer questions – get grounded, cited answers to questions like risk factors or management commentary via RAG.
Summarize filings – generate a structured executive summary of a full filing (business, financials, MD&A, risks, outlook).
Compare companies – produce side-by-side, filing-grounded comparisons of 2–4 companies on a specific aspect.
Detect anomalies – flag significant year-over-year changes in MD&A/risk language.
Get earnings summaries – extract headline metrics, guidance, and management commentary from 8-K earnings releases.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sec-intelligence-mcpFind the latest 10-K filing for Tesla and summarize its risk factors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🔎 SEC Intelligence MCP — Document-Grounded Financial AI
Ask Claude Desktop real questions about SEC filings — 10-Ks, 10-Qs, 8-Ks — and get answers quoted directly from the actual filing text, with a citation to the exact section (and page, where available) on every claim. Not a summary from training data. Not a guess.
Try it now: uvx sec-intelligence-mcp — see Quick install below.
Why this is different
Most finance-related MCP servers are data-API wrappers: they hand back numbers (revenue, EPS, price) from a database. None of the ones we surveyed read the actual filing documents, so none can answer a question that requires understanding what a company's management actually said — e.g. "how did NVIDIA's management explain the datacenter revenue surge?" or "did Amazon's forward guidance tone change between quarters?"
This server retrieves and quotes the real filing text with a citation on every claim, and its answer-generation prompt explicitly refuses to use prior/general knowledge when the retrieved passages don't contain the answer — verified live: asking about NVIDIA's non-existent "Mars operations" correctly returns "not present in the filing" rather than an invented answer. It also ships an automated RAGAS evaluation harness (see Evaluation results) that measures this claim on 50 real questions rather than just asserting it.
Related MCP server: SEC EDGAR MCP
🚀 Quick install
Published on PyPI: https://pypi.org/project/sec-intelligence-mcp/. No clone, no build step — uv fetches and runs it on demand:
uvx sec-intelligence-mcpThat's the whole install. Two more things and you're ready to use it in Claude Desktop:
1. Get your free API keys
All four take under 5 minutes total, no credit card anywhere.
Variable | Where to get it | Required? |
| https://aistudio.google.com/apikey — sign in with a Google account | Yes |
|
| Yes |
| https://cloud.langfuse.com — free tier, create a project, copy both keys from Settings → API Keys | Yes |
| Only if using Qdrant Cloud instead of local Docker | No |
Don't have Docker or want to skip signing up for Qdrant? See the note in Getting Qdrant running below.
2. Connect Claude Desktop
Add this to your claude_desktop_config.json
(Windows: %APPDATA%\Claude\claude_desktop_config.json, macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"sec-intelligence-mcp": {
"command": "uvx",
"args": ["sec-intelligence-mcp"],
"env": {
"GEMINI_API_KEY": "your-key",
"QDRANT_URL": "http://localhost:6333",
"LANGFUSE_SECRET_KEY": "your-key",
"LANGFUSE_PUBLIC_KEY": "your-key"
}
}
}
}Restart Claude Desktop, open the tools list (hammer icon), and confirm sec-intelligence-mcp
appears with a ping tool. That confirms the connection works before you rely on it for a
real question.
3. Try it out
Every session starts by ingesting the company you want to ask about — that's what indexes its filings so they can be searched. Then just ask in plain English:
You: Ingest NVIDIA's last 2 annual filings
Claude (calls
ingest_company_filings): Indexed 2 filings for NVIDIA — 312 chunks from FY2024's 10-K, 287 from FY2023's.You: What did they say about risks from export controls?
Claude (calls
analyze_filing): NVIDIA's FY2024 10-K identifies export control regulations as a primary risk: "The U.S. government has imposed, and may in the future impose, controls on the export of our products... restrictions to China, Hong Kong, and Russia have materially impacted our revenue." — [Item 1A — Risk Factors]You: How does that compare to AMD?
Claude (calls
compare_companies): [grounded side-by-side answer, cited to each company's own filing]
No prompt engineering, no special syntax — Claude picks the right tool automatically based on what you ask.
🧰 Available tools
Tool | What it does | Example question |
| Fetches, parses, and indexes a company's recent SEC filings | "Ingest NVIDIA's last 3 10-Ks" |
| Semantic search across ingested filings, returns passages with citations | "Search Apple's 10-K for anything about AI investment" |
| Answers a specific question with a grounded, cited answer (RAG) | "What were Apple's main risk factors in their 2024 10-K?" |
| Structured executive summary of a full filing (business, financials, MD&A, risks, outlook) | "Summarize NVIDIA's latest 10-K" |
| Side-by-side comparison of 2-4 companies on a specific aspect, grounded in each company's own filing | "Compare NVIDIA and AMD's AI chip strategy" |
| Flags notable year-over-year changes in a company's MD&A/risk disclosures | "Did NVIDIA's risk language around China change between 2023 and 2024?" |
| Extracts headline metrics, guidance, and management commentary from a quarterly earnings release (8-K) | "Summarize Apple's Q2 2024 earnings" |
🛠️ Tech stack
Open source and free-tier first — no paid API is required to run this end to end.
Layer | Tool | Why |
MCP protocol |
| Official Anthropic SDK |
SEC data | SEC EDGAR Full-Text & Submissions API | Official, free, no API key |
Embeddings | sentence-transformers — | Runs on CPU, no GPU needed |
Vector store | Free self-host (Docker) or Qdrant Cloud | |
Local cache | Ticker lookups, filing metadata, BM25 text | |
Keyword search | Hybrid retrieval alongside dense search | |
Reranking | sentence-transformers | Re-scores top candidates before the LLM sees them |
HTML/PDF parsing |
| Cleans raw filing documents to text |
LLM | Google Gemini (free tier) | Answer generation |
Observability | Tracing, spans, faithfulness scores | |
Evaluation | Automated faithfulness/correctness/recall scoring | |
Testing |
| 120+ tests, fully mocked, no network calls |
Linting | ||
CI/CD | GitHub Actions | Lint, test, Docker build, eval-gate on every PR |
Containerization | Docker + Docker Compose | |
Deployment | Oracle Cloud "Always Free" tier | Real persistent disk, up to 24GB RAM, $0 |
Packaging | PyPI + | One-command install, no clone needed |
🏗️ Architecture
flowchart LR
A[Claude Desktop / MCP client] -->|MCP tool calls| B[sec-intelligence-mcp server]
B --> C[SEC EDGAR API]
B --> D[Qdrant<br/>vector search]
B --> E[Gemini<br/>answer generation]
B --> F[LangFuse<br/>tracing + eval scores]
C -->|filings| B
D -->|cited passages| B
E -->|grounded answer| B📊 Evaluation results
Measured with RAGAS on 50 hand-verified
question/ground-truth pairs across 5 companies (full methodology and raw results in
eval/README.md):
Retrieval strategy | Faithfulness | Correctness | Context Recall |
v1: semantic-only (dense embeddings) | 0.92 | 0.67 | 0.84 |
v2: hybrid (BM25 + semantic via RRF) — production default | 0.95 | 0.78 | 0.99 |
v3: hybrid + cross-encoder reranking | 0.98 | 0.82 | 1.00 |
CI's eval-gate fails any PR to main that drops faithfulness below 0.75 on a real,
live-ingested subset of these questions — see .github/workflows/ci.yml.
LangFuse dashboard
A real trace of analyze_filing answering "What risks does NVIDIA face from export
controls?" — the span tree shows retrieval and embedding nested under the tool call,
alongside the LLM generation, with a faithfulness: 1.00 score attached automatically:

👩💻 For developers
Want to run from source, contribute, or self-host instead of using the published package?
Getting Qdrant running
The simplest path is Docker: docker run -p 6333:6333 qdrant/qdrant. No Docker? Use a free
Qdrant Cloud cluster instead and set QDRANT_API_KEY too.
Run from a local clone
Install uv.
Clone the repo and install dependencies:
git clone https://github.com/jahanv01/sec-intelligence-mcp.git cd sec-intelligence-mcp uv syncCopy
.env.exampleto.envand fill in the keys from the table above.Start Qdrant locally:
docker compose up -d qdrantRun the server directly:
uv run python src/server.pyOr with the MCP Inspector (dev UI, requires Node.js):
uv run mcp dev src/server.py
For Claude Desktop, point it at your clone instead of the published package:
{
"mcpServers": {
"sec-intelligence-mcp": {
"command": "uv",
"args": [
"--directory",
"C:\\ABSOLUTE\\PATH\\TO\\sec-intelligence-mcp",
"run",
"python",
"src/server.py"
]
}
}
}src/config.py fails fast at import time (raises RuntimeError) if any required key is
missing.
Running via Docker
docker compose up -d builds the server image and starts it alongside Qdrant. The app
service reads secrets from your local .env via env_file, and QDRANT_URL is overridden
to http://qdrant:6333 (the in-network service name) since localhost inside the container
would not reach the qdrant container.
Testing locally
uv run python -c "import mcp" # SDK installed correctly
uv run python scripts/test_server_stdio.py # server responds over stdio (ping -> pong)
docker compose up -d qdrant
uv run python scripts/test_qdrant.py # Qdrant round-trip works
# EDGAR data layer (each hits the real EDGAR API)
uv run python scripts/test_edgar_lookup.py # ticker -> CIK, DuckDB-cached
uv run python scripts/test_edgar_filings.py # recent 10-K filings for a ticker
uv run python scripts/test_edgar_parser.py # download + clean a real filing
uv run python scripts/test_edgar_sections.py # section detection + metadata
# Embedding & retrieval pipeline (real model + real Qdrant)
uv run python scripts/test_chunker.py # section/paragraph chunking
uv run python scripts/test_encoder.py # E5 embedding shape/latency
uv run python scripts/test_ingest.py # chunk -> embed -> upsert to Qdrant
uv run python scripts/test_search.py # semantic search with citations
# MCP tools (real pipeline + real Gemini calls)
uv run python scripts/test_tool_ingest_company_filings.py
uv run python scripts/test_tool_search_filings.py
uv run python scripts/test_tool_analyze_filing.py
uv run python scripts/test_tool_get_filing_summary.py
# Full mocked suite (no network calls)
uv run pytest tests/ -m "not integration"Project structure
src/
├── server.py # MCP server entrypoint
├── tools/ # One file per MCP tool
├── edgar/ # SEC EDGAR fetching + parsing
├── embeddings/ # Chunking + embedding pipeline
├── retrieval/ # Qdrant client + search + hybrid + rerank
├── evaluation/ # RAGAS eval pipeline
└── config.py # Env var loading (fail-fast)
tests/ # Unit/integration tests
prompts/ # Prompt templates (.txt)
data/ # Gitignored local cache (DuckDB, filing PDFs, Qdrant storage)
eval/ # Test questions + ground truth answers
scripts/ # One-off dev/test scriptsDeploy your own instance
The published PyPI package is enough for personal use via Claude Desktop — you only need this if you want a standalone, publicly reachable server (e.g. for a remote MCP client).
Deployed on an Oracle Cloud "Always Free" compute VM (Ampere A1, ARM) rather than Render or
Hugging Face Spaces: both of those give the container an ephemeral filesystem (wiped on
every restart/redeploy) and cap free-tier RAM at 512MB, which doesn't comfortably fit the
embedding model (e5-base-v2, CPU-only, ~440MB loaded) alongside the rest of the process. A
real Always Free VM has neither constraint — genuine persistent disk and up to 24GB RAM — so
Qdrant runs locally via the same docker-compose.yml used for local dev, with no separate
Qdrant Cloud account needed.
Setup (one-time):
Create an Always Free Ampere A1 compute instance (Ubuntu image) in the Oracle Cloud console, and note its public IP.
In the VCN's Security List (not just the instance's own firewall — both must allow it), add an ingress rule for TCP port
8000(and22for SSH, usually already open).SSH in, install Docker + the Compose plugin, then:
git clone https://github.com/jahanv01/sec-intelligence-mcp.git cd sec-intelligence-mcp cp .env.example .env # fill in GEMINI_API_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_PUBLIC_KEY echo "MCP_TRANSPORT=sse" >> .env sudo docker compose up -d --buildQDRANT_URLdoesn't need to be set in.envhere —docker-compose.ymlalready overrides it tohttp://qdrant:6333, the in-network service name, for theappservice.Also open the instance's own firewall for the port (Ubuntu ships
iptables/ufwrules that block it even after the Security List allows it):sudo iptables -I INPUT -p tcp --dport 8000 -j ACCEPT sudo netfilter-persistent save # or: sudo ufw allow 8000/tcpConfirm:
curl http://<instance-public-ip>:8000/healthreturnsok.
Both services have restart: unless-stopped, so a VM reboot brings the whole stack back up
without manual intervention. Plain HTTP (no TLS/domain) is used for now — fine for a demo,
but a real production deployment would put Caddy or Nginx in front for HTTPS.
Alternative: Hugging Face Spaces. Also possible via the Docker SDK, using Qdrant Cloud
instead of a local container (Spaces storage is ephemeral on restart, unlike a real VM).
huggingface.co → New Space → SDK: Docker → add GEMINI_API_KEY, QDRANT_URL,
QDRANT_API_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_PUBLIC_KEY as secrets and
MCP_TRANSPORT=sse as a variable in Space Settings, then git push this repo to the
Space's git remote.
🤝 Contributing
Issues and PRs welcome. See docs/edgar-api.md for EDGAR API quirks
(rate limits, required User-Agent header) and eval/README.md before
changing anything in the retrieval pipeline — a PR that regresses RAGAS faithfulness below
0.75 will fail CI's eval-gate job.
Available Tools
1 toolpingA
Health-check tool. Returns 'pong' if the server is reachable.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the expected success response ('pong') and the condition (server reachable). However, it does not mention behavior on failure (e.g., error, timeout). With no annotations, the description carries the full burden, and this is a minor gap for a health-check tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the tool's purpose and expected output without any redundant words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, no nested objects, and an output schema), the description is complete. It explains the core behavior without needing to detail return formats, as the output schema already provides that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema is empty with 100% coverage. No parameter descriptions are needed; the baseline of 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as a health-check that returns 'pong' when the server is reachable. The verb 'health-check' and resource 'server' are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose implies when to use it (to verify server availability), but there is no explicit guidance on when it should or should not be used. No alternatives exist among siblings, so the lack of contrast is acceptable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
ping
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between overlapping purposes. The single 'ping' tool is unambiguous.
A single tool named 'ping' follows a straightforward and predictable pattern. There are no conflicting conventions to assess.
The server name suggests a security intelligence domain, but only a trivial health-check tool is provided. This is an extreme mismatch between stated purpose and tool surface.
The tool surface is severely incomplete for a security intelligence server, offering only a ping endpoint with no actual intelligence-gathering, analysis, or query capabilities.
Maintenance
Related MCP Connectors
MCP server for VC pitch-deck scoring, thesis-fit matching, and deal-flow management.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server providing read-only access to SEC EDGAR filings, allowing LLMs to look up companies, search filings, and retrieve securities offering data.3557 PyPI1MIT
- AlicenseCqualityBmaintenanceMCP server for accessing SEC EDGAR filings. Connects AI assistants to company filings, financial statements, and insider trading data with exact numeric precision.21572 PyPI358AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceMCP server for SEC EDGAR that provides real-time access to filings, financial statements, and full-text search across all EDGAR documents.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for analyzing SEC filings (10-K, 10-Q, 8-K) with industry-aware financial extraction and BERT-based NLP.1MIT