ai-divination-mcp
This server provides audited divination tools for AI agents, enabling them to generate and interpret tarot, I Ching, Xiao Liu Ren, and Bazi results without inventing outcomes.
Tarot Draw (
tarot.draw): Draws tarot cards from major or full deck with spread options (single,three-card,decision) and optional reversals; supports seeded draws for reproducibility.I Ching Cast (
iching.cast): Casts hexagrams viacoins,yarrow, ormanualline input; supports seeded casts and returns primary and resulting hexagrams.Xiao Liu Ren Cast (
xiaoliuren.cast): Casts using lunar-style numbers (month/day/hour) or a Gregorian datetime, with optional lunar-time support (requireslunar-pythonfor lunar casts).Bazi Cast (
bazi.cast): Generates a Four Pillars chart (stems, branches, wuxing) from a Gregorian birth datetime; requires optionallunar-python.Interpretation Templates (
interpretation_template): Returns shared and per-skill interpretation guidelines to help agents respond safely, avoiding fatalism, certainty, and professional advice framing.
Allows OpenAI agents (e.g., Codex) to use divination tools via the MCP server.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ai-divination-mcp Draw three tarot cards about my conflicting career path."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Oraclebone
Three thousand years ago, Shang kings carved their divinations into bone — the first auditable record of an oracle at work. Oraclebone brings the same discipline to AI agents: audited scripts produce the draw, the hexagram, the pillars; the model only interprets what it is given. It never invents the result.
🔮 Open-source divination toolkit for AI agents, formerly known as ai-divination-skills (renamed in v8.0.0 — the old PyPI package is frozen; install oraclebone instead).
oraclebone is a practical skill collection for tarot, I Ching, Xiao Liu Ren, and future symbolic systems. It is built for agent workflows that need auditable randomness, clear method boundaries, and reusable interpretation templates.
This project treats divination as symbolic reasoning and reflection, not deterministic prediction.
⚡ One-line Install for AI Agents
Paste this into your AI agent:
Install Oraclebone for this agent: https://raw.githubusercontent.com/sapuyou45-bit/oraclebone/main/docs/install.mdOr install directly for Claude-style local skills:
curl -fsSL https://raw.githubusercontent.com/sapuyou45-bit/oraclebone/main/install.sh | bashThe default target is ~/.claude/skills. Set AI_SKILLS_DIR for another agent skill directory.
Related MCP server: 命盘 Mingpan
✨ Overview
Most AI divination prompts let the model invent the result. This repo separates the two jobs:
A local script produces the card draw, hexagram, or Xiao Liu Ren position.
The AI agent interprets that generated result with clear safety boundaries.
That makes readings easier to test, reproduce, audit, and reuse across agents.
🧭 Methodological Rigor
The core rule is simple: scripts or user-provided physical casts generate the divination result; AI interprets that result and does not generate the divination result.
This is not scientific proof of divination efficacy. It is a stricter workflow for symbolic reasoning:
real readings use system randomness by default
seeded mode is only for tests and reproducible demos
traditional methods and limitations are documented per skill
JSON outputs include enough metadata to audit the method
approximate modes emit warnings instead of pretending to be traditional
🌐 Multilingual Docs
The GitHub Pages site ships a six-language switcher — 简体中文, English, 日本語, Português, 한국어, Español. It follows your browser language by default and remembers your manual choice.
Local preview:
python3 -m http.server 8000 -d docsPublished site:
https://sapuyou45-bit.github.io/oraclebone/🧩 Included Skills
Skill | What it does | Script |
| Draws tarot cards for reflection, decisions, creative blocks, and project reframing. |
|
| Casts six-line I Ching hexagrams with primary and resulting hexagrams. |
|
| Casts Xiao Liu Ren from lunar-style numbers or a Gregorian time fallback. |
|
| Casts a Bazi (Four Pillars / 八字) chart from a Gregorian birth datetime. Requires the optional |
|
🚀 Quick Start
Install from PyPI:
pip install oracleboneOr from a checkout:
pip install .Use editable mode while developing:
pip install -e .Use one command for every system:
ai-divination tarot --deck major --spread three-card --reversals
ai-divination iching --method yarrow
ai-divination xiaoliuren --method numbers --month 3 --day 12 --hour 7Ask for an agent interpretation template:
ai-divination template tarotUse the Python API directly:
from oraclebone.tarot import draw
from oraclebone.iching import cast
from oraclebone.xiaoliuren import cast_numbersYou can still run the underlying scripts directly:
python3 skills/tarot/scripts/draw.py --deck major --spread three-card --reversals
python3 skills/iching/scripts/cast.py --method coins
python3 skills/iching/scripts/cast.py --method yarrow
python3 skills/xiaoliuren/scripts/cast.py --method numbers --month 3 --day 12 --hour 7Use a seed for reproducible demos:
python3 skills/tarot/scripts/draw.py --spread decision --seed demo
python3 skills/iching/scripts/cast.py --method yarrow --seed demoAll scripts output JSON.
📦 Install as Agent Skills
For AI-agent-guided setup, use the remote install runbook:
Install Oraclebone for this agent: https://raw.githubusercontent.com/sapuyou45-bit/oraclebone/main/docs/install.mdFor direct shell install:
curl -fsSL https://raw.githubusercontent.com/sapuyou45-bit/oraclebone/main/install.sh | bashThe installer copies tarot, iching, and xiaoliuren into ~/.claude/skills by default. To target another agent, set AI_SKILLS_DIR before running it.
Manual install is just copying the folders you want into your agent's skill directory:
mkdir -p ~/.claude/skills
cp -R skills/tarot ~/.claude/skills/tarot
cp -R skills/iching ~/.claude/skills/iching
cp -R skills/xiaoliuren ~/.claude/skills/xiaoliurenEach skill is self-contained:
skills/name/
SKILL.md
agents/openai.yaml
scripts/
references/Install individual folders, not the entire repository, when you only want one skill.
Each skill script also works in single-folder mode. If the Python package is installed, the script delegates to the package runtime. If only the skill folder is copied, it falls back to the bundled standalone script in that skill.
Per-host adapters
Every skill ships four adapter files in skills/<skill>/agents/:
Host | File | How it is invoked |
OpenAI / Codex skills |
| Skill metadata + brand icons. |
Claude Desktop / claude.ai project skills |
| Tool spec that runs |
Gemini CLI / Gemini Extensions |
| Extension manifest that runs the same CLI. |
Cursor |
| Rule file with hard "never invent the draw" guard. |
All four adapters route through the same audited ai-divination <skill> CLI, so the agent host never invents the result.
🧠 Use it from Claude Desktop / Codex / any MCP host
oraclebone ships a built-in MCP server (ai-divination-mcp). Any
Model Context Protocol host — Claude Desktop, Codex,
Continue, Cursor — can mount it with a single config line, and the model gets five tools:
tarot_draw, iching_cast, xiaoliuren_cast, bazi_cast, and interpretation_template.
The model never invents the draw; the server runs the audited scripts locally.
Claude Desktop
Install the package once:
pip install oracleboneThen edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"divination": {
"command": "ai-divination-mcp"
}
}
}Restart Claude Desktop. Ask "draw three tarot cards for my decision" — Claude will call
tarot_draw and interpret the JSON output.
Codex / Continue / Cursor
Any MCP-aware host follows the same pattern. The server speaks JSON-RPC 2.0 over stdio with no third-party dependencies.
Per-client setup guides
Copy-paste JSON configs and example prompts for each host:
🤖 Agent Behavior
Each skill instructs the agent to:
generate or accept a concrete draw/cast result
read concise reference material only when needed
interpret with the shared response contract
avoid certainty, fatalism, and professional advice
Shared guidance lives in:
shared/methodology.mdshared/interpretation-protocol.mdshared/response-contract.mdshared/randomness-protocol.mdshared/safety-policy.mdshared/interpretation-style.md
🧪 Examples
examples/tarot-decision.mdexamples/iching-strategy.mdexamples/xiaoliuren-daily.md
🛡️ Safety Boundaries
These skills are not for medical, legal, financial, or crisis guidance.
Good readings should:
frame the result as symbolic reflection
connect claims to the generated result
preserve user agency
offer small, reversible next steps
state uncertainty clearly
See ETHICS.md for the full project stance.
🛠️ Development
No runtime dependencies are required beyond Python 3.
Run tests:
python3 -m unittest discover -s testsCurrent coverage checks:
unified CLI routing
package-only CLI execution
importable Python APIs
single-folder skill execution
skill metadata and asset contracts
interpretation protocol templates
tarot spread output
I Ching cast structure and manual lines
Xiao Liu Ren number and time fallback behavior
💬 Community
Releases: https://github.com/sapuyou45-bit/oraclebone/releases
Roadmap:
ROADMAP.mdDiscussions: https://github.com/sapuyou45-bit/oraclebone/discussions
Issues: pick a
good first issueor propose anew-skillSecurity: see
SECURITY.mdfor private vulnerability reporting
🗺️ Roadmap
Near-term:
Add a published package workflow.
Expand automated skill validation in CI.
Add richer reference material for each MVP skill.
Add more example readings.
Add more agent integration examples.
Later:
meihualiuyaorunesnumerologyastrology
📄 License
MIT
Available Tools
5 toolsbazi_castA
Cast a Bazi (八字 / Four Pillars) chart from a Gregorian birth datetime. The host MUST NOT invent pillars, stems, branches, or wuxing. Requires the optional lunar-python dependency.
Inputs: datetime (required), timezone, longitude. Returns: notes, engine, inputs, system, +7 more
iching_castA
Cast an I Ching hexagram. The host MUST NOT invent the cast. Use method=coins, yarrow, or manual (with manual_lines).
Inputs: seed, method, manual_lines. Returns: lines, method, system, warning, +9 more
interpretation_templateA
Return the interpretation template (shared + per-skill) that the host should follow before writing an interpretation.
Inputs: skill.
tarot_drawA
Draw tarot cards with audited Fisher-Yates shuffle. The host MUST NOT invent the draw. Omit seed for real readings; seeded mode is for tests and reproducible demos only.
Inputs: deck, seed, spread, reversals. Returns: deck, cards, spread, system, +7 more
xiaoliuren_castA
Cast Xiao Liu Ren (小六壬). The host MUST NOT invent the cast. method=numbers needs month/day/hour, method=time and method=lunar_time take an ISO datetime (lunar_time requires the optional lunar-python dependency).
Inputs: day, hour, month, method, +1 more. Returns: inputs, method, system, formula, +6 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each divination tool targets a distinct practice—bazi, tarot, I Ching, and Xiao Liu Ren—so there is no overlap in purpose. The interpretation_template tool is clearly separate, providing guidance rather than performing a cast. An agent can confidently select the right tool for a requested method.
Tool names follow a consistent lowercase_snake_case pattern with a domain noun followed by an action (bazi_cast, iching_cast, xiaoliuren_cast, tarot_draw). The verb varies appropriately to the divination style, and interpretation_template breaks the action pattern but is still predictable as a resource-based tool.
Five tools is well-scoped for a specialized divination server: four distinct casting methods plus one shared interpretation template. There is no bloat or obvious redundancy.
The server covers the core casting lifecycle for all four divination methods and provides interpretation guidance. Minor gaps exist, such as no tool to list available divination types or retrieve past casts, but these are not essential for the apparent purpose.
Maintenance
Related MCP Connectors
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables traditional Chinese metaphysics tools like Bazi, Ziwei, and Qimen via MCP, integrating AI analysis for divination and fortune-telling.762AGPL 3.0
- AlicenseAqualityBmaintenanceProvides traditional Chinese astrology (Bazi, Ziwei) and divination (Liuyao, Meihua, Qimen, etc.) calculations as MCP tools for AI assistants.18266 npm131Apache 2.0
- AlicenseAqualityDmaintenanceProvides MCP tools for Chinese metaphysics, including BaZi (Four Pillars) charting, Liu Yao hexagram casting, lunar conversion, and AI-powered destiny analysis.1034 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Eastern and Western divination, enabling tarot, Lenormand, I Ching, Meihua, Qi Men, BaZi, Zi Wei Dou Shu, Xiao Liu Ren and Da Liu Ren readings via the free QiyueAstro public API.MIT