FMP MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "FMP_API_KEY=${FMP_API_KEY}" fmp-mcp-server -- docker run --env-file .env ghcr.io/ccdatatraits/fmp-mcp-server:latest
Required:FMP_API_KEY
README.md

Financial analysis tools using the Financial Modelling Prep API

FMP MCP Server

A Model Context Protocol (MCP) server that provides tools, resources, and prompts for financial analysis using the Financial Modelling Prep API.

Features

Tools

  • get_company_profile: Get comprehensive company information
  • get_stock_quote: Real-time stock quotes and market data
  • get_financial_statements: Income statement, balance sheet, and cash flow data
  • get_key_metrics: Key financial metrics and KPIs
  • get_financial_ratios: Comprehensive financial ratios for analysis
  • get_dcf_valuation: Discounted cash flow valuation
  • search_companies: Search for companies by name or symbol
  • get_sector_performance: Market sector performance overview

Resources

  • Market Sectors: Real-time sector performance data
  • Company Profiles: Detailed company information
  • Financial Statements: Complete financial statement data

Prompts

  • financial_analysis: Comprehensive financial analysis workflow
  • investment_research: Detailed investment research report
  • sector_analysis: Sector performance and comparison analysis

Setup

  1. Install dependencies:

    uv sync
    
  2. Configure API access:

    cp .env.example .env
    # Edit .env and add your Financial Modelling Prep API key
    
  3. Get API Key:

Usage

With Claude Code

Add to your Claude Code MCP configuration:

{
  "mcpServers": {
    "fmp": {
      "command": "uv",
      "args": ["run", "python", "-m", "fmp_mcp_server.server"],
      "env": {
        "FMP_API_KEY": "your_api_key_here"
      }
    }
  }
}

Direct Usage

# Run the server
uv run python -m fmp_mcp_server.server

# Or use the installed script
uv run fmp-mcp-server

Docker Usage

Build and run with Docker

# Build the image
docker build -t fmp-mcp-server .

# Run with environment file
docker run --env-file .env fmp-mcp-server

Using Docker Compose

# Start the service
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the service
docker-compose down

Using pre-built image from GitHub Container Registry

docker run --env-file .env ghcr.io/ccdatatraits/fmp-mcp-server:latest

Development

  1. Install with development dependencies:

    uv sync --dev
    
  2. Run tests:

    uv run pytest
    
  3. Format code:

    uv run black src/
    uv run ruff check src/
    
  4. Type checking:

    uv run mypy src/
    

API Rate Limits

The Financial Modelling Prep API has rate limits depending on your subscription:

  • Free: 250 requests/day
  • Starter: 300 requests/minute
  • Professional: 2000 requests/minute

Configure rate limiting in your .env file if needed.

License

MIT License

Tools (8)

get_company_profileGet comprehensive company information
get_stock_quoteReal-time stock quotes and market data
get_financial_statementsIncome statement, balance sheet, and cash flow data
get_key_metricsKey financial metrics and KPIs
get_financial_ratiosComprehensive financial ratios for analysis
get_dcf_valuationDiscounted cash flow valuation
search_companiesSearch for companies by name or symbol
get_sector_performanceMarket sector performance overview

Environment Variables

FMP_API_KEYrequiredAPI key from Financial Modelling Prep

Configuration

claude_desktop_config.json
{"mcpServers": {"fmp": {"command": "uv", "args": ["run", "python", "-m", "fmp_mcp_server.server"], "env": {"FMP_API_KEY": "your_api_key_here"}}}}

Try it

Get the latest stock quote and key financial metrics for Apple (AAPL).
Perform a discounted cash flow valuation for Microsoft.
Compare the current performance of the technology sector against the energy sector.
Retrieve the income statement for the last three years for Tesla.

Frequently Asked Questions

What are the key features of FMP MCP Server?

Real-time stock quotes and market data retrieval. Access to comprehensive financial statements and key performance indicators. Automated discounted cash flow (DCF) valuation calculations. Market sector performance analysis and comparison. Company search functionality by name or ticker symbol.

What can I use FMP MCP Server for?

Automating investment research reports by pulling live financial data into Claude. Performing quick fundamental analysis on potential stock picks. Comparing financial health across different companies in the same sector. Monitoring sector-wide market trends for portfolio rebalancing.

How do I install FMP MCP Server?

Install FMP MCP Server by running: uv sync

What MCP clients work with FMP MCP Server?

FMP MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep FMP MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare