Overview
This quickstart guide will have you running the Financial MCP Server locally and making your first API calls within minutes.Prerequisites: Python 3.8+, Git, and a terminal/command prompt
Step 1: Clone and Setup
1
Clone the Repository
2
Install Dependencies
3
Set Environment Variables
Step 2: Start the Server
Success! Your server is now running on
http://localhost:8001Live Demo Available: You can also test the API using our live Railway deployment at
https://stocks-dev.up.railway.app/api/v1/ without setting up locally.Step 3: Test Your Installation
Option A: Using cURL
Option B: Interactive API Documentation
Visithttp://localhost:8001/docs in your browser to access the interactive Swagger UI documentation.

Step 4: Example Responses
Stock Quote Response
Market Gainers Response
Available Endpoints
Stock Data
- Real-time quotes
- Company overviews
- Historical data
Market Data
- Market gainers/losers
- Most active stocks
- Sector performance
FMP Professional
- Financial statements
- Key metrics & ratios
- DCF valuations
Advanced Tools
- Stock screening
- Options analysis
- Technical indicators
MCP Protocol Usage
For AI agents using the Model Context Protocol:The server automatically handles both MCP and REST protocols on the same port.
Common Issues
Port Already in Use
Port Already in Use
If you see βAddress already in useβ, either:
- Kill existing processes:
pkill -f "python3 main.py" - Use a different port:
export PORT=8002
YFinance Rate Limiting
YFinance Rate Limiting
YFinance may get rate limited by Yahoo Finance. The server automatically:
- Implements retry logic with exponential backoff
- Falls back to FMP data when available
- Provides clear error messages
Missing FMP API Key
Missing FMP API Key
Some advanced features require an FMP API key:
- Get a free key at Financial Modeling Prep
- Set it with:
export FMP_API_KEY="your_key" - Basic YFinance tools work without an API key
Next Steps
Deploy to Production
Deploy to Railway, Heroku, or your preferred platform
Frontend Integration
Connect your web application or mobile app
MCP Integration
Integrate with Claude or other AI agents
API Reference
Explore all 32 available financial tools