| Crates.io | i-ching |
| lib.rs | i-ching |
| version | 1.0.0 |
| created_at | 2025-09-04 21:20:26.959211+00 |
| updated_at | 2025-09-04 21:20:26.959211+00 |
| description | I Ching divination readings for CLI and Goose extension |
| homepage | https://github.com/threemachines/i-ching |
| repository | https://github.com/threemachines/i-ching |
| max_upload_size | |
| id | 1824801 |
| size | 2,148,515 |
A Goose-friendly MCP server for I Ching divination (Wilhelm-Baynes translation), plus a command-line utility version.



For system-wide installation:
# Install directly from source
git clone https://github.com/threemachines/i-ching.git
cd i-ching
cargo install --path .
You should find i-ching in your PATH after refreshing your shell.
git clone https://github.com/threemachines/i-ching.git
cd i-ching
cargo build --release
Binaries will be in your ./target/release/ directory.
Either method creates two binaries:
i-ching - CLI tooli-ching-mcp-server - MCP server for GooseThe binaries include embedded data files, so they work anywhere without requiring external data files.
# Random reading using three coins method
i-ching
# Get help
i-ching --help
The CLI supports multiple input formats via the --input flag:
# Hexagram number (1-64)
i-ching --input 1
# Unicode hexagram character
i-ching --input ䷀
# Line numbers (6,7,8,9 format)
i-ching --input "7,8,9,6,7,8"
# Changing hexagram notation
i-ching --input "32→34"
i-ching --input "32->34"
i-ching --input "䷟→䷡"
Control output format with the --format flag:
# Brief format (default for quick reference)
i-ching --format brief --input 1
# Output: ䷀ 1 Initiating
# Full format with complete interpretations
i-ching --format full --input 1
# JSON format for programmatic use
i-ching --format json --input 1
# Numbers only (traditional line values)
i-ching --format numbers --input 1
# Output: [8, 8, 8, 8, 8, 8]
# MOTD format (all caps, for system messages)
i-ching --format motd --input 1
# Output: ䷀ 1 INITIATING
To build & install the binary system-wide:
cargo install --path .
Open Goose Desktop
Go to Extensions (top-level menu item)
Click Add Custom Extension
Fill in the extension details:
i-ching (or your preferred identifier)I Ching DivinationI Ching divination readings with Wilhelm-Baynes translationSTDIOi-ching-mcp-serverClick Save to add the extension
Enable the extension by toggling it on in the Extensions list
If the extension is enabled, Goose should be able to find and use it. The phrase "conduct a divination" or the keywords "augur" and "auspicious" seem to be enough in Claude models, while GPT seems to need you to more specifically namedrop the I Ching. (I would love more anecdata on how it works with different models - please open an issue or a PR modifying this README with your experiences.)
The MCP server can be used directly with any MCP-compatible client:
./target/release/i-ching-mcp-server
cast_hexagramlines (optional): Array of 6 line values [6,7,8,9] to specify exact readingmethod (optional): Divination method (currently only "coins" supported)interpret_readinghexagram: Primary hexagram number (1-64)changing_lines (optional): Array of changing line positions [1-6]transformed_hexagram (optional): Transformed hexagram numberThis tool uses the three coins method for divination, which has been widely used since the Song Dynasty (960-1279 CE). Each line is determined by tossing three coins:
I chose to not support yarrow-stalk readings for several reasons:
Future versions could allow for an MCP user to conduct their own reading and merely input the numeric results for AI interpretation, if there's demand.
This project uses the Wilhelm-Baynes translation of the I Ching, which is considered one of the most authoritative English translations. The data includes:
src/
├── lib.rs # Library root
├── cli.rs # CLI interface and formatting
├── bin/
│ ├── main.rs # CLI binary
│ └── mcp_server.rs # MCP server binary
└── core/
├── mod.rs # Core module exports
├── data.rs # Data loading and structures
├── divination.rs # Divination logic (coin tossing)
└── reading.rs # Reading representation and methods
cargo test
Update the version in Cargo.toml. This version number is also published by the MCP itself.
This project is licensed under the MIT License - see the LICENSE file for details.
Lovingly vibecoded in Goose with claude-4-sonnet.
This project would not have been possible without adamblvck's dataset of the Wilhelm-Baynes text of the I Ching, and of course thanks are also due to Richard Wilhelm and Cary F. Baynes for producing their translation.
Special thanks to John Minford, whose I Ching translation I quite like, and which provided invaluable guidance on correctly enacting the rites. (Although I acknowledge his objection to digital methods.)
This project was originally inspired by a skeet from Hazel Weakly.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
If you encounter any issues or have questions, please file an issue on the GitHub repository.