Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

financial_mcp_server-0.1.1.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

financial_mcp_server-0.1.1-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

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

Hashes for financial_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2da87ca9a802d02d374a60d216f3478e2719e226dce8307ca02744deb58e5f17
MD5 9aa615abb84d24c7334ed01b8fee492a
BLAKE2b-256 fd11ca8dfc2809c6046f17feca9953ce37e13839fe02306abcb1d8ddcc68df70

See more details on using hashes here.

Provenance

The following attestation bundles were made for financial_mcp_server-0.1.1.tar.gz:

Publisher: publish.yml on arnavbhatia1/FinancialMCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file financial_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for financial_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff45b2f237c53fcbd1b4378bdea5bfb18d504f7ff99539971907ca3e0392d1e6
MD5 4c487ebb171577d062825faf374eb98c
BLAKE2b-256 a6e8e403f78a610c6ed694ecb97e9c8b8a74025bd1cc56291d2ce3385f094676

See more details on using hashes here.

Provenance

The following attestation bundles were made for financial_mcp_server-0.1.1-py3-none-any.whl:

Publisher: publish.yml on arnavbhatia1/FinancialMCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page