What is MCP?
The Model Context Protocol (MCP) is a standardized protocol that enables AI agents to interact with external tools and data sources. Our Financial MCP Server implements this protocol to provide seamless financial data access to AI systems like Claude.MCP allows AI agents to call financial tools directly, making it perfect for building AI-powered financial analysis applications.
How It Works
MCP vs REST API
MCP Protocol
For AI Agents
- Native AI integration
- Structured tool calls
- Type-safe parameters
- Error handling optimized for AI
REST API
For Applications
- Standard HTTP endpoints
- Web framework integration
- Frontend/mobile apps
- Traditional API consumers
Available MCP Tools
YFinance Tools (6 tools)
get_stock_quote- Real-time stock quotesget_company_overview- Company informationget_time_series_daily- Historical datasearch_symbol- Symbol searchget_recommendations- Analyst recommendationsget_insider_transactions- Insider trading data
FMP Tools (26 tools)
- Core Financial:
fmp_get_stock_quote,fmp_get_financial_statements,fmp_get_key_metrics,fmp_get_dcf_valuation - Market Data:
fmp_get_market_gainers,fmp_get_market_losers,fmp_get_most_active,fmp_get_sector_performance - Screening:
fmp_stock_screener,fmp_search_advanced,fmp_get_stock_news,fmp_get_price_targets - Advanced:
fmp_get_options_chain,fmp_get_technical_indicators,fmp_get_crypto_prices
Integration Examples
Claude Desktop Integration
Add to your Claude Desktop MCP configuration:Custom AI Agent Integration
Tool Response Format
All MCP tools return structured responses:Error Handling
MCP tools provide detailed error information:Best Practices
Tool Selection
Tool Selection
- Use FMP tools for reliability and comprehensive data
- Use YFinance tools for basic data when FMP quota is exceeded
- Always handle potential rate limiting and errors
Parameter Validation
Parameter Validation
- Validate stock symbols before making calls
- Use uppercase symbols (AAPL, not aapl)
- Check required vs optional parameters for each tool
Response Processing
Response Processing
- Parse JSON responses properly
- Handle both success and error cases
- Cache responses when appropriate to reduce API calls
Rate Limiting
Rate Limiting
- Monitor API usage, especially with FMP free tier (250/day)
- Implement exponential backoff for retries
- Consider upgrading to paid plans for production use
Server Configuration
The MCP server automatically starts with both protocols:Troubleshooting
Connection Issues
Connection Issues
Symptoms: Cannot connect to MCP serverSolutions:
- Verify server is running on correct port
- Check environment variables are set
- Ensure Python dependencies are installed
Tool Call Failures
Tool Call Failures
Symptoms: Tools return errors or timeoutSolutions:
- Verify FMP API key is valid
- Check internet connectivity
- Monitor rate limits
- Review tool parameters
Response Parsing
Response Parsing
Symptoms: Cannot parse tool responsesSolutions:
- Ensure JSON parsing handles both success/error cases
- Check for nested response structures
- Validate data types match expectations