SEC EDGAR Filings MCP
This server enables agents to discover, preview, and purchase structured SEC EDGAR filing data with AI-ready metadata and financial signals via three tools:
search_filings: Discover filings from a catalog of 10,000+ SEC filings by filtering on ticker, form type (10-K, 10-Q, 8-K, etc.), company name, fiscal period, or CIK. Returns agent readiness scores, EDGAR URLs, and optional one-liner summaries. Supports pagination.get_filing_sample: Retrieve a free compact preview of a specific filing (bydocument_id), including an agent summary and financial metrics — useful for evaluating data quality before purchasing.purchase_filing: Acquire the full filing JSON via a two-step on-chain USDC payment (x402 flow on Polygon or Base). Full data includes alpha signals, evidence-verified causality events, and detailed financial metrics not available in the free sample.
The three tools are designed for a structured agent workflow — search → sample (free) → purchase (paid) — minimizing cost while allowing quality evaluation before committing to a purchase.
Provides access to SEC EDGAR structured filings stored in a Supabase database, enabling search, preview, and purchase of filing data.
# sec-filings-mcp
SEC EDGAR structured filing MCP for agents: search_filings, get_filing_sample, purchase_filing. Data lives in Supabase views (fi_listings_portfolio, fi_listings_portfolio_compact) populated by the finance-factory pipeline.
Read first | File |
Try without xpay key | docs/TRY_WITHOUT_XPAY.md — Glama sandbox or Cloud Run upstream |
Distribution (you vs repo) | |
Build / handoff | |
Env template | .env.example → copy to |
Glama | glama.json ( |
A2A / x402 | docs/A2A.md — Agent Card + payment mapping |
MCP Registry |
|
Discovery URLs |
Template reference: mcp_server.py (patent MCP, unmodified). Runtime: mcp_server_finance.py.
Protocol stack (MCP + A2A + x402)
Layer | How to use |
MCP (production) | xpay URL below — |
A2A (discovery) | Agent Card on Cloud Run upstream (xpay blocks |
x402 (payment) |
|
Native A2A JSON-RPC task API is on the roadmap; today agents invoke via MCP Streamable HTTP. Details: docs/A2A.md.
Related MCP server: sec-edgar-mcp
Try first (no xpay API key)
Path | URL / action |
Glama sandbox | Open server → Try in Browser |
Cloud Run trial |
|
Details: docs/TRY_WITHOUT_XPAY.md.
xpay proxy always needs a key; per-tool $0 is allowed on xpay (docs) but is not the same as “no signup.”
Connect (production)
Endpoint | URL |
xpay (billing + catalog) |
|
Cloud Run (upstream) |
|
Register / manage on xpay.tools. Slug: sec-edgar-filings.
Publisher checklist (finance collection, awesome list): docs/DISTRIBUTION.md.
Local dev
git clone https://github.com/stagproject/sec-filings-mcp.git
cd sec-filings-mcp
copy .env.example .env
# Edit .env with Supabase + x402 keys
uv sync
# Run once in Supabase SQL Editor: sql/fi_processed_transactions.sql
uv run python mcp_server_finance.py --sse
# MCP: http://127.0.0.1:8081/mcp (PORT in .env)Tests:
uv run python test_finance_mcp.py
uv run python test_finance_mcp.py --xpay-only --e2eCloud Run
gcloud run deploy sec-filings-mcp `
--source . `
--region us-central1 `
--allow-unauthenticated `
--port 8080Set env vars from .env (not committed). Do not deploy .env.cloudrun.yaml to git.
Glama
Listed at glama.ai/mcp/servers/stagproject/sec-filings-mcp — use Try in Browser for a no-key sandbox; production traffic uses xpay or Cloud Run above.
MCP Registry
io.github.stagproject/sec-filings-mcpPublish / update: docs/MCP_REGISTRY.md. Search: https://registry.modelcontextprotocol.io
License
MIT — see LICENSE.md.
Available Tools
3 toolsget_filing_sampleAInspect
Free preview of one SEC filing (agent-friendly compact row from fi_listings_portfolio_compact). [COST: $0] Includes agent_summary and financial_metrics (CompanyFacts-derived) but NOT full alpha_signals / causality_events — those ship only via purchase_filing after x402 payment. Compare with purchase_filing: sample = evaluate quality; purchase = full evidence-backed JSON.
[EXAMPLE ARGUMENTS - MAXIMAL]: {"document_id": "000000708426000023"}
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | No | document_id from search_filings. Defaults to demo ADM 10-Q (000000708426000023). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the free cost, the subset of returned data, and that full data requires payment. It does not mention authentication or rate limits, but for a preview tool this is adequate.
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 concise, front-loads the purpose, and uses clear formatting with example arguments. Every sentence adds value, and there is no waste.
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 has an output schema, the description appropriately focuses on what is included/excluded without needing to detail return values. It references sibling tools and provides enough context for an agent to make a correct decision.
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 description adds value beyond the input schema by providing example arguments (minimal and maximal) and explaining that document_id defaults to a demo filing. Schema coverage is 100%, and the description reinforces the parameter's purpose.
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 states it is a free preview of one SEC filing, listing exactly what is included (agent_summary, financial_metrics) and what is not (alpha_signals, causality_events). It differentiates from the sibling tool purchase_filing by specifying evaluation vs. full purchase.
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 description explicitly tells when to use this tool: to evaluate quality before purchasing. It compares with purchase_filing, states it's free, and provides example arguments including a default demo, giving clear usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
purchase_filingAInspect
Purchase and deliver one full SEC filing row from fi_listings_portfolio (MPP v1.0 x402). [COST: xpay per-call + on-chain USDC data price (see FINANCE_FILING_PRICE_USD)] Full JSON includes alpha_signals with evidence_verified causality_events and financial_metrics from SEC CompanyFacts. Do NOT return agent_bundle or internal pipeline fields.
[AGENTIC WORKFLOW — mandatory 2-step 402 flow]: STEP 1: Call with document_id and network only; leave tx_hash EMPTY. STEP 2: Broadcast the exact transaction_payload on-chain (polygon USDC default). STEP 3: Call again with the same document_id, network, and confirmed tx_hash (66 chars).
[EXAMPLE ARGUMENTS - MINIMAL (Step 1 — payment info)]: {"document_id": "000000708426000023", "network": "polygon"}
"document_id": "000000708426000023", "network": "polygon", "tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" }
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | document_id from search_filings or get_filing_sample. | |
| network | No | Blockchain network. Default polygon (USDC). Also supports base. | polygon |
| tx_hash | No | Transaction hash. LEAVE EMPTY on first call to receive 402 payment instructions. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses behavioral traits: the 402 payment flow, cost, return fields (including alpha_signals), and what is excluded (agent_bundle, internal pipeline fields). It also explains the two-step call pattern.
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 well-structured with sections for cost, workflow, and examples. It is front-loaded with the main purpose. While effective, it could be slightly more concise by removing some redundant details.
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 complexity of the tool (multi-step 402 payment), the description covers all necessary context: workflow, cost, return format, constraints, and output schema via example. It is complete enough for an agent to use correctly.
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 input schema has 100% coverage, but the description adds significant meaning beyond schema: it clarifies the role of tx_hash in the workflow, provides default values for network, and offers minimal and maximal example arguments that illustrate usage.
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 states the tool purchases and delivers a full SEC filing row, specifying the source (fi_listings_portfolio) and version. It distinguishes itself from sibling tools like search_filings and get_filing_sample by focusing on purchase and delivery.
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 description provides explicit step-by-step instructions for the 402 payment flow, including when to leave tx_hash empty and when to provide it. It mentions cost and network options, but does not explicitly state when not to use the tool or provide direct comparisons with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_filingsAInspect
PRIMARY discovery tool — lightweight catalog over 10k+ SEC filings (fi_listings_portfolio). [COST: low xpay per-call fee] Does NOT return alpha_signals, causality_events, or financial_metrics (use get_filing_sample / purchase_filing). Always returns agent_readiness_score (higher = better structured data) and edgar_url.
Required: at least one of ticker, form_type, company_name, fiscal_period, cik (avoids full-table scans).
Agent workflow after this call:
Shortlist by agent_readiness_score and optional agent_one_liner
get_filing_sample(document_id) — free preview
purchase_filing(document_id) — paid full JSON (x402)
[EXAMPLE ARGUMENTS - MINIMAL]: {"ticker": "AAPL", "limit": 5}
"ticker": "ADM", "form_type": "10-Q", "company_name": "Archer", "fiscal_period": "2026Q1", "min_agent_readiness_score": 70, "limit": 20, "offset": 0, "include_one_liner": true }
[EXAMPLE ARGUMENTS - PAGINATION (page 2)]: {"ticker": "MSFT", "form_type": "10-K", "limit": 10, "offset": 10}
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | No | Ticker prefix, case-insensitive (e.g. AAPL, MSFT). At least one filter required. | |
| form_type | No | SEC form: 10-K, 10-Q, 8-K, etc. | |
| company_name | No | Substring match on company_name (e.g. Apple, Archer-Daniels). | |
| fiscal_period | No | Fiscal period label (e.g. 2026Q1, 2025FY). | |
| cik | No | SEC CIK prefix (digits, e.g. 0000320193). | |
| min_agent_readiness_score | No | Minimum agent_readiness_score (0–100). Use 70+ for production-quality rows. | |
| limit | No | Page size (1–100). Default 10 keeps payloads small for LLM context. | |
| offset | No | Skip rows for pagination (e.g. 10 for page 2 when limit=10). | |
| include_one_liner | No | If true, adds agent_one_liner (~1 sentence) per row for triage without calling get_filing_sample. Slightly heavier response. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses cost ('low xpay per-call fee'), limitations (no certain data), pagination behavior, and required filters. It could be more explicit about rate limits or idempotency, but overall it is transparent.
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 well-structured but somewhat verbose due to three examples. However, the structure (summary, cost, limitations, requirements, workflow, examples) is clear and each sentence adds value. The length is justified by the tool's complexity.
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 complexity (9 parameters, no required, output schema exists), the description covers purpose, exclusions, cost, required filters, pagination, and integration with siblings. It mentions key output fields and the workflow, making it comprehensive.
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?
Schema coverage is 100%, so baseline is 3. The description adds significant value beyond schema by explaining constraints (e.g., 'Default 10 keeps payloads small for LLM context'), providing examples, and clarifying the effect of parameters like include_one_liner and min_agent_readiness_score.
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 states it is a 'PRIMARY discovery tool' for searching SEC filings, using specific verbs and resource references. It distinguishes from siblings by explicitly stating what it does NOT return and directing to get_filing_sample/purchase_filing for other data.
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 description provides explicit when-to-use guidance: lightweight catalog vs. advanced tools. It specifies required filter conditions ('at least one of ticker, form_type...') and outlines the post-call workflow (shortlist, sample, purchase).
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.
3 tool updates
v0.1.0- First observed
get_filing_sample - First observed
purchase_filing - First observed
search_filings
TDQS
Scored across 3 tools
Each tool has a distinct purpose: search_filings for discovery, get_filing_sample for free preview, purchase_filing for full purchase. No overlap in functionality.
All tools follow a consistent verb_noun pattern: search_filings, get_filing_sample, purchase_filing. Naming is clear and predictable.
With only 3 tools, the set is minimal but appropriately scoped for a discovery-preview-purchase workflow. Slightly thin but reasonable for this paid data service.
The workflow covers search, free preview, and paid full access. No obvious gaps for the stated purpose, though additional metadata tools could be added.
Maintenance
Related MCP Connectors
SEC/XBRL issuer intelligence for crypto public companies via MCP, OpenAPI, x402, and MPP.
SEC EDGAR financials, benchmarks, screening & Buffett value scans for agents. Pay x402 or API key.
EDGAR MCP — SEC EDGAR public APIs (free, no auth)
SEC EDGAR crypto filing radar MCP with x402-paid Base USDC data URLs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides advanced document search and processing capabilities through vector stores, including PDF processing, semantic search, web search integration, and file operations. Enables users to create searchable document collections and retrieve relevant information using natural language queries.MIT
- AlicenseNot gradedqualityDmaintenanceHosted MCP server that gives AI agents real-time access to SEC EDGAR filings search, 10-K/8-K reading, XBRL financial facts, and insider-trade (Form 4) alerts.13 npm1MIT
- AlicenseNot gradedqualityBmaintenanceGive your AI agent live SEC EDGAR data: company financials, insider trades, 8-K events, 13F holdings, and the raw filings stream — all normalized to clean JSON, every number traceable back to its sec.gov source filing.MIT
- FlicenseAqualityBmaintenanceEnables AI clients to retrieve SEC company profiles, filing listings, and structured XBRL financial statements via MCP tools.13-