sec-edgar-mcp — Claude Code MCP server: what it does, how to install
MCP server providing direct access to US SEC EDGAR filings, XBRL financial statements, and insider trading records.
claude mcp add sec-edgar-mcp -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- uvx sec-edgar-mcpWhat sec-edgar-mcp does
This server connects AI assistants to the US Securities and Exchange Commission EDGAR database. Powered by sec-edgar-toolkit, it resolves company CIK identifiers, fetches corporate facts, and reads regulatory filings such as 10-K or 10-Q. The tooling parses XBRL data to retrieve balance sheets and cash flows. It also extracts insider transactions from Forms 3, 4, and 5, attaching the original filing URL to every response.
Running the tool requires Python 3.11+ or a Docker container. You must supply a valid SEC_EDGAR_USER_AGENT environment variable with your name and email. The SEC API immediately drops calls without it.
In addition to stdio, a streamable HTTP mode operates on port 9870. Because it lacks built-in authentication, exposing that port outside private networks poses a security risk.
What it helps with
- retrieve XBRL-parsed balance sheets and income statements from 10-K filings
- look up company CIK numbers and corporate details
- extract insider transaction records from Forms 3, 4, and 5
- pull specific sections from annual and quarterly SEC filings
Example prompts for the agent
- Pull the cash flow statement from the latest 10-K filing for Tesla
- Look up the CIK and recent Form 4 insider trades for Apple
- Extract the risk factors section from the newest 10-Q report of Microsoft
How to install sec-edgar-mcp
Platform CLI
claude mcp add sec-edgar-mcp -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- uvx sec-edgar-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>
Platform CLI
codex mcp add sec-edgar-mcp --env SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- uvx sec-edgar-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>
Config file
{
"mcpServers": {
"sec-edgar-mcp": {
"command": "uvx",
"args": [
"sec-edgar-mcp"
],
"env": {
"SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>
Config file
{
"servers": {
"sec-edgar-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"sec-edgar-mcp"
],
"env": {
"SEC_EDGAR_USER_AGENT": "<SEC_EDGAR_USER_AGENT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>
Platform CLI
gemini mcp add -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> sec-edgar-mcp uvx sec-edgar-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sec-edgar-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about sec-edgar-mcp
How to install sec-edgar-mcp in Claude Code?
Run claude mcp add sec-edgar-mcp -e SEC_EDGAR_USER_AGENT=<SEC_EDGAR_USER_AGENT> -- uvx sec-edgar-mcp in your terminal, replacing the placeholder with your name and email.
What does sec-edgar-mcp do?
It enables coding assistants to fetch public filings, parsed financial tables, and insider transactions directly from the SEC EDGAR system.
Why is SEC_EDGAR_USER_AGENT required?
The SEC mandates a custom User-Agent header containing your contact info. Without this environment variable, all requests to EDGAR fail.