# RuleDrift

> RuleDrift is an open-source MCP server for agent benchmarks. Local test suite that checks whether AI agents keep following rules in long chats. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, API
- **Repository:** https://github.com/ri7in/rule-drift
- **MCP Registry name:** io.github.ri7in/rule-drift
- **Categories:** [agent benchmarks](https://ai-powered.com/categories/agent-benchmarks)
- **Listing updated:** 2026-11-18

## About

The README says RuleDrift replays conversations to find the exact turn where an agent stops honoring an important instruction, which tends to happen once a session grows long or gets distracted. It is meant to run like a regression test whenever a prompt, model, memory layer or agent workflow changes.

It runs on your own machine and uses a local Ollama model by default, so no paid model API, account or telemetry is needed. It can also be pointed at your own agent, and it sits beside production traffic rather than proxying it. Reports come out in terminal, JSON and JUnit formats, with stable exit codes for CI pipelines.

An optional MCP mode lets AI coding clients run the same checks from inside their editor or chat session.

## Features

- **Drift point detection:** Pinpoints the first conversation turn at which a stated rule is broken.
- **Local Ollama runs:** Uses a locally hosted Ollama model, so no paid API key is required.
- **Bring-your-own agent:** Can test an agent you already run instead of only the bundled setup.
- **Multiple report formats:** Outputs terminal, JSON and JUnit reports.
- **CI-friendly exit codes:** Returns stable exit codes so test runs can gate a pipeline.
- **Optional MCP tools:** Exposes its checks to AI coding clients over the Model Context Protocol.

## Good for

- Regression-testing an agent after changing its system prompt
- Checking whether a new model still respects core instructions over long sessions
- Verifying a memory or context-management change does not cause rules to be forgotten
- Adding instruction-retention tests to a CI pipeline

## Install

### Claude Code (Terminal)

```sh
claude mcp add rule-drift -- npx -y rule-drift
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "rule-drift": {
      "command": "npx",
      "args": [
        "-y",
        "rule-drift"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "rule-drift": {
      "command": "npx",
      "args": [
        "-y",
        "rule-drift"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "rule-drift": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "rule-drift"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "rule-drift": {
      "command": "npx",
      "args": [
        "-y",
        "rule-drift"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "rule-drift": {
      "command": "npx",
      "args": [
        "-y",
        "rule-drift"
      ]
    }
  }
}
```

## FAQ

### What do I need to run it?

The README says it requires Node.js 22 or newer and Ollama, with a local model such as qwen3:1.7b pulled.

### Does it need a paid API or account?

The README states that no paid model API, account, backend or telemetry is required.

### Does it sit in front of production requests?

No. The README says it runs locally and does not sit in front of production requests.

### How is it installed as an MCP server?

The README gives the command npx -y rule-drift mcp --root with a path to your project, and points to a separate MCP setup guide for client configuration.

### Is RuleDrift free?

Yes. RuleDrift is open source, so you can use and self-host it for free.

### How do I add RuleDrift to Claude Code?

Run this command in your terminal: claude mcp add rule-drift -- npx -y rule-drift

### What are the best alternatives to RuleDrift?

The closest alternatives to RuleDrift are Agent Reliability, First Dollar Test, ScoreIA Open Chamber, mizan-ledger and ICONIC — MCP Selection Test for MCP publishers.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agent Reliability](https://ai-powered.com/mcp/agent-reliability): Agent Reliability is an MCP server for agent benchmarks.
- [First Dollar Test](https://ai-powered.com/mcp/first-dollar-test): First Dollar Test is a paid MCP server for agent benchmarks.
- [ScoreIA Open Chamber](https://ai-powered.com/mcp/scoreia-open-chamber): ScoreIA Open Chamber is a free MCP server for agent benchmarks.
- [mizan-ledger](https://ai-powered.com/mcp/mizan-ledger): mizan-ledger is an open-source MCP server for agent benchmarks.
- [ICONIC — MCP Selection Test for MCP publishers](https://ai-powered.com/mcp/iconic-mcp-selection-test-for-mcp-publishers): ICONIC — MCP Selection Test for MCP publishers is a paid MCP server for agent benchmarks.
- [Word Is Bond](https://ai-powered.com/mcp/word-is-bond): Word Is Bond is a freemium MCP server for agent benchmarks.
- [Trialground](https://ai-powered.com/mcp/trialground): Trialground is an MCP server for agent benchmarks.

---
Source: https://ai-powered.com/mcp/ruledrift
