patternfetch

io.github.MarvinRey7879由 GitHub 账号 MarvinRey7879 发布v0.3.0更新于 Oct 24, 2026

US stocks, ETFs, crypto → compact brief: patterns, S/R, regime + base rates vs baseline. Not advice.

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

远程 MCP 服务器,为助手提供美股、ETF 与加密货币的精简技术面行情简报,并附回测的形态基准率。

可以做什么
  • 获取单个标的与周期的精简市场状态简报:K 线、带基准率与提升度的形态、支撑阻力、市场状态、RSI/EMA
  • 一次比较多個周期,判断趋势是相互印证还是背离
  • 仅返回自上次简报以来发生变化的内容(趋势翻转、新形态、RSI 状态变化)
  • 查找历史上形态相似的窗口,并给出其后走势的完整分布
  • 按市场状态、形态或最低基准率筛选大盘股、ETF 与主流加密交易对
  • 读取服务器自身的能力矩阵:覆盖范围、周期、接口、限额与价格
适用场景
适合需要在不把原始 OHLCV 灌入上下文的情况下了解某个股票、ETF 或加密交易对当前技术面时;也适合反复轮询同一市场,或先筛选候选标的再逐一分析。
运行要求
远程 Streamable HTTP 端点,无需本地运行时(另有可选的本地 stdio 桥接包)。发现工具免费;调用工具需通过一键 OAuth 或 Bearer API 密钥认证,也可使用无需密钥的演示端点。赠送额度用完后按次从余额扣费。
安装前请注意
工具调用按次从预付余额扣费,充值可用银行卡或加密货币,反复轮询会产生费用。调用需要 API 密钥,须妥善保管。输出为 impersonal 行情数据与算法信号,不构成投资建议;基准率不含止损、手续费与滑点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 patternfetch,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.MarvinRey7879%2Fpatternfetch/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "patternfetch": {
      "type": "http",
      "url": "https://patternfetch.com/mcp"
    }
  }
}

README

patternfetch

patternfetch is a market-data API for AI agents covering US stocks, ETFs and crypto spot. One call with a ticker and a timeframe returns a token-compact market-state report: compact candles, detected chart and candlestick patterns, support and resistance levels, market regime, and interpreted indicators (RSI, EMA). Every detected pattern carries its backtested historical hit rate and its lift against the pattern-free baseline of the same market, so an agent can tell a pattern that carries information from one that does not. Six tools — brief, multi, delta, analogs, scan, capabilities — reachable over REST and MCP, with one-click OAuth, credit billing via Stripe or x402 USDC on Base, a keyless demo endpoint, and $3 starter credit on signup. Impersonal market data, not investment advice.

[npm] [patternfetch MCP server] [license]

Why it's smaller: for BTC/USDT 4h (120 candles), a raw OHLCV dump is ~3,260 tokens of just numbers the model still has to analyze; patternfetch's interpreted analysis is ~1,323 tokens, already decided. Reproduce it (no account needed).

  • Coverage: US stocks and ETFs (split- and dividend-adjusted, delayed/EOD, via Yahoo), crypto spot (realtime, via Binance).
  • Timeframes: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w.
  • Access: REST at patternfetch.com/v1/*, MCP at patternfetch.com/mcp (Streamable HTTP), plus a local stdio bridge (patternfetch-mcp).

Why base rates and lift

A detector that only reports double_top, confidence 0.92 tells an agent nothing about whether that pattern has ever meant anything. patternfetch attaches an evidence block to each detected pattern:

json
{  "name": "double_top",  "confidence": 0.92,  "evidence": {    "scope": "US stocks & ETFs",    "tf": "1d",    "band": "0.75-1.00",    "horizon": 10,    "n": 7508,    "hitRate": 0.431,    "ci95": 0.011,    "lift": {      "baseline": 0.419979,      "baselineN": 46038,      "lift": 0.011021,      "ci95": 0.012075,      "informative": false,      "reading": "indistinguishable-from-baseline"    }  }}

hitRate is the realizable gross directional base rate: the fraction of non-overlapping historical occurrences of that pattern, in that timeframe and confidence band, whose close-to-close return over the next horizon bars went the expected direction. The forward window starts at detection, so there is no lookahead. No stops, fees or slippage are modelled.

lift compares that hit rate against the baseline of the same market with no pattern present. Many patterns come back indistinguishable-from-baseline — that is the honest result, and reporting it is the point. An agent can filter on informative instead of trusting a geometric confidence score.

Calibration. Across 105 audited categories, 3 fall outside their confidence interval — fewer than the ~5.3 that chance alone predicts across 105 comparisons. For US stocks it is 0 of 60. Method and full tables: patternfetch.com/pattern-base-rates-study. The measurement is reproducible with the open-source honest-signals tool.

Quickstart

No key required — the demo endpoint is public:

bash
curl -X POST https://patternfetch.com/v1/demo \  -H 'content-type: application/json' \  -d '{"ticker":"AAPL","timeframe":"1d"}'

With a key (self-serve, $3 starter credit):

bash
curl -X POST https://patternfetch.com/v1/keys -d '{"email":"[email protected]"}'
curl -X POST https://patternfetch.com/v1/brief \  -H 'authorization: Bearer pf_...' \  -H 'content-type: application/json' \  -d '{"ticker":"BTC/USDT","timeframe":"4h"}'

JavaScript client:

bash
npm install patternfetch
js
import { Patternfetch } from 'patternfetch';
const { key } = await new Patternfetch().createKey('[email protected]');const pf = new Patternfetch({ apiKey: key });
const brief = await pf.brief({ ticker: 'AAPL', timeframe: '1d' });
console.log(brief.analysis.nl);// "AAPL: uptrend (strong), +0.14% last 1d, RSI 71.66 (overbought),//  bearish_engulfing (conf 1, hist 41% over 10b, lift -0.7pp vs 42% base (within noise))."
for (const p of brief.analysis.patterns) {  if (p.evidence?.lift.informative) console.log(p.name, p.evidence.hitRate, p.evidence.lift.lift);}

Tools

Six tools, the same set over MCP (patternfetch_*) and REST (POST /v1/*).

ToolWhat it returnsWhen an agent calls it
briefMarket-state report for one ticker + timeframe: compact candles, patterns with base rate and lift, support/resistance, regime, RSI/EMA, one-line summary.The default. It needs the current technical picture of one market without dumping raw OHLCV into context.
multiOne brief per timeframe (default 1h, 4h, 1d) plus a cross-timeframe alignment read that spells out agreement or divergence, e.g. 1h up / 4h up / 1d down.It wants to know whether a setup is confirmed or contradicted across horizons, without three separate brief calls.
deltaOnly what changed since the last brief for that ticker + timeframe — trend flips, new patterns, RSI-state changes. Returns changed: false when nothing material moved.It polls the same market repeatedly. Call brief once, then delta on every later poll to keep token cost near zero.
analogsHistorical windows whose shape resembles current price action, with the full distribution of what followed: win rate, median, mean, min, max and n over a fixed forward horizon.It wants the historical outcome spread for a setup rather than a point estimate. Not a prediction, not a strategy backtest.
scanScreener over a curated universe of liquid US large-caps, core and sector ETFs and major crypto pairs. Filter by asset class, regime, pattern and minimum base rate; rows return ranked by base rate with 95% CI. Precomputed daily.It needs to find candidates across the market rather than analyse a ticker it already named. Feed the shortlist into brief.
capabilitiesSupported assets, timeframes, endpoints, limits and pricing. No input.First, before relying on any assumption about coverage.

Client methods

MethodEndpoint
brief({ticker, timeframe, limit?, fields?, market?})POST /v1/brief
multi({ticker, timeframes?, limit?, market?})POST /v1/multi
delta({ticker, timeframe, limit?})POST /v1/delta
analogs({ticker, timeframe, window?, horizon?})POST /v1/analogs
scan({assetClass?, regime?, pattern?, tf?, minBaseRate?, limit?})POST /v1/scan
candles({ticker, timeframe})POST /v1/candles
platforms()GET /v1/platforms
createKey(email)POST /v1/keys

MCP

patternfetch is a remote MCP server (Streamable HTTP) at https://patternfetch.com/mcp. Tools: patternfetch_brief, patternfetch_multi, patternfetch_delta, patternfetch_analogs, patternfetch_scan, patternfetch_capabilities. Discovery (initialize, tools/list) is free — no key. Only tools/call needs auth.

One-click OAuth (nothing to paste) — in Claude Code, Claude Desktop, Cursor or Smithery, add the URL and authorize once; a free-tier key is minted for you:

bash
claude mcp add --transport http patternfetch https://patternfetch.com/mcp

In claude.ai: Customize → Connectors → Add custom connector → https://patternfetch.com/mcp → Authorize.

Or with a Bearer key — add to your MCP config:

json
{  "mcpServers": {    "patternfetch": {      "url": "https://patternfetch.com/mcp",      "headers": { "Authorization": "Bearer pf_..." }    }  }}

Get a free key (small starter credit) at https://patternfetch.com/v1/keys.

Local stdio bridge

Prefer a local stdio server (Claude Desktop, sandboxes, no inbound HTTP)? This package ships patternfetch-mcp, a zero-dependency stdio↔HTTP bridge that exposes the same tools and forwards calls to patternfetch.com:

json
{  "mcpServers": {    "patternfetch": {      "command": "npx",      "args": ["-y", "patternfetch-mcp"],      "env": { "PATTERNFETCH_API_KEY": "pf_..." }    }  }}

tools/list works with no key and falls back to the embedded snapshot (mcp-tools.json) when the remote is unreachable, so introspection always succeeds. Tool calls use PATTERNFETCH_API_KEY, OAuth or x402. Override the endpoint with PATTERNFETCH_MCP_URL.

Refresh the snapshot from the live server:

bash
curl -s -X POST https://patternfetch.com/mcp \  -H 'content-type: application/json' \  -H 'accept: application/json, text/event-stream' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Pricing

$3 starter credit on signup, at least $0.50 of it usable immediately without a card. After that, pay per call from credit, topped up via Stripe or x402 USDC on Base. Studio plan: $19/month including $25 of usage.

CallPrice
/v1/brief$0.010
/v1/multi$0.025
/v1/delta$0.008 ($0.001 when nothing changed)
/v1/candles$0.005
/v1/analogs$0.050
/v1/scan$0.020

Live figures: GET /v1/platforms.

Legal

patternfetch provides impersonal market data and algorithmic signals for informational purposes only. NOT investment, financial, legal or tax advice, and not a recommendation to buy, sell or hold any security or crypto-asset. Outputs are not personalized to you. Base rates are gross directional frequencies without stops, fees or slippage; past performance and historical analogs do not guarantee future results. Markets are volatile — you may lose all capital. Do your own research. See patternfetch.com/disclaimer, /methodology and /terms.

来源:README.md,提交 15116eb

工具

6

patternfetch_brief

Market-State Brief

Get a token-compact market-state brief for a stock, ETF, or crypto ticker + timeframe. Returns compact candles, detected chart/candlestick patterns with geometric confidence AND a backtested historical base rate (how often that pattern+timeframe+confidence-band actually resolved its way), support/resistance levels, trend/regime, and interpreted indicators (RSI/EMA state) plus a one-line summary. Covers US stocks/ETFs (split & dividend adjusted, delayed/EOD) and crypto spot (realtime). WHEN: an agent needs the current technical picture of a market without dumping raw OHLCV into context (saves tokens, avoids numeric hallucination). WHEN NOT: you need order execution or portfolio advice. Examples: {"ticker":"AAPL","timeframe":"1d"}, {"ticker":"BTC/USDT","timeframe":"4h"}. Output is impersonal market data, NOT investment advice.

输入参数limitmarketticker必填timeframe必填

patternfetch_multi

Multi-Timeframe Brief

Get a multi-timeframe market-state view for one stock, ETF, or crypto ticker in a single call: a token-compact brief for each requested timeframe (default 1h, 4h, 1d) PLUS a cross-timeframe alignment read — whether the trends across timeframes agree or diverge, with the split spelled out (e.g. "1h up / 4h up / 1d down"). WHEN: an agent wants to know if a setup is confirmed across horizons or conflicting between them, without making 3 separate brief calls. WHEN NOT: you only care about one timeframe (use brief). The alignment/divergence is impersonal DESCRIPTIVE data, not a signal to act on. Example: {"ticker":"BTC/USDT","timeframes":["1h","4h","1d"]}. Not investment advice.

输入参数limitmarketticker必填timeframes

patternfetch_delta

What Changed Since Last Brief

Get only what CHANGED since your last brief for a ticker+timeframe (trend flips, new patterns, RSI-state changes). WHEN: an agent polls the same market repeatedly and wants minimal tokens — call brief once, then delta on each later poll. WHEN NOT: first look at a market (use brief). Returns changed=false when nothing material changed. Example: {"ticker":"BTC/USDT","timeframe":"4h"}. Impersonal data, not advice.

输入参数limitmarketticker必填timeframe必填

patternfetch_analogs

Historical Analogs Distribution

Find earlier windows IN THE SAME SERIES whose shape resembles the current price action and return the FULL distribution of what followed (win-rate, median, min, max, n) over a fixed forward horizon. Parameters: window = how many recent bars form the shape being matched (default 32); horizon = how many bars forward each match is measured over (default 20). WHEN: an agent wants the historical spread of outcomes after a similar-looking setup, including how wide and how uncertain that spread is. WHEN NOT: you want the current technical picture (use brief), you want to find candidates across the market (use scan), or you need one expected value — this deliberately returns a distribution, not a point estimate. NOT a prediction, NOT a backtest of a strategy; past distribution does not guarantee future results. Example: {"ticker":"ETH/USDT","timeframe":"1d"}. Impersonal data, not advice.

输入参数marketticker必填windowhorizontimeframe必填

patternfetch_scan

Pattern & Regime Screener

Scan US stocks, ETFs, and crypto for tickers currently in a given regime or showing a chart/candlestick pattern, RANKED by the honest backtested base rate + 95% CI — discovery, NOT lookup. This is the screener: instead of asking about one ticker you already know, ask "which tickers right now are in an uptrend / printing a double_bottom, and which of those has the strongest historical base rate?" and get a ranked shortlist back. Precomputed daily over a curated universe (liquid US large-caps + core/sector ETFs + major crypto pairs) so it is fast and cheap. Filters (all optional): assetClass ("stock"|"crypto"|"all"), regime ("up"|"down"|"range"), pattern (e.g. "double_bottom","double_top","head_and_shoulders","bullish_engulfing","bearish_engulfing","hammer"), minLift (-1..1 in rate points, e.g. 0.02 = keep only patterns beating their OWN pattern-free baseline by >= 2pp; 0 = at or above baseline), minBaseRate (0..1, drop tickers whose top pattern base rate is below this), tf, limit. PREFER minLift over minBaseRate: a raw base rate is not comparable across bullish and bearish rows, so minBaseRate:0.55 mostly returns bullish patterns in a rising universe before any of them carries information, whereas minLift returns the ones that measurably add something. Rows with no baseline in the evidence table are excluded by any minLift (absence of a lift is not a lift of 0). Each row: {sym, tf, assetClass, regime, pattern, baseRate, ci95, n, scope, confidence, asOf} PLUS the drift-free comparison {baseline, lift, liftCi95, liftReading} — baseline is the direction-matched rate with no pattern present, lift is baseRate minus that baseline, and liftReading says whether the difference is distinguishable from zero at all ("above-baseline" | "below-baseline" | "indistinguishable-from-baseline"). Read lift, not baseRate, when comparing a bullish row against a bearish one: in a rising universe a bullish pattern starts ahead before it carries any information. Ranked by baseRate desc, then

输入参数tflimitregimeminLiftpatternassetClassminBaseRate

patternfetch_capabilities

Server Capabilities

Return patternfetch's own capability matrix: which asset classes are covered (US stocks, ETFs, crypto spot), the data source and delay for each, the supported timeframes, the endpoint list, the per-call prices and tier limits, and the product version. Takes no arguments and returns the same static self-description on every call — it contains NO market data (no quotes, candles, patterns or base rates). WHEN: once at the start of a session, to learn which asset classes and timeframes are supported before calling brief/multi/delta/analogs/scan, instead of guessing and getting a validation error. WHEN NOT: you already know the ticker and timeframe are supported (go straight to brief), or you want actual market data (this returns none).

无需输入参数。

版本历史

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

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分