Skip to main content

Install SEC API in Custom GPT

Two install paths depending on what your ChatGPT workspace supports. Path 1 uses MCP when connector creation is available. Path 2 wraps the REST API as an OpenAPI Action.

Prerequisites

  • SEC API key. Sign up at secapi.ai.
  • For Path 1: a ChatGPT workspace where connector creation and MCP configuration are enabled.
  • For Path 2: access to the GPT Builder and Actions.

Path 1 — ChatGPT connector with MCP

  1. If required by your workspace, enable connector development in workspace settings.
  2. Settings → Apps & Connectors → Create.
  3. MCP Server URL: https://api.secapi.ai/mcp
  4. Authentication: API Key.
  5. Header name: x-api-key. Header value: your SEC API key.
  6. Save. Enable the connector in a chat and verify the SEC API tools appear.

Path 2 — Custom GPT + OpenAPI Action

This calls the REST API directly. Tool calls work, but you skip MCP’s auto-discovery — your GPT instructions need to spell out which endpoints to use.
  1. In GPT Builder: Configure → Actions → Create new action.
  2. Schema: paste the URL https://docs.secapi.ai/openapi/sec-api-public.v1.json and import.
  3. Authentication: API Key → Auth Type: Custom → Custom Header Name: x-api-key → paste your SEC API key as the value.
  4. Privacy policy: https://secapi.ai/privacy-policy.
  5. Save and test in the playground.

Verify

In a chat with the connector (or Custom GPT) enabled, ask:
Show me Apple’s latest 8-K filing.
The agent should call filings.latest through MCP or GET /v1/filings/latest?ticker=AAPL&form=8-K through the Action and return the filing URL plus a short summary.

Troubleshooting

  • “Action returned 401”x-api-key not configured or wrong. Re-enter the value in the connector / action auth settings.
  • “Server URL invalid” (Path 1) — must be the literal https://api.secapi.ai/mcp (note /mcp suffix, no trailing slash).
  • “Schema import failed” (Path 2) — verify the schema URL returns JSON with curl https://docs.secapi.ai/openapi/sec-api-public.v1.json | head.
  • 429 rate limit — check GET https://api.secapi.ai/v1/billing for your monthly cap; upgrade at secapi.ai/pricing.

Next