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 分

    请在仓库或注册中心条目中声明许可证。