grievous
"Your lightsabers will make a fine addition to my collection."
A hallucination engine. Typed pseudorandom data via Anthropic API. MCP server.
⚠️ No Guarantees
This is not a PRNG. This is not a test data framework with schema validation. This is a footgun with good trigger discipline expected of the operator.
- Output is plausible, not correct
- Output is nondeterministic — same schema, different result every time
- Output is not validated — if the model returns garbage, you get garbage
- Output is not uniform — LLMs have opinions about what "random" looks like
Good for: seeding dev DBs, one-off REPL sessions, agentic pipelines that need typed data fast, anywhere plausible beats uniform.
Not for: cryptography, reproducibility, performance-sensitive paths, production data.
Install
pip install grievous-mcp
Set your API key:
export ANTHROPIC_API_KEY=sk-ant-...
Typical Usage
From Python
from grievous.backend import generate
# Single object — natural language schema
user = generate("a User with name, age, email, and city")
# {"name": "Priya Nair", "age": 34, "email": "priya.nair@example.com", "city": "Bangalore"}
# Batch
products = generate("a Product with id, name, price_usd, and category", count=5)
# [{"id": 1, "name": "Wireless Headphones", ...}, ...]
# JSON Schema works too
import json
schema = json.dumps({
"type": "object",
"properties": {
"transaction_id": {"type": "string", "format": "uuid"},
"amount_usd": {"type": "number"},
"status": {"type": "string", "enum": ["pending", "cleared", "failed"]},
}
})
txn = generate(schema)
# {"transaction_id": "a3f1...", "amount_usd": 142.5, "status": "cleared"}
# Freeform — anything the model can hallucinate
tensor = generate("a 4x4 float32 matrix, values between -1 and 1")
timestamp = generate("an ISO 8601 timestamp from sometime in 2019")
phone = generate("a plausible Indian mobile number")
Returns parsed JSON if the model cooperated. Raw string if it didn't. No exceptions.
As an MCP Server
Run directly:
grievous
Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"grievous": {
"command": "grievous",
"env": {
"ANTHROPIC_API_KEY": "your-key-here"
}
}
}
}
Tool: generate
generate(schema, count=1, model="claude-haiku-4-5-20251001")
| Arg | Type | Default | Description |
|---|---|---|---|
schema |
string | — | Natural language or JSON Schema |
count |
int | 1 | Number of instances |
model |
string | claude-haiku-4-5-20251001 |
Any Anthropic model |
Roadmap
- v1.0 — Anthropic API backend (current)
- v2.0 — Ollama/local model support (if there's interest)
Why "Grievous"
He's a General (general-purpose). He collects everything you hand him (schemas, types, whatever). He's chaotic but capable. He doesn't work for one army.
The cough is the nondeterminism.
Metadata
Release files for grievous-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grievous_mcp-0.1.1.tar.gz | 56.8 kB | Without provenance | Details for grievous_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grievous_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for grievous_mcp-0.1.1-py3-none-any.whl |
Total release size: 61.6 kB
Release files / grievous_mcp-0.1.1.tar.gz
| Download URL | grievous_mcp-0.1.1.tar.gz |
|---|---|
| Size | 56.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa3e1d39c2653e09c65e59f61fca45ab8ebc5641b439eb0882e043b05eee5d90
|
|
BLAKE2b-256 checksum How to use checksums |
99cede005f1a72fb6cf0592de99d6cb273890c8674d9b91c2d1cf00147066697
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / grievous_mcp-0.1.1-py3-none-any.whl
| Download URL | grievous_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf6fb4a0e4daa55f76b250cbcf7ee28bf2acff96b85bee4be54e695e655fe72a
|
|
BLAKE2b-256 checksum How to use checksums |
4cb323982a693036f34cb049b614d825b7ad8cb34abc08789f36c5a8a20ba898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for grievous-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.