# stock-analysis-plugin [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/Weaxs/stock-analysis-plugin  
**GitHub Stars:** 106  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/stock-analysis-plugin

## Description
Stock research toolkit for AI agents — 73 tools + 21 skills for analysis, screening & backtesting across A/HK/US/JP/KR/TW markets. Works with Pi Agent, Hermes, OpenClaw, DeepSeek Harness (dsh) and any MCP client.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "stock-analysis-plugin": {
    "command": "uvx",
    "args": ["stock-analysis-plugin"]
  }
}
```

## Documentation

## What stock-analysis-plugin does

stock-analysis-plugin is a finance and fintech research toolkit for AI agents. It covers A shares, Hong Kong, US, Japanese, Korean, and Taiwanese securities, with symbol formats such as `600519`, `00700.HK`, `AAPL`, `7203.T`, `005930.KS`, and `2330.TW`.

The package combines 74 tools with 21 Skills. Tools retrieve market and company data, run calculations, search for information, build research context, and perform risk or valuation analysis. Skills package recurring workflows such as comprehensive stock analysis, market screening, strategy backtesting, market review, trend following, Chan theory, Elliott Wave analysis, event-driven research, and sector rotation.

## How it works

Market data providers are tried in priority order and the server moves to another source when a provider fails. Sources without configured credentials are skipped. The failover paths differ by market: A-share quotes can use Tencent, akshare, Tushare, efinance, or Sina, while overseas markets primarily use yfinance and can fall back to configured providers such as Finnhub, Longbridge, or Alpha Vantage.

The server can return current snapshots or the latest available close outside trading hours, with freshness information. K-line data supports daily, weekly, and monthly intervals. Research workflows can combine technical, fundamental, capital-flow, news, and sentiment information into structured reports. Portfolio calculations use data supplied for the request and are not described as account storage.

## Setup and configuration

Python 3.10 or newer is required. Install the Python package with:

```bash
pip install stock-analysis-plugin
```

For MCP clients, run `stock-analysis-mcp`, or start the source implementation with `.venv/bin/python mcp_host/server.py` or `python -m mcp_host`. Claude Desktop, Cursor, and WorkBuddy are listed as MCP hosts. Pi Agent, Hermes Agent, OpenClaw, and DeepSeek Harness have separate installation paths and integrations.

No environment variables are required for the basic installation. Optional variables add providers or enable additional data categories. These include `TUSHARE_TOKEN`, Longbridge credentials, `ALPHAVANTAGE_API_KEY`, `FINNHUB_API_KEY`, `XUEQIU_TOKEN`, `LIXINGER_TOKEN`, and `SEC_USER_AGENT`. Search can use Tavily, Brave, SerpAPI, Bocha, or SearXNG; sentiment uses a configurable API URL and key.

## Tools and capabilities

The tool groups cover:

- Quotes, OHLCV data, fund NAVs, dividends, ETFs, financials, shareholder data, announcements, valuation history, and earnings calendars.
- Technical indicators, candlestick patterns, volume and price analysis, signal evaluation, trend analysis, and sector rotation research.
- Multi-factor stock screening, risk screening, strategy backtesting, market-state analysis, daily review, and batch watchlist analysis.
- News search, combined intelligence gathering, social sentiment, and article extraction.
- Portfolio concentration, stress testing, position sizing, rebalancing plans, DCF valuation, event studies, and backtest robustness checks.
- SEC institutional holdings, Form 4 insider transactions, and related issuer or CIK lookups when SEC access is configured.

The dsh integration also provides a dashboard with watchlist quotes, six-market index strips, A-share breadth, sector leaders and laggards, and shared watchlist access through `get_watchlist`.

## Limitations and notes

Provider coverage and freshness vary by market and data source. Some features require optional credentials or corresponding provider permissions. SEC filings require `SEC_USER_AGENT`; sentiment and search require their respective services. Earnings dates from yfinance for US and Japanese securities are provider estimates rather than official confirmations.

The strategy-backtesting workflow accepts YAML strategy definitions and can perform up to three rounds of parameter optimization. The sector ETF rotation Skill includes cross-market grouping and weighting research, while its complete deep model is not implemented. Outside trading hours, quote results may represent the latest close rather than a live price, with freshness fields indicating that state.

_Full upstream README: https://allmcps.com/mcp/stock-analysis-plugin/readme_

