Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.secapi.ai/llms.txt

Use this file to discover all available pages before exploring further.

MCP Server Installation

SEC API provides a hosted MCP server for AI agents. Connect once to expose the SEC API tool set in an MCP-aware client.

Claude Desktop

Add to your claude_desktop_config.json:
{
  "mcpServers": {
    "sec-api": {
      "url": "https://api.secapi.ai/mcp",
      "headers": {
        "x-api-key": "${SECAPI_API_KEY}"
      }
    }
  }
}
On macOS, the config is at ~/Library/Application Support/Claude/claude_desktop_config.json.

Claude Code

claude mcp add sec-api https://api.secapi.ai/mcp \
  --header "x-api-key: $SECAPI_API_KEY"

Cursor

Add to your .cursor/mcp.json:
{
  "mcpServers": {
    "sec-api": {
      "url": "https://api.secapi.ai/mcp",
      "headers": {
        "x-api-key": "${SECAPI_API_KEY}"
      }
    }
  }
}

Get Your API Key

  1. Get an API key at secapi.ai
  2. Create or copy an API key from your account
  3. Set it as SECAPI_API_KEY in your environment

Available Tools

Once connected, your agent has access to:
ToolDescription
entities.resolveResolve company by ticker, CIK, FIGI, ISIN, CUSIP
filings.searchSearch SEC filings with 20+ filters
filings.latestGet latest filing for a company
sections.searchSearch filing sections (full-text + semantic)
statements.getGet financial statements (income, balance, cash flow)
facts.getGet XBRL facts by concept
owners.13fGet institutional holdings
insiders.listList insider trades
compensation.getGet executive compensation
enforcement.listSearch enforcement actions
intelligence.companyOne-call company briefing
intelligence.securityOne-call security analysis

Verify Connection

Ask your agent:
“Use SEC API to look up Apple’s latest 10-K filing”
The agent should call filings.latest with ticker: AAPL, form: 10-K.

Agent Bootstrap (Ephemeral Credentials)

For automated agent workflows, use sponsor tokens for short-lived credentials:
# Create a bootstrap token from a server-side workflow.
curl -X POST https://api.secapi.ai/v1/agent/bootstrap_tokens \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ttlSeconds": 3600}'

# Exchange the token for ephemeral agent credentials.
curl -X POST https://api.secapi.ai/v1/agent/bootstrap \
  -H "Content-Type: application/json" \
  -d '{"token": "BOOTSTRAP_TOKEN"}'