Skip to main content
Glama
stagproject

SEC EDGAR Filings MCP

by stagproject

# sec-filings-mcp

SEC EDGAR 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)

docs/DISTRIBUTION.md · docs/HANDOFF.md

Build / handoff

MCP_FINANCE_BUILD.md

Env template

.env.example → copy to .env

Glama

glama.json (maintainers: stagproject); build fix: GLAMA_BUILD.md

A2A / x402

docs/A2A.md — Agent Card + payment mapping

MCP Registry

io.github.stagproject/sec-filings-mcpdocs/MCP_REGISTRY.md

Discovery URLs

docs/DISCOVERY.md

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 — tools/call on search_filings, get_filing_sample, purchase_filing

A2A (discovery)

Agent Card on Cloud Run upstream (xpay blocks /.well-known/*): https://sec-filings-mcp-1065601264332.us-central1.run.app/.well-known/agent-card.json

x402 (payment)

purchase_filing — 402 + Polygon USDC + tx_hash redelivery

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 serverTry in Browser

Cloud Run trial

https://sec-filings-mcp-1065601264332.us-central1.run.app/mcpsearch_filings + get_filing_sample without ?key=

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)

https://sec-edgar-filings.mcp.xpay.sh/mcp?key=YOUR_XPAY_KEY

Cloud Run (upstream)

https://sec-filings-mcp-1065601264332.us-central1.run.app/mcp

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 --e2e

Cloud Run

gcloud run deploy sec-filings-mcp `
  --source . `
  --region us-central1 `
  --allow-unauthenticated `
  --port 8080

Set 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-mcp

Publish / update: docs/MCP_REGISTRY.md. Search: https://registry.modelcontextprotocol.io

License

MIT — see LICENSE.md.

Available Tools

3 tools
get_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"}

ParametersJSON Schema
NameRequiredDescriptionDefault
document_idNodocument_id from search_filings. Defaults to demo ADM 10-Q (000000708426000023).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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" }

ParametersJSON Schema
NameRequiredDescriptionDefault
document_idYesdocument_id from search_filings or get_filing_sample.
networkNoBlockchain network. Default polygon (USDC). Also supports base.polygon
tx_hashNoTransaction hash. LEAVE EMPTY on first call to receive 402 payment instructions.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

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.

Conciseness4/5

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.

Completeness5/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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:

  1. Shortlist by agent_readiness_score and optional agent_one_liner

  2. get_filing_sample(document_id) — free preview

  3. 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}

ParametersJSON Schema
NameRequiredDescriptionDefault
tickerNoTicker prefix, case-insensitive (e.g. AAPL, MSFT). At least one filter required.
form_typeNoSEC form: 10-K, 10-Q, 8-K, etc.
company_nameNoSubstring match on company_name (e.g. Apple, Archer-Daniels).
fiscal_periodNoFiscal period label (e.g. 2026Q1, 2025FY).
cikNoSEC CIK prefix (digits, e.g. 0000320193).
min_agent_readiness_scoreNoMinimum agent_readiness_score (0–100). Use 70+ for production-quality rows.
limitNoPage size (1–100). Default 10 keeps payloads small for LLM context.
offsetNoSkip rows for pagination (e.g. 10 for page 2 when limit=10).
include_one_linerNoIf true, adds agent_one_liner (~1 sentence) per row for triage without calling get_filing_sample. Slightly heavier response.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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.

Conciseness4/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

  1. 3 tool updatesv0.1.0
    • First observedget_filing_sample
    • First observedpurchase_filing
    • First observedsearch_filings

TDQS

A4.7/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern: search_filings, get_filing_sample, purchase_filing. Naming is clear and predictable.

Tool Count4/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides 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
  • A
    license
    Not graded
    quality
    D
    maintenance
    Hosted 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 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Give 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