System Requirements
Minimum Requirements
Python 3.8 or higher
512MB RAM
100MB disk space
Internet connection
Recommended
Python 3.11+
1GB RAM
500MB disk space
Stable internet connection
Local Development Setup
1. Clone the Repository
git clone https://github.com/your-org/financial-mcp-server.git
cd financial-mcp-server
2. Create Virtual Environment (Recommended)
python3 -m venv financial-mcp
source financial-mcp/bin/activate # On Windows: financial-mcp\Scripts\activate
3. Install Dependencies
pip install -r requirements.txt
4. Environment Configuration
Create a .env file in the project root:
# Required for FMP professional tools
FMP_API_KEY = your_fmp_api_key
# Server configuration
PORT = 8001
HOST = 0.0.0.0
# Optional: Logging level
LOG_LEVEL = INFO
# Optional: CORS settings
CORS_ORIGINS = *
Never commit your .env file to version control. Add it to .gitignore.
5. Verify Installation
Expected output:
🚀 Starting Enhanced Financial MCP Server
📡 MCP Protocol: http://0.0.0.0:8001/
🌐 REST API: http://0.0.0.0:8001/api/v1/
📚 API Docs: http://0.0.0.0:8001/docs
🔧 Tools Available: 32 (6 YFinance + 26 FMP)
Production Deployment
Railway Deployment
Connect Repository
Go to Railway
Create new project from GitHub repository
Select your financial-mcp-server repository
Configure Environment Variables
In Railway dashboard: FMP_API_KEY=your_actual_api_key
PORT=$PORT
Deploy
Railway automatically detects Python and uses the Procfile:
Docker Deployment
Dockerfile
Build and Run
docker-compose.yml
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8001
CMD [ "python" , "main.py" ]
Heroku Deployment
Install Heroku CLI
# macOS
brew tap heroku/brew && brew install heroku
# Other platforms: https://devcenter.heroku.com/articles/heroku-cli
Create Heroku App
heroku create your-financial-mcp-server
heroku config:set FMP_API_KEY=your_actual_api_key
VPS/Cloud Server
For Ubuntu/Debian servers:
# Update system
sudo apt update && sudo apt upgrade -y
# Install Python and dependencies
sudo apt install python3 python3-pip python3-venv nginx -y
# Clone and setup
git clone https://github.com/your-org/financial-mcp-server.git
cd financial-mcp-server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create systemd service
sudo nano /etc/systemd/system/financial-mcp.service
# Enable and start service
sudo systemctl enable financial-mcp
sudo systemctl start financial-mcp
sudo systemctl status financial-mcp
API Keys Setup
Financial Modeling Prep (FMP)
Get API Key
After registration, find your API key in the dashboard
Set Environment Variable
export FMP_API_KEY = "your_actual_api_key_here"
Free Tier Limits : 250 requests/day. Upgrade to paid plans for higher limits and additional features.
YFinance (No API Key Required)
YFinance uses Yahoo Finance’s public data and doesn’t require an API key. However, it may be subject to rate limiting.
Troubleshooting
Python version conflicts: python3 --version # Should be 3.8+
Missing pip: python3 -m ensurepip --upgrade
Permission errors: pip install --user -r requirements.txt
Port already in use: # Find process using port
lsof -i :8001
# Kill process
kill -9 < PI D >
# Or use different port
export PORT = 8002
Missing environment variables: # Check current environment
env | grep FMP_API_KEY
# Set if missing
export FMP_API_KEY = "your_key"
FMP API errors:
Verify API key is correct
Check rate limits (250/day for free tier)
Ensure internet connectivity
YFinance rate limiting:
This is normal behavior from Yahoo Finance
Server implements automatic retry logic
Consider upgrading to FMP paid plan for reliability
Health Checks
Verify your installation with these endpoints:
Health Check
Test Stock Quote
Test Market Data
curl http://localhost:8001/api/v1/health
Next Steps