Get the FREE Ultimate OpenClaw Setup Guide →

fmp

Financial Modeling Prep MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cdtait-fmp-mcp-server uvx fmp-mcp-server \
  --env FMP_API_KEY="Your Financial Modeling Prep API key" \
  --env OPENAI_API_KEY="Your OpenAI API key (if using the Chat Agent)"

How to use

This MCP server provides a Financial Modeling Prep (FMP) integration that exposes a collection of tools for financial analysis. It includes modules for company information, financial statements, metrics, market data, stock quotes, charts, analyst ratings, market indices, market performers, market hours, ETF analysis, commodities, cryptocurrencies, forex, technical indicators, and investment analysis prompts. It also offers an interactive Chat Agent interface and supports multiple transports (stdio, SSE, and Streamable HTTP) for flexible deployment. You can query standardized endpoints (quotes, aftermarket quotes, forex, crypto, commodities, indices) and use specialized modules (e.g., statements for income/ balance sheet data, ETF/commodities modules for sector and price information, and analytics prompts for investment analyses) to generate structured outputs and Markdown-friendly results.

How to install

Prerequisites:

  • Python 3.8+ or a compatible environment
  • Access to a Financial Modeling Prep API key
  • Optional: OpenAI API key for the Chat Agent

Option A: Using uv (recommended for speed)

  1. Clone the repository: git clone https://github.com/cdtait/fmp-mcp-server.git cd fmp-mcp-server

  2. Set up a virtual environment and install dependencies:

    Create and activate the environment

    python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

    Install dependencies (including dev for testing, if needed)

    pip install -r requirements.txt pip install -e ".[dev]"

  3. Configure API keys: cp .env.template .env

    Edit the .env file to add your FMP API key and optional OpenAI key

    Example:

    FMP_API_KEY=your_api_key_here

    OPENAI_API_KEY=your_openai_key_here

  4. Run the server (example with uvx): uvx fmp-mcp-server

Option B: Using standard Python environment (pip)

  1. Install dependencies in a virtual environment: python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

    pip install -r requirements.txt pip install -e ".[dev]"

  2. Set up API keys as above.

  3. Start the server using the module entry point (adjust if your entry point differs): python -m fmp_mcp_server

Notes:

  • Ensure your API keys are properly set in the environment or in a .env file loaded by the server.
  • The server exposes a /health endpoint for health checks and supports multiple transport modes for integration into your workflow.

Additional notes

Tips and common issues:

  • If you see API rate limit errors from FMP, consider applying for a higher quota or caching results locally.
  • For the Chat Agent, ensure OPENAI_API_KEY is valid and has access to the necessary models.
  • When using the Docker deployment option (if you adopt it later), you can pass environment variables via -e FMP_API_KEY and -e OPENAI_API_KEY.
  • The server exposes a unified quote endpoint across asset classes, so you can fetch stock, forex, crypto, commodities, and indices quotes with a consistent interface.
  • If you enable SSE/Streamable HTTP transports, you may need to configure firewall rules to allow persistent connections.
  • Refer to the FMP API docs linked in the repository for endpoint-specific parameters and response schemas.

Related MCP Servers

Sponsor this space

Reach thousands of developers