Yarrow

io.github.shaozhengkun123由 GitHub 帳號 shaozhengkun123 發布v0.1.0更新於 Oct 24, 2026

I-Ching (周易) oracle: cast a hexagram, read classical commentary, get a reflection. Bilingual.

已驗證Streamable HTTP可網頁執行

概覽

AI 產生的概覽

Yarrow 是遠端易經與塔羅占卜服務,讓助理起卦、查閱經典註疏,並取得有出處依據的反思。

可以做什麼
  • 起卦,回傳本卦、動爻與變卦,可傳入種子以重現結果
  • 查詢卦的經典出處:卦辭、大象、彖傳、朱熹、楊天才解說與典故,中英雙語
  • 查詢本卦變為另一卦時的焦氏易林卦辭
  • 抽取一張正位偉特塔羅大阿爾克那牌,並附偉特原文摘錄
  • 一次性解讀:先起卦、先呈現經典出處,再給出反思
  • 將易經起卦與一張塔羅牌結合成雙視角解讀,含共同主題與下一步
適用情境
適合需要象徵性反思、或想藉經典文本梳理某個決定時使用,引文來自經典而非模型自行編造。適合個人反思與日記式對話,不適合當作事實預測。
執行需求
需要遠端 streamable HTTP 端點;未宣告帳號、API 金鑰或請求標頭。對不支援 HTTP MCP 的用戶端,README 提到可用 stdio 橋接套件。需要網路連線。
安裝前請注意
解讀定位為反思而非預測,服務方稱會拒絕算命、具體未來預測以及醫療、法律、財務建議。公開端點對匿名呼叫者限每日 30 次解讀。你提出的問題會傳送到第三方託管服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Yarrow,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.shaozhengkun123%2Fyarrow/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "yarrow": {
      "type": "http",
      "url": "https://yarrow-oracle.shaozhengkun.workers.dev/mcp"
    }
  }
}

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

PathWhat
src/Cloudflare Workers source — public MCP endpoint + iOS app proxy
src/data_hexagrams.json64 hexagrams with bilingual classical sources (杨天才 / 朱熹 / 断易天机 / 白话题解)
src/hexagram.tsDeterministic casting (coins / yarrow stalks / random), seeded by FNV-1a + mulberry32
src/mcp.tsMCP JSON-RPC 2.0 handler (3 tools, 30 readings/day per anonymous caller)
.claude-plugin/marketplace.jsonClaude Code / Codex plugin marketplace manifest
skills/yarrow/SKILL.mdThe Yarrow skill — pluggable into any Claude Code or Codex install
npm/yarrow-mcp/@shaozhengkun/yarrow-mcp — stdio bridge for clients that don't speak HTTP MCP
submissions/Drafts for modelcontextprotocol/servers, Smithery, mcp.run
INTEGRATIONS.mdCopy-paste configs for Claude Code / Claude Desktop / Codex / Hermes

The iOS source lives separately at yarrow-ios (TODO).

For users

📱 iOS app

Download on the App Store → · $4.99 · iOS 17+ · no tracking, no account.

All 64 hexagrams and their classical commentary ship in the app; AI reading is optional and runs through this Worker.

🤖 Agents

Claude Code — install the plugin:

bash
claude plugin marketplace add https://github.com/shaozhengkun123/yarrowclaude plugin install yarrow

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "yarrow": { "url": "https://yarrow-oracle.shaozhengkun.workers.dev/mcp" }  }}

Codex CLI / Hermes / older Claude Desktop — use the stdio bridge:

bash
npx @shaozhengkun/yarrow-mcp

Or pin it in your client's config — see INTEGRATIONS.md for every platform.

Anyone with curl —

bash
curl -s -X POST https://yarrow-oracle.shaozhengkun.workers.dev/mcp \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{    "name":"divine",    "arguments":{"question":"Should I take the new job?","locale":"en"}  }}'

The MCP tools

ToolPurpose
cast_hexagramToss the coins / cast the stalks. Returns primary hexagram + moving lines + changing hexagram, all metadata. Deterministic if you pass seed.
lookup_hexagramGet a hexagram's classical text — Wilhelm-style header, judgment, image, and 杨天才 / 朱熹 / 断易天机 / 白话 commentaries.
divineOne-shot reading: casts, looks up, and generates a Wilhelm/Baynes-style reflection grounded in the sources. 30/day per anonymous caller.

Self-hosting

This Worker is MIT — fork, deploy your own, point your agents at your URL.

bash
git clone https://github.com/shaozhengkun123/yarrowcd yarrownpm installnpx wrangler loginnpx wrangler kv:namespace create QUOTA          # copy id into wrangler.tomlecho -n '<your OpenAI-compatible chat URL>' | npx wrangler secret put PROXY_URLecho -n '<your API key>'                   | npx wrangler secret put PROXY_KEYnpx wrangler deploy

Your endpoint will be https://yarrow-oracle.<your-subdomain>.workers.dev.

Boundaries

Yarrow is for reflection, not prediction. The system prompt baked into the Worker refuses:

  • fortune-telling / specific future predictions
  • medical, legal, or financial advice
  • requests to "reveal what will happen"

The classical voice is direct; the framing is Jungian. This is the line we draw, in the iOS app and the MCP both.

License

MIT for code; classical sources are in the public domain. See LICENSE.

來源:README.md,提交 506657f

工具

7

cast_hexagram

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 (useful for testing or for reproducing a reading).

輸入參數seedmethodquestion

lookup_hexagram

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 source material.

輸入參數localenumber必填compact

lookup_yilin

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

輸入參數primary_number必填changing_number必填

cast_tarot

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.

輸入參數seedquestion

divine

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 English, Chinese, Japanese, Korean, Spanish, French, German, Portuguese, Italian, Russian, Arabic, Hindi, Indonesian, and English+Chinese bilingual output. Daily quota: 30 completed readings per device_id (or per anonymous IP if no device_id is supplied); timeout, provider failure, incomplete response, and cancellation do not consume it.

輸入參數seedlocalemethodquestion必填device_id

tarot_reading

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 loop, or guaranteed prediction. Daily quota is shared with completed divine and Two Lenses readings.

輸入參數seedlocalequestion必填device_id

two_lenses

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 emphasis, and next step. Direction without guaranteed prediction or mutual-confirmation claims. Daily quota is shared with completed divine readings.

輸入參數localemethodquestion必填device_idtarot_seediching_seed

版本歷史

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

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。