Skip to main content
Glama
efts-sec-mcp-server

efts-sec-mcp-server

by krondorl

MCP server for SEC EDGAR Full Text Search

Example implementation of an MCP server using an API fetch call.

Screenshots

Codex CLI

Inspector 1

Inspector 2

Related MCP server: @cyanheads/secedgar-mcp-server

Install

You will need to install, before using this software.

Warning

  • The SEC EDGAR API can change and the API might not work.

  • This API endpoint is not documented officially, it comes from secondary sources.

Architecture

  • MCP server (src/index.ts): creates an MCP server and exposes the get-efts-search-results tool over standard input/output.

  • Input validation: uses Zod to validate the full-text query and YYYY-MM-DD date range before the tool calls the SEC service.

  • SEC EDGAR integration: translates the tool inputs into a request to the SEC EDGAR Full Text Search endpoint and returns the API response as structured and text content.

  • Response model (src/types.ts): TypeScript interfaces describe the SEC search response, filings, aggregations, and echoed query metadata.

  • Logging (src/log.ts): records server startup and tool invocations in mcp-calls.log.

  • Fetch prototype (src/fetch.ts): a standalone command-line script for exercising the SEC endpoint and printing a simplified filing summary.

  • Runtime and tooling: Node.js runs TypeScript through tsx; the MCP Inspector can connect to the same stdio server for local testing.

Starting Point

For the API fetch call, the original request was this.

I based the MCP server on this request.

curl -H "User-Agent: Your Name your@email.example" "https://efts.sec.gov/LATEST/search-index?q=%22financial%20statements%22&dateRange=custom&startdt=2023-01-01&enddt=2023-12-31"

Fetch

Use the npm script npm run fetch. This is for testing the initial fetch prototype.

Inspector

Run the npm script: npm run inspector. Then check the browser with the localhost address.

Calling from Codex

  1. Register your MCP server (use your custom folder structure, this is just an example) codex mcp add sec-edgar -- npx --yes tsx C:/projects/sec-mcp/src/index.ts

  2. Verify the registration

    • codex mcp list

    • codex mcp get sec-edgar

  3. Start Codex CLI

    • codex

    • /mcp

  4. Prompt Use the sec-edgar MCP tool to search SEC filings containing "financial statements" between 2023-01-01 and 2023-12-31. Return the first 10 results with company names.

Logging

The MCP server can log operational information.

Check out the mcp-calls.log file

  • in the project folder you use codex from

  • in the MCP server folder, when used from inspector

Resources

License

Please see the LICENSE file.

History

Started in November, 2026.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server providing read-only access to SEC EDGAR filings, allowing LLMs to look up companies, search filings, and retrieve securities offering data.
      3
      66 PyPI
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for SEC EDGAR that provides real-time access to filings, financial statements, and full-text search across all EDGAR documents.
      Apache 2.0