# Use SEC EDGAR data in Codex CLI

Canonical: https://sec-api.dev/use-with-codex

> Add sec-api.dev as a remote MCP server in Codex CLI.

1. Create a free sec-api.dev account and copy an API key.
2. Export SEC_API_KEY in the shell that runs Codex.
3. Add the block below to config.toml and restart Codex; run /mcp to list the tools.

~/.codex/config.toml:

```toml
[mcp_servers.sec-api]
url = "https://sec-api.dev/api/mcp"
bearer_token_env_var = "SEC_API_KEY"
```

bearer_token_env_var makes Codex send Authorization: Bearer with the variable’s value.

Sources: https://developers.openai.com/codex/mcp

Other clients: https://sec-api.dev/use-with-claude, https://sec-api.dev/use-with-cursor, https://sec-api.dev/use-with-codex, https://sec-api.dev/use-with-gemini, https://sec-api.dev/use-with-vscode

---
Independent. Not affiliated with, endorsed by, or sponsored by the U.S. Securities and Exchange Commission. Data is reproduced from public SEC filings and datasets. Not investment advice.
API: https://sec-api.dev/docs · ChatGPT app: https://chatgpt.com/plugins/plugin_asdk_app_6ae0ef2436ac8191941dae8a4d732669 · Free key: https://sec-api.dev/sign-up
