# SaravananJaichandar/world-model-mcp [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/SaravananJaichandar/world-model-mcp  
**GitHub Stars:** 25  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/saravananjaichandar-world-model-mcp

## Description
Temporal knowledge graph for codebases. Captures decision traces, links test failures to code changes, learns co-edit patterns, predicts regression risk, and enforces learned constraints at the edit boundary via a PreToolUse hook. 22 MCP tools, 9 SQLite databases with FTS5, supports Python/TypeScript/JavaScript/Solidity/Go/Rust/Java. Install via pip install world-model-mcp.

## Tools
Capabilities this server exposes over MCP:

- **query_fact** — Fetch a stored fact with provenance + confidence + source
- **record_event** — Append an event to the audit chain (`event_type` from a fixed enum)
- **validate_change** — Check a code-change proposal against learned constraints, returns violations + suggestions
- **get_constraints** — List all constraints matching an entity or file pattern
- **record_correction** — Store a user correction so it re-surfaces on next relevant query
- **get_related_bugs** — Fetch bugs touching the given files + a per-file risk score
- **seed_project** — Bulk-ingest an existing codebase into the knowledge graph
- **ingest_pr_reviews** — Turn recent PR review comments into constraints

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "world-model-mcp": {
    "command": "uvx",
    "args": ["world-model-mcp"]
  }
}
```

## Documentation

## What SaravananJaichandar/world-model-mcp does

SaravananJaichandar/world-model-mcp provides persistent project memory for AI coding agents. It stores codebase knowledge in local SQLite databases and exposes that knowledge through MCP, allowing an agent to query facts, record events, preserve user corrections, and apply learned rules during editing.

The project also supports an optional signed audit trail. Events can be arranged into a hash-linked chain and closed epochs can be signed with a hybrid Ed25519 and SPHINCS+ scheme. The resulting records are designed for offline verification, so an audit can be checked without relying on a running hosted service or an account.

## How it works

A project can be seeded into the knowledge graph, after which the agent can query stored facts and their provenance, confidence, and source. Pull requests can contribute review comments that become constraints. As the agent records decisions, corrections, test-related events, or other supported event types, later queries can surface that context again.

Change validation operates at the proposed-edit boundary. The agent submits a change for checking, and the server compares it with constraints associated with the relevant entity or file pattern. Results include violations and suggestions. Related-bug queries return bugs touching requested files along with a per-file risk score, which can help focus review before a change lands.

The implementation uses nine SQLite databases with FTS5 support. It is intended to run locally and supports projects using Python, TypeScript, JavaScript, Solidity, Go, Rust, and Java.

## Setup and configuration

Install the package with pip:

```bash
pip install -U world-model-mcp
```

The package requires Python 3.11 or newer. A quick local demonstration is available through:

```bash
world-model demo
```

The demo creates sample signed decisions, verifies the resulting epoch, modifies one byte to demonstrate an invalid verification result, and then restores the data. It writes a receipt JSON file in the working directory and prints a browser-verification URL. The core package is MIT licensed and runs locally.

## Tools and capabilities

The exposed MCP tools include:

- `query_fact`: Retrieve a fact with its provenance, confidence, and source.
- `record_event`: Append an event to the audit chain using a fixed event-type enum.
- `validate_change`: Check a proposed code change and return constraint violations and suggestions.
- `get_constraints`: Find constraints matching an entity or file pattern.
- `record_correction`: Save a user correction for later relevant queries.
- `get_related_bugs`: Find bugs associated with files and return per-file risk scores.
- `seed_project`: Bulk-ingest an existing codebase.
- `ingest_pr_reviews`: Convert recent pull-request review comments into constraints.

A PreToolUse hook can enforce learned constraints at the edit boundary. The server is compatible with MCP-capable clients; documented coding-agent integrations include Claude Code, Cursor, Codex, Continue, Cline, Windsurf, GitHub Copilot Chat, pi, OpenClaw, and Hermes Agent.

## Limitations and notes

The audit signatures use the SPHINCS+ round 3.1 byte format rather than the later FIPS 205 SLH-DSA format, so verification should use the package’s `etch-verify` implementation. The hosted `etch.systems` service is a separate managed option; the open-source package is the local implementation and offline reference verifier. The available event types are restricted to a fixed enumeration, and constraint enforcement depends on the project knowledge and review data that have been ingested.

_Full upstream README: https://allmcps.com/mcp/saravananjaichandar-world-model-mcp/readme_

