FMP MCP Server
The FMP MCP Server provides AI-assisted financial research tools powered by the Financial Modeling Prep API, offering both high-level workflow tools and granular atomic tools.
Workflow Tools (orchestrate multiple data sources into comprehensive responses):
stock_brief– All-in-one snapshot: profile, price action, valuation, analyst consensus, insider signals, and headlinesmarket_context– Full market environment: Treasury rates, yield curve, sector rotation, breadth signals, movers, and economic calendarearnings_setup– Pre-earnings analysis: EPS/revenue estimates, beat/miss history, analyst momentum, price drift, and insider signalsearnings_preview– Pre-earnings scorecard with composite signal and bull/bear triggersfair_value_estimate– Multi-method valuation: DCF, PE/PS-based, peer multiples, and analyst targets with blended estimateearnings_postmortem– Post-earnings synthesis: beat/miss, YoY/QoQ trends, analyst reactions, price response, and guidance tone
Atomic Tools (granular data retrieval):
Company & Fundamentals:
company_overview,financial_statements(income/balance/cash flow + CAGRs),revenue_segments,dividends_infoAnalyst & Valuation:
analyst_consensus,peer_comparison,estimate_revisionsPrice & Market:
price_history(SMA, momentum, volatility),market_overview(sector performance, gainers/losers),stock_searchOwnership & Activity:
insider_activity,institutional_ownershipNews & Transcripts:
stock_news(with event-type flagging),earnings_transcript(paginated)Macro & Economic:
treasury_rates(yield curve, inversion flag),economic_calendarEarnings & ETFs:
earnings_calendar,earnings_info,etf_lookup(holdings or reverse lookup)Meta:
fmp_coverage_gaps– shows unimplemented FMP API endpoints
Key technical features: parallel API fetching, in-memory TTL caching, graceful degradation with partial data on errors, and pagination support for transcripts.
Provides financial market data integration with Polygon.io API, enabling access to Federal Reserve data and short volume information for comprehensive market analysis.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FMP MCP Server Give me a detailed stock brief for NVDA including valuation and analyst ratings"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FMP MCP Server
A Model Context Protocol server that provides financial data from Financial Modeling Prep for AI-assisted investment research.
Built with FastMCP 2.0 and Python.
Tools
Workflow Tools (start here)
High-level tools that orchestrate multiple API calls into single research-ready responses:
Tool | Description |
| Quick comprehensive snapshot: profile, price action, valuation, analyst consensus, insider signals, headlines |
| Full market environment: rates, yield curve, sector rotation, breadth, movers, economic calendar |
| Pre-earnings positioning: consensus estimates, beat/miss history, analyst momentum, price drift, insider signals |
| Pre-earnings setup scorecard: composite signal, thesis alignment, and bull/bear triggers |
| Multi-method valuation: DCF, earnings-based, peer multiples, analyst targets, blended estimate |
| Post-earnings synthesis: beat/miss, trend comparison, analyst reaction, market response, guidance tone |
Atomic Tools (deeper dives)
Tool | Description |
| Company profile, quote, key metrics, and analyst ratings |
| Income statement, balance sheet, cash flow (annual/quarterly) |
| Analyst grades, price targets, and forward estimates |
| Historical daily prices with technical context |
| Search for stocks by name or ticker |
| Insider trading activity and transaction statistics |
| Top institutional holders and position changes |
| Recent news and press releases |
| Current Treasury yields and yield curve |
| Upcoming economic events and releases |
| Sector performance, gainers, losers, most active |
| Earnings call transcripts with pagination support |
| Revenue breakdown by product and geography |
| Peer group valuation and performance comparison |
| Dividend history, yield, growth, and payout analysis |
| Upcoming earnings dates with optional symbol filter |
| ETF holdings or stock ETF exposure (dual-mode with auto-detect) |
| Analyst sentiment momentum: forward estimates, grade changes, beat rate |
| Docs parity introspection: endpoint families not yet implemented in this MCP server |
Related MCP server: Financial Modeling Prep MCP Server
Setup
Prerequisites
Python 3.11+
uv (recommended) or pip
An FMP API key
Install
uv syncConfigure
Set your API key as an environment variable:
export FMP_API_KEY=your_api_key_hereOr create a .env file:
FMP_API_KEY=your_api_key_hereRun
uv run fastmcp run server.pyClaude Desktop / Claude Code
Add to your MCP config:
{
"mcpServers": {
"fmp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/fmp", "fastmcp", "run", "server.py"],
"env": {
"FMP_API_KEY": "your_api_key_here"
}
}
}
}Testing
uv run pytest tests/ -vAll tools are tested with mocked API responses using respx.
Live e2e tests (real API) can be run in pooled parallel mode:
uv run pytest tests/test_live.py -m live_full -n 4 -qArchitecture
server.py # FastMCP entry point, registers all tool modules
tools/_helpers.py # Shared SDK helpers: safe calls, TTL cache, model dumping/normalization
tools/
overview.py # company_overview, stock_search
financials.py # financial_statements, revenue_segments
valuation.py # analyst_consensus, peer_comparison, estimate_revisions
market.py # price_history, dividends_info, earnings_calendar, etf_lookup
ownership.py # insider_activity, institutional_ownership
news.py # stock_news
macro.py # treasury_rates, economic_calendar, market_overview
transcripts.py # earnings_transcript (with pagination)
workflows.py # stock_brief, market_context, earnings_setup, earnings_preview, fair_value_estimate, earnings_postmortemKey design decisions:
Module pattern: Each tool file exports
register(mcp, client)to keep tools organizedSDK-first FMP client: Uses
AsyncFMPDataClient(fmp-data==2.2.0) directly for typed endpoint coverageParallel fetches: Workflow tools use
asyncio.gather()to call multiple endpoints concurrentlyGraceful degradation:
_safe_call()returns defaults on error so composite tools return partial data instead of failing entirelyIn-memory TTL cache: Avoids redundant API calls with configurable TTLs per data type (60s for quotes, 24h for profiles)
License
MIT
Available Tools
21 toolsanalyst_consensusAnalyst ConsensusARead-onlyIdempotent
Get Wall Street analyst consensus: price targets, ratings, and buy/sell distribution.
Returns analyst count, consensus/high/low price targets, upside percentage, buy/hold/sell breakdown, and FMP's own rating.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
company_overviewCompany OverviewARead-onlyIdempotent
Get a comprehensive company snapshot including profile, valuation ratios, and current quote.
Use this FIRST for any stock analysis query. Returns name, sector, market cap, P/E, P/B, dividend yield, ROE, debt/equity, and more.
Args: symbol: Stock ticker symbol (e.g. "AAPL", "MSFT")
Inputs: symbol (required). Returns: object
dividends_infoDividends InfoARead-onlyIdempotent
Get dividend history, yield, growth rates, and stock split history.
Returns current dividend yield, 3Y/5Y dividend CAGR, upcoming ex-date, payout context, and stock split history.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
earnings_infoEarnings InfoARead-onlyIdempotent
Get analyst earnings estimates and income statement history for a stock.
Returns upcoming quarterly estimates (EPS and revenue) from analyst consensus, plus recent annual income data for trend context.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
earnings_postmortemEarnings PostmortemARead-onlyIdempotent
Post-earnings synthesis: beat/miss, trend comparison, analyst reaction, market response, and guidance tone.
Analyzes the most recent (or specified) earnings report. Returns EPS and revenue surprise, YoY/QoQ comparisons, post-earnings price reaction, analyst rating changes since the print, and guidance tone from transcript.
Args: symbol: Stock ticker symbol (e.g. "AAPL") quarter: Specific quarter (1-4) to analyze. Omit for most recent. year: Specific year to analyze. Omit for most recent.
Inputs: symbol (required), quarter, year. Returns: object
earnings_setupEarnings SetupARead-onlyIdempotent
Pre-earnings positioning analysis: consensus estimates, historical beat/miss rate, analyst momentum, price drift, and insider signals.
Orchestrates 8 endpoints to answer "should I play this earnings?" Returns days until earnings, consensus EPS/revenue, beat rate from last 4-8 quarters, analyst upgrade/downgrade momentum, pre-earnings price drift, insider net activity, and a heuristic setup signal.
Args: symbol: Stock ticker symbol (e.g. "AAPL", "DDOG")
Inputs: symbol (required). Returns: object
earnings_transcriptEarnings TranscriptARead-onlyIdempotent
Get an earnings call transcript for a company.
When year/quarter are not specified, fetches the most recent available transcript. Returns paginated transcript content with line-boundary snapping. Use offset + max_chars to paginate through long transcripts.
Args: symbol: Stock ticker symbol (e.g. "AAPL") year: Fiscal year (e.g. 2025). Omit for latest available. quarter: Quarter number 1-4. Omit for latest available. max_chars: Max characters to return per call (default 40000) offset: Character offset to start from (default 0). Use next_offset from previous response to continue.
Inputs: symbol (required), year, quarter, max_chars, +1 more. Returns: object
economic_calendarEconomic CalendarARead-onlyIdempotent
Get upcoming high-impact macro-economic events.
Filters for important events (Fed, CPI, NFP, GDP, etc.) and sorts by date. Covers the next N days (default 14).
Args: days_ahead: Number of days to look ahead (default 14, max 90)
Inputs: days_ahead. Returns: object
fair_value_estimateFair Value EstimateARead-onlyIdempotent
Multi-method fair value estimate with peer context.
Calculates fair value using PE-based, PS-based, simplified DCF, and analyst target methods. Compares current multiples to peer medians. Returns a blended fair value, upside/downside, and valuation rating.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
financial_statementsFinancial StatementsARead-onlyIdempotent
Get income statement, balance sheet, and cash flow data with growth rates.
Returns simplified per-period financials and 3-year CAGRs for key metrics. Use after company_overview for deeper analysis.
Args: symbol: Stock ticker symbol (e.g. "AAPL") period: "annual" or "quarter" (default "annual") limit: Number of periods to return (default 5)
Inputs: symbol (required), period, limit. Returns: object
insider_activityInsider ActivityARead-onlyIdempotent
Get insider trading activity, statistics, and ownership context.
Returns net buy/sell over 30/90 days, cluster buying signals, CEO/CFO action highlights, and insider ownership as % of float.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
institutional_ownershipInstitutional OwnershipARead-onlyIdempotent
Get institutional ownership breakdown and position changes.
Returns top 10 holders with % ownership, quarter-over-quarter position changes, and institutional vs float ratio.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
market_contextMarket ContextARead-onlyIdempotent
Full market environment: rates, yield curve, sector rotation, breadth, movers, and economic calendar.
Combines treasury rates, risk premium, sector performance, biggest movers, and upcoming macro events into a single environment snapshot. Calculates yield curve spread, rotation signal, breadth signal, and overall regime classification.
Inputs: no named parameters. Returns: object
market_overviewMarket OverviewARead-onlyIdempotent
Get today's market snapshot: sector performance, biggest movers, and most active stocks.
Returns sector rankings, top 5 gainers/losers, and most actively traded names.
Inputs: no named parameters. Returns: object
peer_comparisonPeer ComparisonARead-onlyIdempotent
Compare a stock's valuation and growth metrics against its peers.
Finds FMP-identified peers, then compares P/E, P/S, EV/EBITDA, growth rates, and margins. Shows target's premium/discount to peer median and rank within the group.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
price_historyPrice HistoryARead-onlyIdempotent
Get price performance, key levels, and momentum indicators.
Returns current price, 52-week range, SMA-50/200, performance across timeframes, volatility, and recent daily closes. Not for raw chart data.
Args: symbol: Stock ticker symbol (e.g. "AAPL") period: Time period - "1w", "1m", "3m", "6m", "ytd", "1y", "2y", "5y" (default "1y")
Inputs: symbol (required), period. Returns: object
revenue_segmentsRevenue SegmentsARead-onlyIdempotent
Get revenue breakdown by product/service and geographic region.
Returns segment % of total, identifies fastest-growing segment, and flags concentration risk (>50% from one segment).
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
stock_briefStock BriefARead-onlyIdempotent
Quick comprehensive stock snapshot: profile, price action, valuation, analyst consensus, insider signals, and top headlines.
Replaces the 4-tool chain (overview + price + news + consensus) with a single call. Returns momentum across timeframes, SMA positioning, valuation multiples, analyst consensus + upside, insider signal, and a heuristic quick-take signal.
Args: symbol: Stock ticker symbol (e.g. "AAPL")
Inputs: symbol (required). Returns: object
stock_newsStock NewsARead-onlyIdempotent
Get recent news articles and press releases for a stock.
Merges news and press releases, deduplicates by title similarity, and sorts by date. Flags major event types (earnings, FDA, M&A, etc.).
Args: symbol: Stock ticker symbol (e.g. "AAPL") limit: Max total items to return (default 20)
Inputs: symbol (required), limit. Returns: object
stock_searchStock SearchARead-onlyIdempotent
Find stocks by name/ticker or screen by criteria.
For simple name/ticker lookup, just pass query. For filtered screening, use the optional parameters.
Args: query: Company name or ticker to search for exchange: Filter by exchange (e.g. "NYSE", "NASDAQ") sector: Filter by sector (e.g. "Technology", "Healthcare") market_cap_min: Minimum market cap in dollars market_cap_max: Maximum market cap in dollars limit: Max results to return (default 20)
Inputs: query (required), exchange, sector, market_cap_min, +2 more. Returns: object
treasury_ratesTreasury RatesARead-onlyIdempotent
Get current US Treasury yield curve and equity risk premium.
Returns latest yields across maturities, yield curve slope (10Y-2Y), inversion flag, and DCF-ready inputs (10Y rate + equity risk premium).
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools have distinct purposes targeting specific financial analysis aspects like earnings, valuation, or market data, with clear boundaries. However, some overlap exists between company_overview and stock_brief, and between market_overview and market_context, which could cause minor confusion but descriptions help differentiate them.
Tool names follow a consistent snake_case pattern with clear verb_noun or noun_verb structures throughout, such as analyst_consensus, company_overview, and earnings_setup. There are no deviations in naming conventions, making the set predictable and readable.
With 21 tools, the count is borderline high for a financial data server, potentially overwhelming for agents. While it covers a broad domain, some tools like stock_brief might overlap with others, suggesting the set could be streamlined without losing functionality.
The tool surface provides comprehensive coverage for stock analysis, including company data, earnings, valuation, market context, and search capabilities. It supports full CRUD-like workflows for financial research with no obvious gaps, enabling agents to perform detailed analysis from overview to deep dives.
Maintenance
Related MCP Connectors
Market data, financial statements, valuation, research, and news for investment workflows.
Financial market, fundamental, valuation, risk, ownership, forecast, and portfolio tools.
SEC filings and financial data for AI agents: 59 tools for statements, valuation and supply chains.
AI equity research: quant scores, fundamentals, valuation, risks and portfolio audits for any stock.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables AI assistants to access and analyze financial data including stock information, company fundamentals, and market insights through the Financial Modeling Prep API.267624 npm149TypeScriptApache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants access to comprehensive financial data including real-time stock quotes, company fundamentals, financial statements, market analysis, economic indicators, and 250+ financial tools across 24 categories from Financial Modeling Prep API.624 npmApache 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to analyze stocks, screen markets, compare peers, read earnings calls, and track sector rotations using live financial data from Financial Modeling Prep.21PolyForm Noncommercial 1.0.0
- AlicenseBqualityCmaintenanceProvides access to Financial Modeling Prep's comprehensive financial data API, enabling real-time stock quotes, company fundamentals, financial statements, market insights, analyst data, and technical indicators directly in Claude Desktop.26130 npm2MIT