Skip to main content

Overview

The Financial MCP Server provides 32 comprehensive financial tools through both MCP protocol and REST API endpoints. This reference covers all available functionality.

REST API

Traditional HTTP endpoints for web applications

MCP Protocol

Native integration for AI agents and tools

Base URLs

http://localhost:8001

API Architecture

REST API Structure

All REST endpoints follow this pattern:
https://stocks-dev.up.railway.app/api/v1/{category}/{action}
Categories:
  • stock - Individual stock data and analysis
  • market - Market-wide data and trends
  • fmp - Financial Modeling Prep professional tools
  • crypto - Cryptocurrency data
  • screener - Stock screening and filtering

MCP Protocol Structure

MCP tools are called using the standard MCP format:
{
  "method": "tools/call",
  "params": {
    "name": "tool_name",
    "arguments": {
      "parameter": "value"
    }
  }
}

Data Sources

Source: Yahoo Finance via Python library
Cost: Free
Rate Limits: Subject to Yahoo Finance limits
Reliability: Good for basic data, may get rate limited
Available Tools:
  • get_stock_quote - Real-time stock quotes
  • get_company_overview - Company information and metrics
  • get_time_series_daily - Historical price data
  • search_symbol - Symbol search and lookup
  • get_recommendations - Analyst recommendations
  • get_insider_transactions - Insider trading data
Source: Financial Modeling Prep API
Cost: Free tier (250 requests/day), paid plans available
Rate Limits: Based on subscription tier
Reliability: Professional-grade, highly reliable
Categories:
  • Core Financial Data (4 tools): Statements, metrics, DCF, quotes
  • Market Data (4 tools): Gainers, losers, active stocks, sectors
  • Advanced Screening (6 tools): Stock screener, search, news, etc.
  • Options & Technical (4 tools): Options chains, technical indicators
  • International & Alternative (4 tools): Global markets, crypto, commodities
  • Professional Analytics (4 tools): Analyst data, government trades

Response Format

All endpoints return JSON responses with consistent structure:

Success Response

{
  "symbol": "AAPL",
  "price": 201.08,
  "change": 0.08,
  "timestamp": "2025-06-28T18:42:12.471731",
  "source": "FMP"
}

Error Response

{
  "error": "Stock symbol not found",
  "detail": "The symbol 'INVALID' was not found in our database",
  "timestamp": "2025-06-28T18:42:12.471731"
}

Paginated Response

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 150,
    "has_next": true
  }
}

Rate Limiting

Rate limits vary by data source and subscription tier.
SourceFree TierPaid Tier
YFinanceYahoo Finance limitsYahoo Finance limits
FMP250 requests/dayUp to 10,000+/day

Rate Limit Headers

X-RateLimit-Limit: 250
X-RateLimit-Remaining: 247
X-RateLimit-Reset: 1640995200

Error Codes

CodeDescriptionSolution
400Bad RequestCheck request parameters
401UnauthorizedVerify API key
404Not FoundCheck symbol/endpoint exists
429Rate LimitedWait and retry, upgrade plan
500Server ErrorContact support

Interactive Documentation

Visit your server’s /docs endpoint for interactive Swagger UI documentation:
Interactive API Documentation
Features:
  • Try endpoints directly in browser
  • View request/response schemas
  • Copy cURL commands
  • Test with your API key

Quick Start Examples

curl "https://stocks-dev.up.railway.app/api/v1/stock/AAPL"

Next Steps