MCP server for AI-powered stock analysis and paper trading
Project description
financial-mcp
MCP server for AI-powered stock analysis and paper trading. Exposes 14 tools over SSE for any MCP-compatible AI agent.
No API keys required. All market data comes from yfinance (free). Portfolio state is stored locally in SQLite.
Install
pip install financial-mcp
Quick Start
financial-mcp
Server starts on http://0.0.0.0:8520/sse.
Claude Desktop / Claude Code
Add to your MCP config:
{
"mcpServers": {
"financial-mcp": {
"command": "uvx",
"args": ["financial-mcp"]
}
}
}
Tools
Orchestration (4)
| Tool | Description |
|---|---|
analyze_ticker |
Full analysis: fundamentals + momentum + composite score |
analyze_portfolio |
Portfolio summary with holdings, allocations, performance, risk |
run_rebalance |
Score universe, generate buy/sell signals, execute trades |
scan_universe |
Score a list of tickers and rank by composite score |
Primitives (10)
| Tool | Description |
|---|---|
create_portfolio |
Create a new paper trading portfolio |
get_fundamentals |
PE, EV/EBITDA, P/B, dividend yield, market cap, sector |
get_momentum |
30d/90d momentum, volatility, relative strength, drawdown |
get_price |
Current price for a ticker |
score_ticker |
Composite score (0-100) with component breakdown |
get_holdings |
Current portfolio holdings |
get_trades |
Trade history with optional status filter |
execute_buy |
Buy shares via paper broker |
execute_sell |
Sell shares via paper broker |
check_risk |
Stress score, scenario drawdowns, sector/geo allocation |
Scoring Formula
3-signal composite (optional 4th with sentiment):
- Valuation (40%): PE, EV/EBITDA, P/B, dividend yield relative to sector medians
- Momentum (35%): 30d/90d price momentum, relative strength vs SPY, volatility
- Risk penalty (25%): Sector concentration, geographic concentration, max drawdown
Scores range 0-100. Buy threshold: 65. Sell threshold: 35.
Configuration
Default config is built-in. Override by placing a config.yaml in your working directory:
server:
host: "0.0.0.0"
port: 8520
scoring:
weights:
valuation: 0.40
momentum: 0.35
risk: 0.25
buy_threshold: 65
sell_threshold: 35
position_limits:
moderate:
max_position: 0.08
max_sector: 0.30
min_cash: 0.10
Example Usage
Once connected, an AI agent can:
> Create a $100K moderate portfolio
> Scan AAPL, MSFT, GOOGL, NVDA, META, AMZN, JPM, V
> Buy the top 3 scored tickers
> Check portfolio risk
> Run a full rebalance
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file financial_mcp_server-0.1.1.tar.gz.
File metadata
- Download URL: financial_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2da87ca9a802d02d374a60d216f3478e2719e226dce8307ca02744deb58e5f17
|
|
| MD5 |
9aa615abb84d24c7334ed01b8fee492a
|
|
| BLAKE2b-256 |
fd11ca8dfc2809c6046f17feca9953ce37e13839fe02306abcb1d8ddcc68df70
|
Provenance
The following attestation bundles were made for financial_mcp_server-0.1.1.tar.gz:
Publisher:
publish.yml on arnavbhatia1/FinancialMCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
financial_mcp_server-0.1.1.tar.gz -
Subject digest:
2da87ca9a802d02d374a60d216f3478e2719e226dce8307ca02744deb58e5f17 - Sigstore transparency entry: 1087736902
- Sigstore integration time:
-
Permalink:
arnavbhatia1/FinancialMCP@d55354018a667c6496ae13ad8020d6e0707b8e1d -
Branch / Tag:
refs/heads/master - Owner: https://github.com/arnavbhatia1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d55354018a667c6496ae13ad8020d6e0707b8e1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file financial_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: financial_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff45b2f237c53fcbd1b4378bdea5bfb18d504f7ff99539971907ca3e0392d1e6
|
|
| MD5 |
4c487ebb171577d062825faf374eb98c
|
|
| BLAKE2b-256 |
a6e8e403f78a610c6ed694ecb97e9c8b8a74025bd1cc56291d2ce3385f094676
|
Provenance
The following attestation bundles were made for financial_mcp_server-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on arnavbhatia1/FinancialMCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
financial_mcp_server-0.1.1-py3-none-any.whl -
Subject digest:
ff45b2f237c53fcbd1b4378bdea5bfb18d504f7ff99539971907ca3e0392d1e6 - Sigstore transparency entry: 1087736974
- Sigstore integration time:
-
Permalink:
arnavbhatia1/FinancialMCP@d55354018a667c6496ae13ad8020d6e0707b8e1d -
Branch / Tag:
refs/heads/master - Owner: https://github.com/arnavbhatia1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d55354018a667c6496ae13ad8020d6e0707b8e1d -
Trigger Event:
push
-
Statement type: