A Model Context Protocol (MCP) server that exposes FinBrain datasets to AI clients (Claude Desktop, VS Code MCP extensions, etc.) via simple tools. Backed by the official finbrain-python SDK. - Package name: finbrain-mcp - CLI entrypoint: finbrain-mcp - Documentation: finbrain.tech/integrations/mcp Access FinBrain's machine learning price forecasts with daily (10-day) and monthly (12-month) horizo
Add this skill
npx mdskills install ahmetsbilgin/finbrain-mcpWell-documented MCP server providing comprehensive financial data tools with clear setup instructions
1# FinBrain MCP <!-- omit in toc -->23[](https://pypi.org/project/finbrain-mcp/)4[](https://github.com/ahmetsbilgin/finbrain-mcp/actions/workflows/ci.yml)5[](LICENSE)67> **Requires Python 3.10+**89A **Model Context Protocol (MCP)** server that exposes FinBrain datasets to AI clients (Claude Desktop, VS Code MCP extensions, etc.) via simple tools.10Backed by the official **`finbrain-python`** SDK.1112- Package name: **`finbrain-mcp`**1314- CLI entrypoint: **`finbrain-mcp`**1516- Documentation: **[finbrain.tech/integrations/mcp](https://finbrain.tech/integrations/mcp/)**1718----------1920## Features2122### AI-Powered Price Predictions2324Access FinBrain's machine learning price forecasts with daily (10-day) and monthly (12-month) horizons. Includes mean predictions with 95% confidence intervals.2526### News Sentiment Analysis2728Track aggregated sentiment scores derived from financial news coverage. Monitor how market sentiment shifts over time for any ticker.2930### Alternative Data3132- **LinkedIn Metrics** — Employee count and follower trends as company health indicators33- **App Store Ratings** — Mobile app performance data for consumer-facing companies34- **Options Flow** — Put/call ratios and volume to gauge market positioning3536### Institutional & Insider Activity3738- **US Congress Trades** — Stock transactions disclosed by House representatives and Senators39- **Insider Transactions** — SEC Form 4 filings showing executive buys and sells40- **Analyst Ratings** — Wall Street coverage and price target changes4142----------4344## What you get4546- ⚡️ **Local** MCP server (no proxying) using your **own FinBrain API key**4748- 🧰 Tools (JSON by default, CSV optional) with paging4950 - `health`5152 - `available_markets`, `available_tickers`5354 - `predictions_by_market`, `predictions_by_ticker`5556 - `news_sentiment_by_ticker`5758 - `app_ratings_by_ticker`5960 - `analyst_ratings_by_ticker`6162 - `house_trades_by_ticker`, `senate_trades_by_ticker`6364 - `insider_transactions_by_ticker`6566 - `linkedin_metrics_by_ticker`6768 - `options_put_call`6970- 🧹 Consistent, model-friendly shapes (we normalize raw API responses)7172- 🔑 Multiple ways to provide your API key: env var, file7374----------7576## Install7778### Option A — Standard install (pip)7980```bash81# macOS / Linux / Windows82pip install --upgrade finbrain-mcp83```8485### Option B — Dev install (editable)8687```bash88# from repo root89python -m venv .venv90source .venv/bin/activate # Windows: .\.venv\Scripts\activate91pip install -e ".[dev]"92```9394> Keep **pip** (prod) and your **venv** (dev) separate to avoid path mix-ups.9596### Option C — Docker9798```bash99# Build the image100docker build -t finbrain-mcp:latest .101102# Run with your API key103docker run --rm -e FINBRAIN_API_KEY="YOUR_KEY" finbrain-mcp:latest104```105106> See [DOCKER.md](DOCKER.md) for detailed Docker usage instructions.107108----------109110## Configure your FinBrain API key111112### A) In your MCP client config (recommended / most reliable)113114Put the key directly in the MCP server entry your client uses (Claude Desktop or a VS Code MCP extension). This guarantees the launched server sees it, even if system env vars aren’t picked up.115116#### Claude Desktop (pip install)117118```json119{120 "mcpServers": {121 "finbrain": {122 "command": "finbrain-mcp",123 "env": { "FINBRAIN_API_KEY": "YOUR_KEY" }124 }125 }126}127```128129### B) Environment variable130131This works too, but note you must restart the client after setting it so the new value is inherited.132133```bash134# macOS/Linux135export FINBRAIN_API_KEY="YOUR_KEY"136137# Windows (PowerShell, current session)138$env:FINBRAIN_API_KEY="YOUR_KEY"139140# Windows (persistent for new processes)141setx FINBRAIN_API_KEY "YOUR_KEY"142# then fully quit and reopen your MCP client (e.g., Claude Desktop)143```144145>**Tip:** If the env var route doesn’t seem to work (common on Windows if the client was already running), use the **config JSON `env`** method above—it’s more deterministic.146----------147148## Run the server149150> **Note:** You typically don’t need to run the server manually—your MCP client (Claude/VS Code) starts it automatically. Use the commands below only for manual checks or debugging.151152- If installed (pip):153154 `finbrain-mcp`155156- From a dev venv:157158 `python -m finbrain_mcp.server`159160Quick health check without an MCP client:161162```python163python - <<'PY'164import json165from finbrain_mcp.tools.health import health166print(json.dumps(health(), indent=2))167PY168```169170----------171172## Connect an AI client173174> **No manual start needed:** Claude Desktop and VS Code will **launch the MCP server for you** based on your config. You only need to run `finbrain-mcp` yourself for quick sanity checks or debugging.175176### Claude Desktop177178Edit your config:179180- Windows: `%APPDATA%\Claude\claude_desktop_config.json`181182- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`183184- Linux: `~/.config/Claude/claude_desktop_config.json`185186**Pip install (published package):**187188```json189{190 "mcpServers": {191 "finbrain": {192 "command": "finbrain-mcp",193 "env": { "FINBRAIN_API_KEY": "YOUR_KEY" }194 }195 }196}197198```199200**macOS tip (full path):**201202If `"command": "finbrain-mcp"` doesn’t work, find the absolute path and use that instead.203204```bash205which finbrain-mcp # macOS/Linux206# (Windows: where finbrain-mcp)207```208209**Claude config with full path (macOS example):**210211```json212{213 "mcpServers": {214 "finbrain": {215 "command": "/full/path/to/finbrain-mcp",216 "env": { "FINBRAIN_API_KEY": "YOUR_KEY" }217 }218 }219}220```221222**Dev venv (run the module explicitly):**223224```json225{226 "mcpServers": {227 "finbrain-dev": {228 "command": "C:\\Users\\you\\path\\to\\repo\\.venv\\Scripts\\python.exe",229 "args": ["-m", "finbrain_mcp.server"],230 "env": { "FINBRAIN_API_KEY": "YOUR_KEY" }231 }232 }233}234```235236**Docker:**237238```json239{240 "mcpServers": {241 "finbrain": {242 "command": "docker",243 "args": ["run", "-i", "--rm", "finbrain-mcp:latest"],244 "env": { "FINBRAIN_API_KEY": "YOUR_KEY" }245 }246 }247}248```249250> After editing, **quit & reopen Claude**.251252### VS Code (MCP)2532541. Open the Command Palette → **“MCP: Open User Configuration”**.255 This opens your `mcp.json` (user profile).2562. Add the server under the **`servers`** key:257258 ```json259 {260 "servers": {261 "finbrain": {262 "command": "finbrain-mcp",263 "env": { "FINBRAIN_API_KEY": "YOUR_KEY" }264 }265 }266 }267 ```2682693. In Copilot Chat, enable Agent Mode to use MCP tools.270271----------272273## What can you ask the agent?274275You don’t need to know tool names—just ask in plain English. Examples:276277- **Predictions**278 - “Get FinBrain’s **daily predictions** for **AMZN**.”279 - “Show **monthly predictions** (12-month horizon) for **AMZN**.”280281- **News sentiment**282 - “What’s the **news sentiment** for **AMZN** **from 2025-01-01 to 2025-03-31** (limit 50)?”283 - “Export **AMZN** news sentiment for **2025 YTD** **as CSV**.”284285- **App ratings**286 - “Fetch **app store ratings** for **AMZN** between **2025-01-01** and **2025-06-30**.”287288- **Analyst ratings**289 - “List **analyst ratings** for **AMZN** in **Q1 2025**.”290291- **Congressional trades**292 - "Show **recent House trades** involving **AMZN**."293 - "Show **recent Senate trades** involving **META**."294295- **Insider transactions**296 - “Recent **insider transactions** for **AMZN**?”297298- **LinkedIn metrics**299 - “Get **LinkedIn employee & follower counts** for **AMZN** (last 12 months).”300301- **Options (put/call)**302 - “What’s the **put/call ratio** for **AMZN** over the **last 60 days**?”303304- **Availability**305 - “Which **markets** are available?”306 - “List **tickers** in the **daily** predictions universe.”307308> **Notes**309>310> - Date format: `YYYY-MM-DD`.311> - Time-series endpoints return the **most recent N** points by default—say “limit 200” to get more.312> - Predictions horizon: **daily** (10-day) or **monthly** (12-month).313> - Say “**as CSV**” to receive CSV instead of JSON.314315----------316317## Development318319```bash320# setup321python -m venv .venv322source .venv/bin/activate # Windows: .\.venv\Scripts\activate323pip install -e ".[dev]" # run tests pytest -q324```325326### Project structure (high level)327328```text329finbrain-mcp330├─ README.md331├─ pyproject.toml332├─ LICENSE333├─ .github/334├─ examples/335├─ src/336│ └─ finbrain_mcp/337│ ├─ __init__.py338│ ├─ server.py # MCP server entrypoint339│ ├─ registry.py # FastMCP instance340│ ├─ client_adapter.py # wraps finbrain-python; calls normalizers341│ ├─ auth.py # resolves API key (env var)342│ ├─ settings.py # tweakable defaults (e.g., series limits)343│ ├─ utils.py # helpers (latest_slice, CSV, DF->records)344│ ├─ normalizers/ # endpoint-specific shapers345│ └─ tools/ # MCP tool functions (registered & testable)346└─ tests/ # pytest suite with a fake SDK347```348349----------350351## Troubleshooting352353- **`ENOENT`** (can’t start server)354355 - Wrong path in client config. Use the venv’s **exact** path:356357 - `…\.venv\Scripts\python.exe` + `["-m","finbrain_mcp.server"]`, or358359 - `…\.venv\Scripts\finbrain-mcp.exe`360361- **`FinBrain API key not configured`**362363 - Put `FINBRAIN_API_KEY` in the client’s `env` block **or**364365 - `setx FINBRAIN_API_KEY "YOUR_KEY"` and fully restart the client.366367- **Mixing dev & prod installs**368369 - Keep **pip** (prod) and **venv** (dev) separate.370371 - In configs, point to one or the other—not both.372373----------374375## License376377MIT (see `LICENSE`).378379----------380381## Acknowledgements382383- Built on Model Context Protocol and **FastMCP**.384385- Uses the official **`finbrain-python`** SDK.386387----------388389© 2026 FinBrain Technologies — Built with ❤️ for the quant community.390
Full transparency — inspect the skill content before installing.