Overview
The Financial MCP Server uses a hybrid authentication model depending on the data source and deployment method. Understanding the authentication requirements is crucial for proper setup and usage.YFinance tools require no authentication, while FMP tools require an API key for full functionality.
Authentication Methods
1. No Authentication (YFinance)
YFinance tools work immediately without any setup:- Basic stock quotes
- Company information
- Historical data
- Symbol search
- Analyst recommendations
- Insider transactions
2. FMP API Key (Professional Tools)
FMP tools require a valid API key for access:Getting FMP API Key
Step 1: Create Account
- Visit Financial Modeling Prep
- Click “Sign Up” to create a free account
- Verify your email address
- Complete the registration process
Step 2: Access Dashboard
- Log in to your FMP account
- Navigate to the API Dashboard
- Find your API key in the “API Key” section
- Copy the key for use in your application
Step 3: Choose Plan
| Plan | Requests/Day | Price | Features |
|---|---|---|---|
| Free | 250 | $0 | Basic data, perfect for development |
| Starter | 1,000 | $15/month | Production-ready for small apps |
| Professional | 10,000 | $50/month | High-volume applications |
| Enterprise | Custom | Custom | Unlimited with premium support |
Environment Configuration
Local Development
Production Deployment
API Key Validation
Testing Your Setup
Server Response Indicators
Valid FMP API Key
Invalid/Missing FMP API Key
YFinance Fallback Active
Rate Limiting & Quotas
FMP Rate Limits
Rate limits are enforced per API key:| Plan | Daily Limit | Per-Minute Limit | Overage |
|---|---|---|---|
| Free | 250 | 5 | Blocked |
| Starter | 1,000 | 20 | $0.01/request |
| Professional | 10,000 | 100 | $0.005/request |
Rate Limit Headers
FMP responses include rate limit information:Handling Rate Limits
The server automatically handles rate limiting:Security Best Practices
1. API Key Protection
Environment Variables
Environment Variables
✅ DO: Store API keys in environment variables❌ DON’T: Hardcode keys in source code
Version Control
Version Control
✅ DO: Add .env to .gitignore❌ DON’T: Commit API keys to repositories
Production Deployment
Production Deployment
✅ DO: Use platform environment variable systems
- Railway: Environment Variables tab
- Heroku: Config Vars
- Docker: Environment variables
2. Access Control
3. Monitoring & Alerting
Troubleshooting
Common Issues
Invalid API Key
Invalid API Key
Symptoms: 401 Unauthorized errorsSolutions:
- Verify API key is correct (copy-paste from FMP dashboard)
- Check environment variable is set:
echo $FMP_API_KEY - Restart server after setting environment variables
- Ensure no extra spaces or characters in the key
Rate Limit Exceeded
Rate Limit Exceeded
Symptoms: 429 Too Many Requests errorsSolutions:
- Check your FMP dashboard for usage statistics
- Implement caching to reduce API calls
- Upgrade to higher tier plan
- Use YFinance endpoints for basic data
Environment Variables Not Loading
Environment Variables Not Loading
Symptoms: Server uses “demo” key despite setting FMP_API_KEYSolutions:
- Restart terminal/shell after setting variables
- Use
printenv | grep FMPto verify variables are set - Check .env file is in correct directory
- Ensure proper syntax in environment files
Debugging Commands
Migration Guide
From Demo to Production
-
Get Production API Key
-
Update Deployment Configuration
-
Test Production Setup
-
Monitor Usage
- Check FMP dashboard regularly
- Set up usage alerts
- Plan for scaling if needed