Metadata-Version: 2.4
Name: divinatory
Version: 0.1.0
Summary: An MCP server providing AI agents with an entropy source modelled on traditional divination
Project-URL: Homepage, https://github.com/ZandevOxford/divinatory
Project-URL: Issues, https://github.com/ZandevOxford/divinatory/issues
Author-email: John M Reynolds <zandev@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: mcp>=2.1
Requires-Dist: pydantic>=2
Requires-Dist: tomlkit>=0.13
Provides-Extra: dev
Requires-Dist: build>=1; extra == 'dev'
Requires-Dist: hatchling; extra == 'dev'
Requires-Dist: omnidep>=0.4; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo; extra == 'docs'
Requires-Dist: sphinx-markdown-builder>=0.6.11; extra == 'docs'
Requires-Dist: sphinx>=8; extra == 'docs'
Description-Content-Type: text/markdown

# divinatory

An MCP server providing AI agents with an entropy source modelled on
traditional divination.

## Getting started

Set up a 3.12 or later Python environment, then:

`pip install divinatory`

Then, from the root of a project:

`divinatory init`

That registers the server with Claude Code and GitHub Copilot CLI
(`.mcp.json`), Codex (`.codex/config.toml`) and Cursor (`.cursor/mcp.json`),
using an absolute path into the environment it was installed in. Only the
server's own entry is written. Re-run it after moving or rebuilding the
environment; `--dry-run` shows what would change. `divinatory uninit`
takes the entries out again.

## Tools

* `secure_seed`: a fresh 128-bit seed, as hex.
* `secure_random`: one-off integers, floats, choices from a list, or a deal
  without repeats, from the operating system's secure source.
* `random`: integers, floats or choices from a seed and offset, with
  replacement. Repeatable, and continued across calls from the `next_offset`
  each result gives.
* `deal`: a deck (a list, or the integers `low` to `high`) shuffled by a seed
  and dealt without repeats, continued the same way.

## Documentation

* **[The MCP tools](https://github.com/ZandevOxford/divinatory/blob/main/docs/tools.md)**: every tool's parameters, defaults and
  results, and the instructions the server gives a client.
* **[The command line](https://github.com/ZandevOxford/divinatory/blob/main/docs/cli.md)**: `divinatory init` and `uninit`.
* **[The API reference](https://github.com/ZandevOxford/divinatory/blob/main/docs/reference.md)**: the Python package, module by
  module.

All three are generated from the source and committed. After changing a
docstring, a tool or the command line, regenerate them; the tests fail until
they match:

```sh
pip install -e ".[docs]"
make -C docs documents
```

## Development

```sh
conda env create -f environment.yml
conda activate divinatory
pip install -e ".[dev]"
pytest
ruff check . && ruff format --check .
```
