Provides end-of-day US equity data including MA200 deviation rankings, market breadth, and historical chart-pattern win rates for AI agents.
Also known as xsf0221/pattern-vista-cli, pattern-vista-cli
- Stars
- 0
- Tools
- 5
- Downloads, 30 days
- 240
- Latest version
- 0.2.1
- Last commit
- Nov 5, 2026
- License
- MIT
What is Pattern Vista MCP?
Pattern Vista provides end-of-day US equity data including MA200 deviation rankings, market breadth, and historical chart-pattern win rates for AI agents. It exposes 5 tools, such as market_stretch, deviation_ranking, recommended_patterns.
Summary generated from the project's README
About Pattern Vista MCP server
Analyzing US equity market breadth and technical deviations is what pattern-vista enables for AI agents. By connecting this MCP server to clients like Claude Desktop or Cursor, developers allow their agents to access nightly refreshed data regarding the S&P 500, Nasdaq 100, and major ETFs. The server provides specific metrics such as how far a stock has moved from its 200-day moving average and the historical success rates of various K-line chart patterns.
Users set up the server via uvx or pip and must provide a Pattern Vista API key through an environment variable or configuration file. The server operates over stdio and can be run locally or within a container. While free accounts can access basic market breadth and limited rankings, a paid subscription is required to view full lists of up to 100 symbols and access the hist_win_w20 metric, which tracks how patterns performed against SPY over 20 trading days.
What you can do with it
- 1Assess overall market healthDetermine if the broader market is currently extended or depressed relative to its history.
Written from the project's README. Every use case is checked against a quote from it.
How to install Pattern Vista MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Pattern Vista MCP in Claude Code
$ claude mcp add pattern-vista-cli -- uvx pattern-vistaInstall Pattern Vista MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"pattern-vista-cli": {
"command": "uvx",
"args": [
"pattern-vista"
]
}
}
}Install Pattern Vista MCP in VS Code
.vscode/mcp.json
{
"servers": {
"pattern-vista-cli": {
"type": "stdio",
"command": "uvx",
"args": [
"pattern-vista"
]
}
}
}Install Pattern Vista MCP in VS Code CLI
$ code --add-mcp '{"name":"pattern-vista-cli","type":"stdio","command":"uvx","args":["pattern-vista"]}'Install Pattern Vista MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"pattern-vista-cli": {
"command": "uvx",
"args": [
"pattern-vista"
]
}
}
}Install Pattern Vista MCP in Codex
$ codex mcp add pattern-vista-cli -- uvx pattern-vistaInstall Pattern Vista MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.pattern-vista-cli] command = "uvx" args = ["pattern-vista"]
Install Pattern Vista MCP in Gemini CLI
$ gemini mcp add -s user pattern-vista-cli uvx -- pattern-vistaInstall Pattern Vista MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"pattern-vista-cli": {
"command": "uvx",
"args": [
"pattern-vista"
]
}
}
}Pattern Vista MCP tools 5
Detected from the READMEmarket_stretchdeviation_rankingrecommended_patternsticker_reportaccount_status
| market_stretch | — | |
| deviation_ranking | — | |
| recommended_patterns | — | |
| ticker_report | — | |
| account_status | — |
Configuration
PATTERN_VISTA_API_KEY
| Name | Description | |
|---|---|---|
| PATTERN_VISTA_API_KEY | — |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablexsf0221/pattern-vista-cli is public and reachablegithub.com/xsf0221/pattern-vista-cli ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-05github.com/xsf0221/pattern-vista-cli ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from pattern-vistaPass
- No critical advisory in the package or its dependencies7 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model5 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubPattern 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
pip install pattern-vista # or: uvx pattern-vista whoami
Authenticate
Generate a key at https://www.pattern-vista.com (Account → API keys), then:
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
pv whoami # validate key, show account + tier
pv deviation --over --limit 20 # stocks furthest ABOVE their 200-day average
pv deviation --under # stocks furthest BELOW (mean-reversion longs)
pv patterns --limit 20 # latest recommended patterns + 20-day win-rate
pv ticker AAPL # one symbol: current deviation + recent patterns
pv 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)
$ 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
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:
{
"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:
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:
docker build -t pattern-vista-mcp .
docker run -i --rm -e PATTERN_VISTA_API_KEY=pv_live_xxxxxxxx pattern-vista-mcp
Tools
| Tool | Answers |
|---|---|
market_stretch |
Is the market broadly extended or depressed right now, and how does that rank against its own history? |
deviation_ranking |
Which symbols are furthest below (or above) their own 200-day average? |
recommended_patterns |
What did last night's scan flag, and has that pattern bucket historically beaten SPY? |
ticker_report |
Everything held on one symbol. |
account_status |
Which 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
Pattern Vista MCP questions
How do I add Pattern Vista MCP to Claude Code?
Run claude mcp add pattern-vista-cli -- uvx pattern-vista in your terminal. Add --scope user to make it available in every project.
How do I add Pattern Vista MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Pattern Vista MCP provide?
It exposes 5 tools, including market_stretch, deviation_ranking, recommended_patterns, ticker_report, account_status.
What is the difference between free and paid accounts?
Free accounts are limited to the top 2 rows of each list and do not include historical win rates for patterns. Paid subscriptions unlock full lists up to 100 rows and historical win-rate data.