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 分