MCP Integration Guide
The FinBrain MCP server allows AI assistants like Claude Desktop to access real-time financial data through the Model Context Protocol. This enables natural language queries about stock predictions, insider trading, sentiment analysis, and more.
What is MCP?
Section titled “What is MCP?”The Model Context Protocol (MCP) is a standard for connecting AI assistants to external data sources and tools. With FinBrain’s MCP integration, you can ask questions like:
- “What’s the AI prediction for Apple stock?”
- “Show me recent insider transactions for Tesla”
- “What’s the sentiment score for NVIDIA?”
- “Have any Congress members traded Microsoft recently?”
Installation
Section titled “Installation”Install the FinBrain MCP server:
pip install finbrain-mcpConfiguration
Section titled “Configuration”Claude Desktop
Section titled “Claude Desktop”Add FinBrain to your Claude Desktop configuration:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{ "mcpServers": { "finbrain": { "command": "python", "args": ["-m", "finbrain_mcp"], "env": { "FINBRAIN_API_KEY": "your_api_key_here" } } }}Edit %APPDATA%\Claude\claude_desktop_config.json:
{ "mcpServers": { "finbrain": { "command": "python", "args": ["-m", "finbrain_mcp"], "env": { "FINBRAIN_API_KEY": "your_api_key_here" } } }}Edit ~/.config/claude/claude_desktop_config.json:
{ "mcpServers": { "finbrain": { "command": "python", "args": ["-m", "finbrain_mcp"], "env": { "FINBRAIN_API_KEY": "your_api_key_here" } } }}After saving the configuration, restart Claude Desktop.
Available Tools
Section titled “Available Tools”The MCP server exposes the following tools to AI assistants:
get_ticker_predictions
Section titled “get_ticker_predictions”Get AI price predictions for a stock.
Parameters:
market: Market identifier (e.g., “S&P 500”)ticker: Stock symbol (e.g., “AAPL”)type: Prediction type (“daily” or “monthly”)
Example prompts:
- “What are the AI predictions for Apple?”
- “Get daily predictions for TSLA”
- “Show me monthly forecasts for Microsoft”
get_sentiment
Section titled “get_sentiment”Get news sentiment scores for a stock.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “What’s the sentiment for NVIDIA?”
- “How is news sentiment for Amazon?”
- “Check the sentiment score for Tesla”
get_insider_transactions
Section titled “get_insider_transactions”Get SEC Form 4 insider trading data.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “Show insider transactions for Apple”
- “Have executives been buying Tesla stock?”
- “What’s the recent insider activity for Microsoft?”
get_house_trades
Section titled “get_house_trades”Get US House Representatives trading activity.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “Have Congress members traded NVIDIA?”
- “Show me congressional trades for Apple”
- “What politicians have bought Tesla?”
get_analyst_ratings
Section titled “get_analyst_ratings”Get Wall Street analyst ratings and price targets.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “What do analysts think about Apple?”
- “Get analyst ratings for Tesla”
- “What’s the price target for NVIDIA?”
get_putcall_ratio
Section titled “get_putcall_ratio”Get options market put/call ratio data.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “What’s the put/call ratio for Apple?”
- “Show options sentiment for Tesla”
- “Get put/call data for SPY”
get_linkedin_data
Section titled “get_linkedin_data”Get LinkedIn employee and follower metrics.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “How many employees does Meta have?”
- “Show LinkedIn data for Amazon”
- “Is Microsoft hiring or laying off?”
get_app_ratings
Section titled “get_app_ratings”Get mobile app store ratings.
Parameters:
market: Market identifierticker: Stock symbol
Example prompts:
- “What’s Uber’s app rating?”
- “Show app ratings for DoorDash”
- “Compare iOS and Android ratings for Netflix”
Example Conversations
Section titled “Example Conversations”Stock Analysis
Section titled “Stock Analysis”User: “Analyze Apple stock for me”
Claude: I’ll gather comprehensive data on Apple (AAPL):
AI Predictions:
- Signal: Bullish
- Confidence: 78%
- 10-day predicted price: $188.50
Sentiment:
- Score: 0.72 (Positive)
Recent Insider Activity:
- Tim Cook sold 50,000 shares on Jan 10
- 2 option exercises in the past month
Analyst Consensus:
- Rating: Buy
- Average target: $205
- 35 analysts covering
Trading Signals
Section titled “Trading Signals”User: “What stocks have bullish AI predictions and positive insider buying?”
Claude: Let me check the predictions and insider data…
Based on FinBrain data, here are stocks with both bullish AI signals and recent insider purchases:
- NVDA: Bullish (82% confidence), 3 insider purchases this month
- MSFT: Bullish (75% confidence), 2 insider purchases this month
Congressional Trading
Section titled “Congressional Trading”User: “What are Congress members trading this month?”
Claude: I’ll check recent congressional trades…
Recent notable trades:
- Nancy Pelosi: Purchased NVDA ($1-5M range) on Jan 8
- Michael McCaul: Purchased AAPL ($100-250K range) on Jan 5
Troubleshooting
Section titled “Troubleshooting”Server Not Starting
Section titled “Server Not Starting”- Verify Python is installed:
python --version - Check the package is installed:
pip show finbrain-mcp - Verify your API key is set correctly
API Key Issues
Section titled “API Key Issues”Make sure your API key is valid:
# Test API keycurl "https://api.finbrain.tech/v1/available/markets?token=YOUR_API_KEY"Checking Logs
Section titled “Checking Logs”Claude Desktop logs can help diagnose issues:
- macOS:
~/Library/Logs/Claude/mcp*.log - Windows:
%APPDATA%\Claude\logs\mcp*.log
Source Code
Section titled “Source Code”The MCP integration is open source: