Financial Modeling Prep (FMP) MCP Server
An MCP server that provides comprehensive access to real-time stock quotes, financial statements, analyst estimates, and technical indicators via the Financial Modeling Prep API. It enables users to conduct in-depth financial analysis and track market performance through specialized tools, resources, and prompt templates.
README
Financial Modeling Prep MCP Server v2.0
A modern Model Context Protocol (MCP) server for accessing financial data from Financial Modeling Prep (FMP) API. Built with the latest MCP SDK features including tools, resources, and prompts.
Features
🔧 Tools (25 Total)
Market Data
get_quote- Real-time stock quotessearch_symbol- Search stocks by name or tickerget_market_gainers- Top performing stocksget_market_losers- Worst performing stocksget_most_active- Most actively traded stocksget_sector_performance- Sector performance dataget_sp500_constituents- S&P 500 constituents
Financial Statements
get_company_profile- Detailed company informationget_income_statement- Income statements (annual/quarterly)get_balance_sheet- Balance sheets (annual/quarterly)get_cash_flow- Cash flow statements (annual/quarterly)get_stock_news- Latest stock newsget_key_metrics- Key financial metrics (P/E, ROE, etc.)get_financial_ratios- Detailed financial ratios
Analyst Data
get_analyst_estimates- Revenue and EPS forecastsget_price_target- Analyst price targetsget_analyst_ratings- Upgrades/downgradesget_insider_trading- Insider trading activityget_institutional_holders- 13F institutional ownership
Technical Indicators
get_technical_indicator_rsi- Relative Strength Indexget_technical_indicator_sma- Simple Moving Averageget_technical_indicator_ema- Exponential Moving Averageget_historical_chart- Historical price data
Calendar Data
get_earnings_calendar- Earnings announcement calendarget_economic_calendar- Economic data releasesget_economic_indicator- GDP, unemployment, CPI, etc.
📚 Resources (5 Total)
Resources provide direct data access via URIs:
fmp://company/{symbol}/profile- Company profilefmp://company/{symbol}/quote- Real-time quotefmp://company/{symbol}/financials/{statement}/{period}- Financial statementsfmp://market/overview- Market overview (gainers, losers, active)fmp://market/sectors/{date}- Sector performance
💬 Prompts (3 Total)
Prompt templates for common analysis tasks:
stock_analysis- Comprehensive stock analysisportfolio_evaluation- Portfolio diversification and risk analysisearnings_preview- Upcoming earnings preview
Installation
npm install
npm run build
Configuration
Set your FMP API key as an environment variable:
export FMP_API_KEY="your-api-key"
Get your API key from Financial Modeling Prep
Usage
Stdio Mode (Default)
# Set environment variable and run
export FMP_API_KEY="your-api-key"
npm start
# Or
FMP_API_KEY="your-api-key" node build/index.js
HTTP Mode
# Start HTTP server
npm run start:http
# Or with custom port
node build/index.js --http --port=8080
The HTTP server provides:
POST /mcp- MCP protocol endpointGET /health- Health checkGET /- Server info
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows):
{
"mcpServers": {
"fmp": {
"command": "node",
"args": ["/path/to/aigroup-fmp-mcp/build/index.js"],
"env": {
"FMP_API_KEY": "your-api-key"
}
}
}
}
Project Structure
aigroup-fmp-mcp/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # McpServer and transport setup
│ ├── tools/ # Tool definitions
│ │ ├── index.ts # Tool registration
│ │ ├── market.ts # Market data tools
│ │ ├── financials.ts # Financial statement tools
│ │ ├── analysis.ts # Analyst data tools
│ │ ├── technical.ts # Technical indicator tools
│ │ └── calendar.ts # Calendar data tools
│ ├── resources/ # Resource definitions
│ │ ├── index.ts # Resource registration
│ │ └── company.ts # Company-related resources
│ ├── prompts/ # Prompt templates
│ │ ├── index.ts # Prompt registration
│ │ └── analysis.ts # Analysis prompts
│ ├── types/ # TypeScript types
│ │ └── index.ts
│ └── utils/
│ └── fmp.ts # FMP API utilities
├── package.json
├── tsconfig.json
└── README.md
API Reference
All tools use FMP's stable API endpoints. See FMP Documentation for more details.
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
What's New in v2.0
- MCP SDK v1.27.1: Uses latest
McpServerclass withregisterTool(),registerResource(), andregisterPrompt()APIs - Zod Schema Validation: Type-safe parameter validation with Zod
- Resources: Direct data access via resource URIs
- Prompts: Reusable analysis templates
- Dual Transport: Support for both stdio and HTTP transports
- Better TypeScript: Full type definitions for all data structures
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。