Skip to main content

A hallucination engine. Typed pseudorandom data via LLM. No guarantees. Trigger discipline required.

Project description

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grievous_mcp-0.1.0.tar.gz (56.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grievous_mcp-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file grievous_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: grievous_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 56.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for grievous_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7237cef597732dee0b4dd66ace7eb01aefd3041eadcbccb1272e31bc00acb8e1
MD5 03cc222569240e098649d1e45278e0ce
BLAKE2b-256 9a3aeee78db07a415b5496d30d0e4a41e3591081bc079cc4bfc616c685c0ddce

See more details on using hashes here.

File details

Details for the file grievous_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: grievous_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for grievous_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96c2f5f6ef22d566f85d985841147550bf23580be2d3d3a56870e075acb0ac5b
MD5 53d8c1563191163a53caa6f7bdfdd4f5
BLAKE2b-256 4e90257d0c94061440afb34adfef21cf04211e3283b7922e981163945cb6fa41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page