Rule Trade MCP / ã«ãŒã«ãã¬ãŒã MCP
Endpoint: https://ruletrade.jp/mcp
(llms.txt: https://ruletrade.jp/mcp/llms.txt · OpenAPI: https://ruletrade.jp/mcp/openapi.json · health: https://ruletrade.jp/mcp/health)
English
A verification layer for Japanese equities, exposed over MCP.
Most Japanese-equity MCP servers cover the primary data layer â filings, prices, order execution.
This one covers what is missing: what actually happened when published, mechanical rules were applied.
It holds no engine of its own; it reads JSON that an existing pipeline publishes daily and reshapes it.
Zero dependencies, no API key, no registration.
What you can get
| Tool | Returns |
|---|
get_daily_signals | One stock that matched a published mean-reversion rule (25-day moving-average deviation †-15%), delayed one trading day. Counts are returned; the full list of matches is not distributed. |
get_market_regime | Machine-classified market regime (BULLISH / NEUTRAL / BEARISH / PANIC), circuit-breaker state, VIX, Nikkei 225, daily history, and a three-axis score (trend, short-term risk, supply and demand) with the reasoning behind each axis. No stock names. |
get_anomaly_summary | 50 Japanese market anomalies tested over 61 years â verdict, win rate, mean return, sample size, p-value, control group. Filter by name. Plus five crash-precursor gauges and a 7-flag ignition meter verified over 26 years. |
get_candlestick_verdict | All 12 classic Japanese candlestick patterns tested on 1,550 TSE Prime stocks over 10.5 years â trades, win rate, profit factor, excess return, p-value, losing years, and which of the five adoption criteria each one failed. None of them cleared the bar. The one with the highest profit factor (3.04) flipped sign between the first and second halves of the sample. |
get_event_reaction | What followed an event, from three separate studies â 27 event types (earthquakes, rate decisions, tariffs, pandemics), post-earnings drift across ~26,000 announcements, and index additions and deletions. All three point the same way: the move happens before the event clears. Per-stock rows and sector baskets are deliberately excluded. |
get_indicator_verdict | 26 technical indicators traded exactly as the textbooks describe â TOPIX500, 10 years, ~500,000 trades. Win rate, expectancy, profit factor and excess return over random entry, across two exits. Nine cleared every regime; thirteen did not, and those thirteen are mostly the ones beginners learn first. |
get_etf_decay | Twelve years of measured decay in leveraged and inverse ETFs â yearly theory against actual, win rate by holding period, profit factor by market condition, and 305 attempts to hold and wait for a position to come back (99.3% came back; the ones that did not lost 32.5%). |
list_tools_guide | Update times (JST), delays, what is deliberately not returned, disclaimer, roadmap. Call this first. |
What you cannot get â by design
- Raw price series, OHLCV, or financial-statement values
- Position sizing, entry/exit prices, stop-loss or take-profit levels
- The production thresholds used by the operator's own system
- Any recommendation, rating, or buy/sell signal
Every response carries a disclaimer key. Do not strip it when relaying results to a user.
Output describes whether mechanical rules matched. It is not investment advice, not a solicitation,
and promises no future return.
How to connect
claude mcp add --transport http ruletrade https://ruletrade.jp/mcp
- claude.ai: Settings â Connectors â Add custom connector â
https://ruletrade.jp/mcp
- Any MCP client: POST JSON-RPC 2.0 to
https://ruletrade.jp/mcp (Streamable HTTP, stateless)
Where the research comes from
The rules and verification data are published as books by the operator (Japanese, Kindle):
Silent Investor BNF, Crashes Decay, and All 50 Japanese Market Anomalies Tested Over 61 Years.
The anomaly dataset is a fixed snapshot taken at that book's publication (2026-08) and is not updated daily.
Good to know
- Data updates on Japan Exchange trading days. Exact times are in
list_tools_guide.
- Rate limits are not enforced today. Please be reasonable.
- Statistical values are rounded; p-values use 3 significant figures so very small values stay readable.
æ¥æ¬èª
kaburadar.jp / ruletrade.jp ãæ¯æ¥å
¬éããŠããæ€èšŒæžã¿JSON(docs/*.json)ãã
AIãšãŒãžã§ã³ã(Claude / Cursor / ChatGPT ç)ãã MCP ã§èªããããã«ãã 倿局 ã§ãã
ãšã³ãžã³ã¯æãããGitHub raw ã® JSON ãèªãã§æŽåœ¢ããã ããäŸåããã±ãŒãžãŒãã
æ£èŠURL 㯠https://ruletrade.jp/mcpãå®äœã¯ Cloudflare Workers ã ãã
ruletrade.jp(Vercel)ã® vercel.json ã§ rewrite ããŠãããããé
ä¿¡å
ãå€ãã£ãŠãå©çšè
åŽã® URL ã¯å€ãããªãã
| ããŒã« | èªãJSON | å
容 |
|---|
get_daily_signals | free_scanner.json | BNF 25æ¥ç·ä¹é¢ã«ãŒã«ã®è©²åœéæ(1å¶æ¥æ¥é
ã)ãè¿ãã®ã¯1ä»¶ã®ã¿ã»ä»¶æ°ã¯è¿ã |
get_market_regime | radar.json / market_jiai.json / radar_history.json / score3.json | å°åã BULLISHãPANICã»HALTã»VIXã»æ¥çµã»å±¥æŽ ïŒ 3軞ã¹ã³ã¢(ãã¬ã³ã/çæãªã¹ã¯/é絊ã»5段éã»è»žããšã®æ ¹æ ) |
get_anomaly_summary | anomaly_results.json / gauge.json / crash.json | ãžã³ã¯ã¹50æ¬ã®æ€èšŒçµæ(61幎ã»å€å®/åç/på€ãname ã§çµã蟌ã¿)+ ãæŽèœã¯ãæžè¡°ããã5ã€ã®åå
+ çç«ã¡ãŒã¿ãŒ(26幎æ€èšŒ) |
get_candlestick_verdict | candlestick_verdict.json | é
ç°äºæ³12æ¬ã®æ€èšŒçµæ(æ±èšŒãã©ã€ã ã»10幎å)ã12æ¬ãã¹ãŠäžæ¡çšã»èœã¡ãåºæºã»äžæ¡çšã®çç±ãpattern ã§çµã蟌ã¿(æ¥è±ã®å¥åå¯) |
get_event_reaction | event_reaction.json / earnings_drift.json / supply_demand_events.json | åºæ¥äºã®ããšã«äœãèµ·ãããã3ã€ã®æ€èšŒãããâ åºæ¥äº27çš®(å°éã»å©äžãã»é¢çšã»ã) â¡æ±ºç®åŸã®ããªãã â¢ææ°ã®å
¥æ¿ãevent ã§çµã蟌ã¿(å°é / æ±ºç® / TOPIX ãªã©) |
get_indicator_verdict | indicator_verdict.json | ãã¯ãã«ã«ææš26çš®ã®æ€èšŒçµæ(TOPIX500ã»10幎ã»çŽ50äžå)ã䜿ãã9 / æ¡ä»¶ä»ã4 / æšãŠã13ã»8åºåã®ã©ãã§åºæºã«å±ããªãã£ãããname ã§çµã蟌ã¿(æ¥è±ã®å¥åå¯) |
get_etf_decay | etf_decay.json | ã¬ãã¬ããžã»ã€ã³ããŒã¹ETFã®æžäŸ¡(12幎ã®å®æž¬)ã幎å¥ã»ä¿ææ¥æ°å¥ã»æ¡ä»¶å¥ãšãæ»ããŸã§åŸ
ã€ã305åã®çµæãåç¯ã®ãè§£éã§æ³šæãã¹ãç¹ããå¿
ãæ·»ãã |
list_tools_guide | (éç) | äœ¿ãæ¹ã»æŽæ°æå»ã»é
å»¶ã»å
責ã»ä»åŸã®äºå® |
æ³åç·ã¯äººåããµã€ããšåäž:
- éæãè¿ãã®ã¯1ä»¶ã ã(2026-09-17 ã«äžäœ3ä»¶ããçž®å°)ã該åœããå
šéæã®äžèЧã¯é
åžããªããä»¶æ°ã¯è¿ã
- æšå¥šèª(æšå¥š/ãããã/è²·ãã¹ã/å²ãã ç
src/legal.js ã® NG_WORDS)ã¯åºåããäŒãåã«ãã
- å
šã¬ã¹ãã³ã¹ã«
disclaimer ããŒãåžžèš
- äŸ¡æ Œã»æ ªæ°ã»å©ç¢º/æåã©ã€ã³ã»æ¬çªã®èª¿æŽæžã¿éŸå€ã¯åºããªã(free_scanner.json çææç¹ã§æ¢ã«èœã¡ãŠãã)
- ãžã³ã¯ã¹æ€èšŒã¯å€å®çµæãšçµ±èšå€(åçã»å¹³åã»æšæ¬æ°ã»på€)ã®ã¿ãæ Œèšã®æ¬æ(
saying)ã¯æšå¥šèªãå«ãããåºåããªã
- æžç±ã®æ€èšŒãçµ±èšå€ã®ã¿ãéæåã»éæã³ãŒãã»éæãã¹ã±ããã¯è¿ããªããå
ããŒã¿ã«äœµåããæçް(飿³ã®
baskets.csv 499è¡ã»æ±ºç®ã® events_raw.csvã»èªç€Ÿæ ªè²·ãã® buyback_*.csv 5,523è¡)ã¯çæåŽã§ãéããŠããªã
- æžç±ããåã蟌ãæç« ã¯
mcp/tools/legal_check.py ã JSON ãæžãåºãåã«æ€æ»ãããäŒãå(scrub)ã¯æåŸã®ç Šã§ãããã«é Œããšãå衚çŸèª¿æŽïŒœç¹ã®æ¥çµå¹³åãã®ããã«æã®æå³ãå£ãã
- ETFã®ã³ãŒã(1357 ç)ã ãã¯è¿ããäœãæ€èšŒãããã瀺ãèå¥åã§ãå奿 ªãåæãããã®ãšã¯å¥
ããŒã¿ã®åºã©ãã
docs/*.json ã¯æ¢åã®çæåŽ(Python)ãæ¯æ¥æžãåºããŠãããã®ãMCP ã¯èªãã ãã§ãçæåŽã¯äžåè§Šããªãã
docs/anomaly_results.json / docs/candlestick_verdict.json / docs/event_reaction.json /
docs/indicator_verdict.json / docs/etf_decay.json / docs/earnings_drift.json /
docs/supply_demand_events.json ã®7ã€ã¯
æ¥æ¬¡ã§ã¯ãªã æžç±åè¡æç¹ã®åºå®ããŒã¿ãåŸã®2ã€ã¯ mcp/tools/build_*.py ã§æ€èšŒã®çåºåããæ©æ¢°å€æãã
mcp/tools/verify_*.py ã§å
CSVãš1ã€ãã€çªãåãããŠãã(æã§æžãåããªã)ã
docs/anomaly_results.json ã ãã¯æ¥æ¬¡ã§ã¯ãªã æžç±åè¡æç¹(2026-08)ã®åºå®ããŒã¿ã
å
ã¯ æ ªåŒæè³éçº/jinx_verification/results/results.json(ãã®ãªããžããªã®å€)ã§ã
JSON é察å¿ã® NaN ã null ã«çœ®æããã³ããŒãæŽæ°ãããšãã¯åãæé ã§ã³ããŒãçŽãã
ãšã³ããã€ã³ã
| ãã¹ | å
容 |
|---|
POST /mcp | MCP Streamable HTTP(JSON-RPCã»ã¹ããŒãã¬ã¹) |
GET /health | 5ã€ã®JSONãèªãããç¢ºèª |
GET /llms.txt | ãšãŒãžã§ã³ãåãã®èª¬æ(è±èªäž»ã»æ¥æ¬èªåŸ) |
GET /openapi.json | OpenAPI 3.1ãJSON-RPC ã1ãšã³ããã€ã³ããšããŠèšè¿° |
GET / | æŠèŠ |
ãããã€(ã©ã¡ããäžæ¹ã§OKã»ã¹ããã®ãã©ãŠã¶ããå®çµ)
A. Cloudflare Workers(æšå¥š: ãã°ä¿æãé·ãã»ç¡ææ 10äžreq/æ¥)
- Cloudflare ããã·ã¥ããŒã â Workers & Pages â Create â Import a repository
- ãªããžããª
stock-trading- ãéžã¶ â Root directory ã« mcp ãå
¥ãã
- Build command ã¯ç©ºãDeploy command ã¯
npx wrangler deploy(æ¢å®ã®ãŸãŸ)
- Deploy â Worker ã®å®äœã¯
https://ruletrade-mcp.<account>.workers.dev/mcpã
å©çšè
ã«æ¡å
ããã®ã¯æ£èŠURL https://ruletrade.jp/mcp(ruletrade.jp ã® site/vercel.json ã rewrite ãã)ã
Worker ã® URL ãå€ãã£ããšã㯠site/vercel.json ã®2è¡ãš src/tools.js ã® CANONICAL_* ãçŽã
- ãã°: Worker â Logs(
wrangler.toml ã® observability ã§æå¹åæžã¿)ãevent:"tool_call" ã§çµããšåŒã³åºãæ°ãèŠãã
B. Vercel
- vercel.com â Add New Project â ãªããžããª
stock-trading- ã Import
- Root Directory ã
mcp ã«å€æŽãFramework Preset 㯠Other
- Deploy â
https://<project>.vercel.app/mcp ããšã³ããã€ã³ã
- ãã°: Project â Logs(Hobby ã¯ä¿æ1æéãªã®ã§ãéèšãããå Žåã¯äžã®
LOG_WEBHOOK ã䜿ã)
åäœç¢ºèª(ãããã€åŸã«ãã©ãŠã¶ã§éãã ã)
https://ruletrade.jp/mcp/health â "ok": true ãªãå®äº
- Worker çŽã®
https://ruletrade-mcp.<account>.workers.dev/health ã§ãåããã®ãèŠãã(åãåãçš)
æ¥ç¶(æ£èŠURLã䜿ãã*.workers.dev ã¯æ¡å
ããªã)
- Claude(claude.ai): èšå® â ã³ãã¯ã¿ â ã«ã¹ã¿ã ã³ãã¯ã¿ã远å â URL ã«
https://ruletrade.jp/mcp
- Claude Code:
claude mcp add --transport http ruletrade https://ruletrade.jp/mcp
- æåã«
list_tools_guide ãåŒã¶ãã initialize ã® instructions ã§æ¡å
ããŠãã
ç°å¢å€æ°(ãã¹ãŠä»»æ)
| 倿° | çšé |
|---|
DATA_BASE | JSONã®ååŸå
(æ¢å®: GitHub raw ã® docs/)ããªããžããªéå
¬éåæã«å·®ãæ¿ã |
ANOMALY_URL | æ€èšŒJSONãå¥é
ä¿¡å
ã«çœ®ãå Žåã«æå®ãget_anomaly_summary ã® jinx_verification_external ã«ãã®ãŸãŸå
¥ã(éåžžã¯äžèŠãæ¢å®ã¯ docs/anomaly_results.json) |
LOG_WEBHOOK | åŒã³åºããã°(1è¡JSON)ãPOSTããå
ãGAS/Slack/Sheets çã§éèšãããå Žå |
CACHE_TTL_MS | ã€ã³ã¹ã¿ã³ã¹å
ãã£ãã·ã¥(æ¢å® 60000) |
åŒã³åºããã°ã®åœ¢: {"ts","event":"tool_call","tool","args","ok","ms","scrubbed","client"}
(initialize æã¯ clientInfo ãèšé²ãå®éã«ã©ã䜿ãããŠããããèŠãããã®æ°å)
ããŒã«ã«
cd mcp
npm test
node dev.js
curl -s localhost:8787/health
curl -s -X POST localhost:8787/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_market_regime","arguments":{"history_days":5}}}'
ä»åŸ
run_rule_backtest ã¯ãæ€èšŒåºç€(backtest_grid)ãã§ããæç¹ã§æ€èšããšã³ãžã³ã¯äºéã«äœããªã
- Week 1 ã¯ãèªãã ãããæžã蟌ã¿ã»çºæ³šã»åå¥å©èšã«çžåœããæ©èœã¯å
¥ããªã