Skip to main content

Environment Variables

SEC_EDGAR_USER_AGENT
string
required
Required. Must include your name and email address in the format: "Your Name (email@domain.com)"The SEC requires this header for all API requests and will block requests without proper identification.
SEC_EDGAR_CACHE_DIR
string
default:"~/.cache/sec-edgar"
Directory for caching SEC data to improve performance and reduce API calls.
SEC_EDGAR_RATE_LIMIT
integer
default:"10"
Requests per second limit. SEC allows up to 10 requests per second.
SEC_EDGAR_TIMEOUT
integer
default:"30"
Request timeout in seconds for SEC API calls.
SEC_EDGAR_DEBUG
boolean
default:"false"
Enable debug logging for troubleshooting.

MCP Client Configuration

Claude Desktop

Configure Claude Desktop by editing ~/.config/claude-desktop/config.json:

Other MCP Clients

For other MCP-compatible clients, adapt the configuration format but maintain these key elements:

Command

How to start the server:
  • Docker: docker run ...
  • Python: python -m sec_edgar_mcp.server

Environment

Required environment variables:
  • SEC_EDGAR_USER_AGENT
  • Optional performance tuning vars

Advanced Configuration

Custom Cache Configuration

For production or high-volume usage, configure a persistent cache:

Rate Limiting Strategy

The SEC allows up to 10 requests per second, but being conservative can improve reliability:

Timeout Configuration

Adjust timeouts based on your use case:

Docker-Specific Configuration

Volume Mounting

Mount a persistent cache volume:

Resource Limits

Set resource limits for production:

Network Configuration

For proxy or firewall environments:

Performance Tuning

Memory Optimization

For memory-constrained environments:

Concurrent Processing

Configure concurrent request handling:

Security Configuration

Network Security

Ensure SEC Edgar MCP only communicates with authorized SEC endpoints.

User Agent Security

Never use fake or misleading User-Agent headers. The SEC requires accurate identification.

Logging Configuration

Enable Debug Logging

Structured Logging

For production environments:

Validation

Configuration Validation

Test your configuration:

Connection Testing

Verify SEC API connectivity:

Troubleshooting Configuration

Problem: SEC API returns 403 ForbiddenSolution: Ensure User-Agent includes valid email address:
Problem: Too many requests errorsSolution: Reduce rate limit:
Problem: Cannot write to cache directorySolution: Fix permissions:
Problem: Requests timing outSolution: Increase timeout:

Configuration Examples

Development Setup

Production Setup

High-Volume Setup