> ## 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.

# Connect SEC API to Continue

> Add SEC API as a streamable HTTP MCP server in Continue and verify a filing lookup before using it in an agent workflow.

Use Continue when you want SEC API tools inside a developer-owned IDE session.
Continue connects over streamable HTTP, discovers the available tools, and
makes them available in agent mode. Keep a development key in Continue's local
secret store. A deployed application should use a server-side client instead.

## Connect with a local development key

Create a Continue secret named `SECAPI_API_KEY`, then add this example server to
`~/.continue/config.yaml` or to a standalone configuration in
`.continue/mcpServers/`:

```yaml theme={null}
name: My Config
version: 1.0.0
schema: v1

mcpServers:
  - name: SEC API
    type: streamable-http
    url: https://api.secapi.ai/mcp
    requestOptions:
      headers:
        x-api-key: ${{ secrets.SECAPI_API_KEY }}
```

Continue's current [configuration reference](https://docs.continue.dev/reference)
lists `streamable-http` MCP servers and `requestOptions` for their request
headers. Verify this example against the reference and your installed Continue
version before applying it. Use Continue's locally stored secrets instead of
committing a key in the YAML. If your installation centrally manages Continue
configuration, place the key in that managed secret store rather than embedding
it in the shared configuration.

## Prove one cited filing lookup

Start an agent-mode chat and ask:

> Call `filings.latest` with `ticker: AAPL` and `form: 10-K`. Return the
> accession number, filing date, filing URL, `requestId`, and `traceparent`.

The successful result should name the filing and include those fields. The
filing URL and accession number identify the source; `requestId` and
`traceparent` make the call diagnosable. Do not accept a generated summary that
omits the source identity.

## Keep the first task narrow

Continue discovers the MCP tools at connection time. Refresh or reconnect after
changing this configuration, and review the exposed tool list before giving an
agent a broad task. Start with a constrained issuer, form, date range, and
limit. Use source and provenance fields returned by search or extraction tools
in the final answer.

## Failures and limits

* `401`: the key did not resolve or was rejected. Check the Continue secret
  name and rotate the key if needed.
* `402`: plan, credit, billing, or budget state blocks the request. Resolve it;
  do not retry unchanged work.
* `429` or `503`: honor `Retry-After`, reduce concurrent agent work, then make
  a bounded retry.
* `mcp_tool_timeout`: narrow the query or lower result limits before retrying.

Capture the JSON-RPC error, its SEC API `error.data.code`, and the request ID
with a repeated failure. The [Error code catalog](/error-code-catalog) explains
the common actions.

## Next step

Use the verified filing lookup as a rule in your Continue prompt: preserve the
accession number, filing URL, and request metadata with every conclusion.
