Learn how to configure SEC EDGAR MCP for your specific needs, including environment variables, client settings, and advanced options.

Environment Variables

Required Configuration

SEC_EDGAR_USER_AGENT
string
required
Your identification string for SEC EDGAR API access. Must include your name and email.Format: "Your Name (your.email@domain.com)"Example: "John Doe (john.doe@example.com)"
The SEC requires this for API access. Requests without a valid user agent may be blocked.

Optional Configuration

PYTHONPATH
string
Path to the SEC EDGAR MCP directory (only needed for local development).Example: /home/user/sec-edgar-mcp:$PYTHONPATH
LOG_LEVEL
string
default:"INFO"
Logging verbosity level.Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
CACHE_DIR
string
default:"~/.cache/sec-edgar-mcp"
Directory for caching ticker-to-CIK mappings and other data.

Setting Environment Variables

Temporary (Current Session)

export SEC_EDGAR_USER_AGENT="Your Name (your.email@domain.com)"
export LOG_LEVEL="DEBUG"

Permanent (All Sessions)

Add to ~/.bashrc, ~/.zshrc, or ~/.profile:
echo 'export SEC_EDGAR_USER_AGENT="Your Name (your.email@domain.com)"' >> ~/.bashrc
source ~/.bashrc

MCP Client Configuration

Configure your MCP client to use SEC EDGAR MCP:

Claude Desktop

{
  "mcpServers": {
    "sec-edgar-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-e",
        "SEC_EDGAR_USER_AGENT=Your Name (your.email@domain.com)",
        "stefanoamorelli/sec-edgar-mcp:latest"
      ],
      "env": {}
    }
  }
}

Cline (VS Code)

Add to your VS Code settings (settings.json):
{
  "cline.mcpServers": {
    "sec-edgar-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-e",
        "SEC_EDGAR_USER_AGENT=Your Name (your.email@domain.com)",
        "stefanoamorelli/sec-edgar-mcp:latest"
      ]
    }
  }
}

Continue.dev

Add to your Continue configuration:
{
  "models": [
    {
      "title": "Claude with SEC EDGAR",
      "provider": "anthropic",
      "model": "claude-3-sonnet",
      "mcpServers": {
        "sec-edgar-mcp": {
          "command": "docker",
          "args": [
            "run",
            "--rm",
            "-e",
            "SEC_EDGAR_USER_AGENT=Your Name (your.email@domain.com)",
            "stefanoamorelli/sec-edgar-mcp:latest"
          ]
        }
      }
    }
  ]
}

Advanced Configuration

Performance Tuning

Proxy Configuration

If you’re behind a corporate proxy:
# HTTP proxy
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080

# Proxy with authentication
export HTTP_PROXY=http://username:password@proxy.company.com:8080

# No proxy for local addresses
export NO_PROXY=localhost,127.0.0.1,.company.com

Logging Configuration

Control logging output for debugging:
# Set log level
export LOG_LEVEL=DEBUG

# Log to file
export LOG_FILE=/var/log/sec-edgar-mcp.log

# Disable colored output
export NO_COLOR=1

Configuration Best Practices

1

Use Environment Files

Create a .env file for your configuration:
# .env file
SEC_EDGAR_USER_AGENT="Your Name (your.email@domain.com)"
LOG_LEVEL=INFO
CACHE_DIR=/opt/sec-edgar-cache
Load it before running:
source .env
docker run --env-file .env stefanoamorelli/sec-edgar-mcp:latest
2

Validate Configuration

Test your configuration before using in production:
# Test configuration
docker run --rm \
  -e SEC_EDGAR_USER_AGENT="$SEC_EDGAR_USER_AGENT" \
  stefanoamorelli/sec-edgar-mcp:latest \
  --validate-config
3

Secure Sensitive Data

Never commit sensitive configuration to version control:
# Add to .gitignore
echo ".env" >> .gitignore
echo "*.env" >> .gitignore

Troubleshooting Configuration

Next Steps


Created and maintained by Stefano Amorelli. Built together with the community.