shaozhengkun123 avatar

Yarrow

shaozhengkun123/yarrow

Consult the I-Ching through three MCP tools: cast_hexagram tosses coins or yarrow stalks (deterministic if you pass a seed), lookup_hexagram fetches classical commentary from 杨天才, 朱熹, and Wilhelm/Baynes sources, and divine generates a full reading grounded in the text. The public endpoint at yarrow-oracle.shaozhengkun.workers.dev has a 30-readings-per-day anonymous quota and refuses fortune-telling or medical advice. Runs on Cloudflare Workers, bilingual English/Chinese, with an iOS app that shares the same hexagram database. Self-host by forking the repo and pointing it at any OpenAI-compatible chat API for the reflection step.

tools
7
transport
HTTP
last updated
May 26, 2026

Install

From registry metadata
$ npx add-mcp https://yarrow-oracle.shaozhengkun.workers.dev/mcp --name yarrow

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http yarrow https://yarrow-oracle.shaozhengkun.workers.dev/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 7 tools

Verified live against the running server on Nov 6, 2026.

cast_hexagramCast a hexagram for an I-Ching consultation. Returns the primary hexagram, the six lines (6=old yin, 7=young yang, 8=young yin, 9=old yang from bottom to top), any moving lines, and the changing hexagram if there are moving lines. Pass `seed` to make the cast deterministic (us...3 params

Cast a hexagram for an I-Ching consultation. Returns the primary hexagram, the six lines (6=old yin, 7=young yang, 8=young yin, 9=old yang from bottom to top), any moving lines, and the changing hexagram if there are moving lines. Pass `seed` to make the cast deterministic (us...

Parameters* required
methodstring
coins = three-coin toss (most common); yarrow = traditional 50-stalk probabilities; random = uniformly pick one of the 64 hexagrams with no moving lines.one of coins · yarrow · randomdefault: coins
questionstring
The question being asked (not used for casting, returned in result for context).
seedstring | number
Optional seed for deterministic casting.
lookup_hexagramReturn the full classical sources for a hexagram by its number (1–64): judgment (卦辞), image (大象), Tuan commentary, Zhu Xi 周易本义, Yang Tian Cai modern explanation, Yarrow's separately labelled Chinese reading aid, and historical anecdote — with available Chinese and English sour...3 params

Return the full classical sources for a hexagram by its number (1–64): judgment (卦辞), image (大象), Tuan commentary, Zhu Xi 周易本义, Yang Tian Cai modern explanation, Yarrow's separately labelled Chinese reading aid, and historical anecdote — with available Chinese and English sour...

Parameters* required
compactboolean
If true, omit authorities (long classical commentary). Returns only structural fields.default: false
localestring
one of en · zh · bothdefault: both
number*integer
Hexagram number 1-64 in King Wen sequence.
lookup_yilinLook up the 焦氏易林 verse for a primary hexagram changing into another hexagram. This is a local classical-source lookup, not an AI reading.2 params

Look up the 焦氏易林 verse for a primary hexagram changing into another hexagram. This is a local classical-source lookup, not an AI reading.

Parameters* required
changing_number*integer
Changing hexagram number 1-64.
primary_number*integer
Primary hexagram number 1-64.
cast_tarotDraw one upright Major Arcana card for reflection. Uses a deterministic one-card Waite-Smith Major Arcana method and returns a selected source excerpt from Arthur Edward Waite's public-domain 1910/1922 text. Pass `seed` to reproduce the same draw.2 params

Draw one upright Major Arcana card for reflection. Uses a deterministic one-card Waite-Smith Major Arcana method and returns a selected source excerpt from Arthur Edward Waite's public-domain 1910/1922 text. Pass `seed` to reproduce the same draw.

Parameters* required
questionstring
The question being reflected on (not used to influence the draw).
seedstring | number
Optional deterministic draw seed.
divineAsk the I Ching. See your next step. Cast a hexagram, show the classical sources first, then offer a thoughtful reflection grounded in those sources. Sources first. Reflection, not prediction. The divine name remains stable for oracle/divination client compatibility. Supports...5 params

Ask the I Ching. See your next step. Cast a hexagram, show the classical sources first, then offer a thoughtful reflection grounded in those sources. Sources first. Reflection, not prediction. The divine name remains stable for oracle/divination client compatibility. Supports...

Parameters* required
device_idstring
Optional opaque identifier for quota tracking. If omitted, IP-derived.
localestring
one of en · zh · zh-Hant · ja · ko · esdefault: en
methodstring
one of coins · yarrow · randomdefault: coins
question*string
The question to consult on.
seedstring | number
Deterministic cast seed.
tarot_readingAsk one real question through a single upright Waite-Smith Major Arcana card. Returns a direct calibrated answer first, the named card and bound Arthur Edward Waite 1910 source excerpt, a practical reality check, and one observable next step. No reversals, astrology, redraw lo...4 params

Ask one real question through a single upright Waite-Smith Major Arcana card. Returns a direct calibrated answer first, the named card and bound Arthur Edward Waite 1910 source excerpt, a practical reality check, and one observable next step. No reversals, astrology, redraw lo...

Parameters* required
device_idstring
Optional opaque identifier for quota tracking. If omitted, IP-derived.
localestring
one of en · zh · zh-Hant · ja · ko · esdefault: en
question*string
The real question to reflect on.
seedstring | number
Deterministic Tarot draw seed.
two_lensesBring one real question to two independent symbolic traditions: a source-first I-Ching cast and one upright Waite-Smith Major Arcana card. Returns a clear calibrated answer first, then five grounded sections covering the I Ching lens, Tarot lens, shared themes, different empha...6 params

Bring one real question to two independent symbolic traditions: a source-first I-Ching cast and one upright Waite-Smith Major Arcana card. Returns a clear calibrated answer first, then five grounded sections covering the I Ching lens, Tarot lens, shared themes, different empha...

Parameters* required
device_idstring
Optional opaque identifier for quota tracking. If omitted, IP-derived.
iching_seedstring | number
Deterministic I-Ching cast seed.
localestring
one of en · zh · zh-Hant · ja · ko · esdefault: en
methodstring
one of coins · yarrow · randomdefault: coins
question*string
The same real question for both lenses.
tarot_seedstring | number
Deterministic Tarot draw seed.

Sponsors

Readme

Yarrow — An I-Ching oracle for the agent era

App Store MCP License: MIT

Yarrow lets you (and your agents) consult the Book of Changes — cast a hexagram, read the classical sources, and get a Wilhelm/Baynes-style reflection. Offline-first iOS app, plus a public MCP server so any LLM agent can reach the same oracle.

"The I-Ching does not predict; it mirrors. The question you bring decides the reading."

What's in this repo


View the full README on GitHub

Details

Repository
github.com/shaozhengkun123/yarrow
Transport
HTTP
Registry
MCP registry, active
Tools verified
Nov 6, 2026