Pattern Vista

io.github.xsf0221由 GitHub 帳號 xsf0221 發布v0.2.1更新於 Oct 24, 2026

End-of-day US equity data: MA200 deviation rankings, market breadth, chart-pattern win rates.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

Pattern Vista 為助理提供美股收盤資料:MA200 偏離度排名、市場寬度與K線形態歷史勝率,透過本機 stdio 伺服器執行。

可以做什麼
依個股相對自身 200 日均線的偏離程度排序,並取得單一代號的完整報告,含近期形態與偏離資料。查看市場寬度,即涵蓋範圍內收盤價高於自身 MA200 的比例,並與其歷史比較。查看最新推薦的K線形態,以及該形態類別歷史上是否跑贏 SPY。查詢 API 金鑰所屬帳戶及是否為付費層級。
適用情境
適合讓助理在對話中直接回答美股偏離度、均值回歸候選、市場寬度或形態歷史表現等問題。著重收盤後的研究,而非盤中交易。
執行需求
以本機 stdio 程序執行,可從 PyPI 安裝 pattern-vista(含 mcp 附加項)或以 uvx 啟動,也可用 Docker 但需保持 stdin 連線。需要 Pattern Vista API 金鑰,透過 PATTERN_VISTA_API_KEY 環境變數或 CLI 儲存的金鑰提供。需要連線至 Pattern Vista 服務的網路存取。
安裝前請注意
需要 API 金鑰並以環境變數傳入,請勿放入共用設定。免費金鑰每個清單只回傳前 2 列且不含歷史勝率,清單過短可能來自層級而非市場清淡,應檢查回應中的 is_billed。付費層級可解鎖完整清單。資料為收盤資料,README 聲明不構成投資建議。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pattern Vista,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Pattern Vista CLI

Command-line access to Pattern Vista — K-line pattern historical win-rates and MA200 deviation rankings — built to be called by AI agents as easily as by humans.

Output is JSON by default (so an agent can parse it directly); add --table for a human-readable view.

Install

bash
pip install pattern-vista     # or: uvx pattern-vista whoami

Authenticate

Generate a key at https://www.pattern-vista.com (Account → API keys), then:

bash
pv config set-key pv_live_xxxxxxxx# or, for ephemeral/agent use:export PATTERN_VISTA_API_KEY=pv_live_xxxxxxxx

Resolution order: --api-key flag → PATTERN_VISTA_API_KEY → stored config.

Commands

bash
pv whoami                       # validate key, show account + tierpv deviation --over --limit 20  # stocks furthest ABOVE their 200-day averagepv deviation --under            # stocks furthest BELOW (mean-reversion longs)pv patterns --limit 20          # latest recommended patterns + 20-day win-ratepv ticker AAPL                  # one symbol: current deviation + recent patternspv stretch --days 120           # market breadth: % of the universe above its MA200
# add --table to any command for human output:pv deviation --under --table

Example (agent-friendly JSON)

bash
$ pv deviation --under --limit 3{  "is_billed": true,  "rows": [    {"ticker": "XYZ", "snapshot_date": "2026-05-27", "close": 41.2, "ma200": 58.9, "deviation": -0.3005},    ...  ]}

Free vs. paid

A free account sees the top 2 rows of each list and patterns without the historical win-rate. A paid subscription unlocks the full lists (up to 100) and hist_win_w20. The tier is enforced server-side from the key — see is_billed in every response.

For agents / programmatic use

python
from pattern_vista import PatternVistaClient
pv = PatternVistaClient(api_key="pv_live_xxxx")under = pv.deviation("under", limit=20)   # dict: {"is_billed": ..., "rows": [...]}aapl = pv.ticker("AAPL")

The PatternVistaClient core has no CLI dependency — it is what backs the MCP server below, so the two can never return different things.

Use as an MCP server

The same data as tools your agent can call directly. No install needed if you have uv:

jsonc
{  "mcpServers": {    "pattern-vista": {      "command": "uvx",      "args": ["--from", "pattern-vista[mcp]", "pattern-vista-mcp"],      "env": { "PATTERN_VISTA_API_KEY": "pv_live_xxxxxxxx" }    }  }}

Drop that into your MCP client's config (Claude Desktop, Claude Code, Cursor, or anything else that speaks MCP over stdio). If you would rather install it:

bash
pip install 'pattern-vista[mcp]'   # then use "command": "pattern-vista-mcp"

Or run it in a container. -i is required — the transport is stdio, so without an attached stdin the server has nothing to read and exits straight away:

bash
docker build -t pattern-vista-mcp .docker run -i --rm -e PATTERN_VISTA_API_KEY=pv_live_xxxxxxxx pattern-vista-mcp

Tools

ToolAnswers
market_stretchIs the market broadly extended or depressed right now, and how does that rank against its own history?
deviation_rankingWhich symbols are furthest below (or above) their own 200-day average?
recommended_patternsWhat did last night's scan flag, and has that pattern bucket historically beaten SPY?
ticker_reportEverything held on one symbol.
account_statusWhich account is this key, and is it on a paid tier?

Auth resolves exactly as the CLI's does: PATTERN_VISTA_API_KEY, else the key saved by pv config set-key. Tiering stays server-side — a free key gets 2 rows and a null hist_win_w20, so check is_billed in the response before treating a short list as a quiet market.

Works with both generations of the MCP Python SDK (mcp 1.x's FastMCP and 2.x's MCPServer).

Data notes

  • Deviation = (close − MA200) / MA200, refreshed nightly over an S&P 500 + Nasdaq 100 + major-ETF universe. Split-distorted and implausible values are filtered out before ranking.
  • Market breadth (pv stretch, market_stretch) is the share of that same universe closing above its own MA200, one reading per trading day, with the history behind it. Free for every tier — it is the same number the public page at https://www.pattern-vista.com/market/stretch publishes.
  • Win-rate (hist_win_w20) is the share of settled past signals of the same pattern type, direction and shape that beat SPY over the following 20 trading days — the same per-signal record listed at https://www.pattern-vista.com/track-record. Null when fewer than 10 have settled.
  • Past performance does not guarantee future results. Not investment advice.

License

MIT

來源:README.md,提交 f6a984d

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分