home / mcp / financial modeling prep mcp server

Financial Modeling Prep MCP Server

A Model Context Protocol (MCP) implementation for Financial Modeling Prep, enabling AI assistants to access and analyze financial data, stock information, company fundamentals, and market insights.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "imbenrabi-financial-modeling-prep-mcp-server": {
      "url": "https://financial-modeling-prep-mcp-server-production.up.railway.app/mcp",
      "headers": {
        "FMP_ACCESS_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

You can run the Financial Modeling Prep MCP Server to access Financial Modeling Prep data through a Model Context Protocol interface, enabling dynamic tool loading, session isolation, and live financial data analysis via HTTP or local commands.

How to use

This MCP server lets you connect an MCP client to load and run financial data tools on demand. You can start in dynamic mode for runtime tool loading or opt for static or legacy modes for preloaded toolsets. Use the hosted instance for quick starts or self-host to control every aspect of configuration. Your client connects via HTTP to the /mcp endpoint and provides your API key within the session configuration.

How to install

Follow these concrete steps to install and run the MCP server on your environment. Start by ensuring you have Node.js and a package manager installed, then set up the server in the method you prefer.

Option A: Use Our Hosted Instance (Fastest) requires no installation.

Option B: Self-Host Your Own Instance (Full Control) provides full deployment options via NPM, Docker, or source.

# Prerequisites: Node.js installed, access to an API token from Financial Modeling Prep
# NPM installation (dynamic mode by default in hosted guide)
npm install -g financial-modeling-prep-mcp-server
export FMP_ACCESS_TOKEN=your_token_here
export DYNAMIC_TOOL_DISCOVERY=true  # or set static/legacy as needed
fmp-mcp

# Docker installation (build from source) 
# Build from repository then run with environment variables
git clone https://github.com/imbenrabi/Financial-Modeling-Prep-MCP-Server
cd Financial-Modeling-Prep-MCP-Server
docker build -t fmp-mcp-server .
docker run -p 8080:8080 \
  -e FMP_ACCESS_TOKEN=your_token_here \
  -e DYNAMIC_TOOL_DISCOVERY=true \
  fmp-mcp-server

# From source (development path)
git clone https://github.com/imbenrabi/Financial-Modeling-Prep-MCP-Server
cd Financial-Modeling-Prep-MCP-Server
npm install
npm run build
npm start -- --fmp-token=your_token_here

Configuration & mode enforcement

Configure the server to determine how tools are loaded and what mode you use. You can control mode globally via CLI, environment variables, or per-session (when allowed). The hosted instance uses dynamic mode by default and requires your FMP API key in the session configuration.

# Example CLI (server-level overrides all sessions)
npm run dev -- --dynamic-tool-discovery

# Example environment override
DYNAMIC_TOOL_DISCOVERY=true npm run dev

# Example per-session (session-level; may be ignored if server-level config is active)
curl -X POST http://localhost:8080/mcp?config=eyJERFk...

Dynamic Toolset Management (BETA)

Dynamic Toolset Management lets you enable and disable tool categories at runtime within a session. Start with five meta-tools that manage toolsets and dynamically load the full tool suites as needed to optimize performance.

# Start server in dynamic mode and enable a toolset during a session
export DYNAMIC_TOOL_DISCOVERY=true
npm start -- --fmp-token=YOUR_TOKEN

# Example meta-tools usage in a session would be issued via MCP calls to enable/disable toolsets

HTTP server & local development

The server operates over HTTP with JSON-RPC-style messages. Local development can be done by cloning the project, installing dependencies, building, and starting the server with your API token.

# Local development flow
git clone https://github.com/imbenrabi/Financial-Modeling-Prep-MCP-Server
cd Financial-Modeling-Prep-MCP-Server
npm install
npm run build
FMP_ACCESS_TOKEN=your_token npm run dev

# Health check (example)
curl http://localhost:8080/healthz

Obtaining a Financial Modeling Prep Access Token

To use the MCP server you need an API token from Financial Modeling Prep. Sign up on the FMP site, obtain your API key, and use it in your session configuration.

Troubleshooting

If you encounter issues, check common areas like port conflicts, invalid tokens, and server mode settings. Start by verifying the port and token, then ensure your session is configured with the correct client and session IDs.

# Port conflict example
PORT=4000 npm start -- --fmp-token=YOUR_TOKEN

# Validate token against FMP API docs
curl "https://financialmodelingprep.com/api/v3/profile/AAPL?apikey=YOUR_TOKEN"

Available tools

searchSymbol

Search for stock symbols by name or ticker

getQuote

Get current stock quote information

tools/list

List registered tools available in the session (dynamic mode) or mode context

enable_toolset

Enable a toolset by name (dynamic mode)