Skip to main content

Configuration

This guide covers all configuration options for the FRED MCP Server, including environment variables, client setup, and advanced settings.

Environment Variables

The FRED MCP Server uses environment variables for configuration. These can be set in your client configuration or system environment.

Required Variables

FRED_API_KEY
string
required
Your FRED API key from the Federal Reserve Bank of St. Louis.How to obtain:
  1. Visit fred.stlouisfed.org/docs/api/api_key.html
  2. Register for a free account
  3. Request an API key (instant approval)
Never commit your API key to version control. Use environment variables or secure key management.

Optional Variables

FRED_BASE_URL
string
default:"https://api.stlouisfed.org/fred"
Override the FRED API base URL. Useful for:
  • Using proxy servers
  • Testing with mock services
  • Enterprise deployments with custom endpoints
LOG_LEVEL
string
default:"info"
Control the verbosity of server logs.Options:
  • debug: Detailed debugging information
  • info: General information messages
  • warn: Warning messages only
  • error: Error messages only
MAX_RETRIES
number
default:"3"
Maximum number of retry attempts for failed API requests.
TIMEOUT_MS
number
default:"30000"
Request timeout in milliseconds (default: 30 seconds).

Client Configurations

Claude Desktop

Docker Configuration

Security Best Practices

API Key Management

Never expose your FRED API key in public repositories, logs, or client-side code.
Use .env files with proper gitignore:
Load in your application:

Network Security

If running as a service, restrict network access:
For production deployments with HTTP transport:

Performance Optimization

Rate Limiting

FRED API has rate limits that you must respect:
Default FRED API limits:
  • 120 requests per minute
  • 40 requests per minute for series observations
RATE_LIMIT_REQUESTS
number
default:"100"
Maximum requests per minute
RATE_LIMIT_BACKOFF
boolean
default:"true"
Enable exponential backoff on rate limit errors

Logging Configuration

Log Formats

Log Destinations

Development Configuration

Local Development

1

Create Development Config

2

Set Development Variables

3

Run Development Server

Testing Configuration

Monitoring & Alerts

Health Checks

Configure health monitoring:
HEALTH_CHECK_ENABLED
boolean
default:"false"
Enable health check endpoint
HEALTH_CHECK_INTERVAL
number
default:"60000"
Health check interval in milliseconds

Metrics Collection

Troubleshooting Configuration

Debug Mode

Enable comprehensive debugging:

Common Issues

Symptoms: Default values used instead of configured valuesSolutions:
  1. Check JSON syntax in config file
  2. Verify environment variable names (case-sensitive)
  3. Ensure config file is saved
  4. Restart client application
Symptoms: Cannot read/write configurationSolutions:
Symptoms: API key not found errorsCheck variables:

Next Steps

API Reference

Explore available tools and parameters

Examples

See configuration in action

Troubleshooting

Solve common configuration issues

Security

Security best practices