FinMCP
An MCP server that enables AI agents to query real-time financial data including stock quotes, market indices, company fundamentals, and portfolio tracking.
README
FinMCP ๐ โ Financial Data MCP Server
Let any AI agent query stocks, financials, markets & portfolios in real time.
๐ What is FinMCP?
FinMCP is an open-source Model Context Protocol (MCP) server that gives any AI agent โ Claude, Codex, Cursor, Hermes, or custom agents โ real-time superpowers over financial data.
Ask your AI agent questions like:
"What's Apple's current stock price and P/E ratio?" "Show me my portfolio performance today" "Compare Nvidia vs AMD on revenue growth" "What's the NIFTY 50 doing right now?" "Get the latest earnings transcript sentiment for Tesla"
And it queries live financial data โ no API keys required. ๐ฏ
โจ Features
| Feature | Description |
|---|---|
| ๐ท๏ธ Stock Quotes | Real-time price, change %, volume, market cap, day range |
| ๐ Historical Prices | OHLCV data โ 1d to max, any interval |
| ๐ข Company Fundamentals | Profile, sector, financials, ratios, employees |
| ๐ Financial Statements | Income statement, balance sheet, cash flow (annual/quarterly) |
| ๐ Market Indices | S&P 500, NASDAQ, NIFTY 50, SENSEX, FTSE, DAX, Nikkei & more |
| ๐ฑ Currency Exchange | Live FX rates for 150+ currencies |
| ๐ฐ Market News | Latest financial news for any ticker |
| ๐ Portfolio Tracker | Track holdings, P&L, allocation, performance |
| โ๏ธ Stock Comparison | Side-by-side comparison of key metrics |
| ๐ Ticker Search | Find tickers by company name or keyword |
๐ Global markets supported โ US, India (
.NS), Europe, Japan, and more.
๐ Quick Start
Prerequisites
- Python 3.10+
- An MCP-compatible client: Claude Desktop, Claude Code, Codex CLI, Hermes Agent, or Cursor
1๏ธโฃ Install
pip install finmcp
# or with uv (faster)
uv pip install finmcp
# or from source
git clone https://github.com/USERNAME/FinMCP.git
cd FinMCP
uv sync
2๏ธโฃ Run the server
# Run in stdio mode (default โ for MCP clients)
finmcp
# Or run as SSE server (for remote connections)
finmcp --transport sse --port 9876
3๏ธโฃ Connect your AI agent
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"finmcp": {
"command": "finmcp",
"args": []
}
}
}
Claude Code
claude mcp add finmcp -- cmd finmcp
Hermes Agent
Run alongside your agent:
finmcp
Then in your Hermes config, add it as an MCP server.
๐ ๏ธ Tools Reference
Stock Data
| Tool | Args | Returns |
|---|---|---|
get_stock_quote |
ticker |
Price, change, volume, market cap, P/E, dividend yield |
get_historical_prices |
ticker, period, interval |
OHLCV time series with summary stats |
get_company_info |
ticker |
Full company profile, sector, financial ratios |
get_financials |
ticker, statement_type, annual |
Income statement / balance sheet / cash flow |
search_tickers |
query, limit |
Matching tickers with names, exchange, sector |
Market Data
| Tool | Args | Returns |
|---|---|---|
get_market_indices |
(none) | Values for 13 major global indices |
get_currency_rates |
base |
FX rates for 15+ major currencies |
get_market_news |
ticker (opt), max_articles |
Latest news articles with links |
Portfolio & Analysis
| Tool | Args | Returns |
|---|---|---|
track_portfolio |
holdings_json, invest_currency |
Portfolio value, P&L, allocation breakdown |
compare_stocks |
tickers_json |
Side-by-side comparison of 2-10 stocks |
๐ก Example Queries
Ask your AI agent (once FinMCP is connected):
User: "What's the current state of the Indian market?"
Agent: *uses get_market_indices โ sees NIFTY 50 and SENSEX*
Agent: *uses get_stock_quote for RELIANCE.NS, TCS.NS, HDFCBANK.NS*
User: "How did my portfolio do today?"
Agent: *uses track_portfolio with your holdings*
User: "Find me good AI stocks to invest in"
Agent: *uses search_tickers to find AI companies*
Agent: *uses compare_stocks to compare them*
User: "Show me Microsoft's revenue trend"
Agent: *uses get_financials for MSFT income statement*
๐ Python API
Use FinMCP programmatically in your own agents:
from finmcp.server import server
# Run the MCP server
server.run(transport="stdio")
Or import individual tool functions:
from finmcp.server import get_stock_quote
import json
result = json.loads(get_stock_quote("AAPL"))
print(f"Apple: ${result['price']} ({result['change_percent']:+.2f}%)")
๐งช Development
# Clone and set up
git clone https://github.com/USERNAME/FinMCP.git
cd FinMCP
uv sync
# Run tests
uv run pytest tests/ -v
# Lint
uv run ruff check src/
# Type check
uv run mypy src/
๐ Roadmap
- [ ] Earnings transcripts โ AI-powered sentiment analysis of earnings calls
- [ ] Technical indicators โ SMA, RSI, MACD, Bollinger Bands
- [ ] Options data โ Option chains, Greeks, implied volatility
- [ ] Crypto prices โ Bitcoin, Ethereum, and major cryptocurrencies
- [ ] SEC filings โ Fetch 10-K, 10-Q, 8-K filings for any company
- [ ] Chart generation โ Generate price charts as SVG/PNG
- [ ] Alert system โ Price alerts and threshold notifications
- [ ] Web UI โ Dashboard with charts and portfolio overview
๐ค Contributing
PRs are welcome! Check the roadmap for ideas, or suggest your own.
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a PR
๐ License
MIT โ use it freely in personal and commercial projects.
โญ๏ธ Show Your Support
If FinMCP helps you, please give it a โญ๏ธ on GitHub โ it helps others discover it too!
Built with โค๏ธ by Jayesh
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.