# NeuroDock Guardrail

Flags rumination loops, unregulated hyperfocus and sycophancy in AI conversations. It advises, it never silently blocks.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 17
- Author: tlennon-ie
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/tlennon-ie/neurodock/tree/HEAD/packages/mcp-guardrail
- Updated: 2026-09-21
- HTML: https://affpapa.org/en/nevibecode/mcp/neurodock-guardrail

## What it does

NeuroDock Guardrail is a clinical MCP server for NeuroDock. It watches for three patterns that plain LLM interaction tends to amplify for neurodivergent users: OCD-style rumination loops, ADHD-style hyperfocus, and over-validation. All three detectors are live as of v0.0.2.

The server exposes three tools. `check_rumination` uses a word-overlap Jaccard heuristic with a 90-minute window, a count of 3 and similarity 0.55. `check_hyperfocus` works off an elapsed-time threshold tied to end of day, at 60, 90 and 120 minutes. `check_sycophancy` matches against four patterns at similarity 0.5. Those thresholds are defaults rather than prescriptions, and the heuristic sources sit in `src/neurodock_mcp_guardrail/heuristics/` where you can read them.

Nothing is persisted. No SQLite, no JSONL, no cache that outlives a call — callers hand over the whole history themselves. There are no network sockets and no telemetry, and logs carry only tool-invocation metadata. You start it over stdio with the `neurodock-mcp-guardrail` console script, so `uvx` has to be on the machine. The license is AGPL-3.0-or-later, which matters if you plan to fold this into a product.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add neurodock-mcp-guardrail -- uvx neurodock-mcp-guardrail
```
uvx runs the command named after the package; if the README names another one, use uvx --from neurodock-mcp-guardrail <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp-guardrail -- uvx neurodock-mcp-guardrail
```
uvx runs the command named after the package; if the README names another one, use uvx --from neurodock-mcp-guardrail <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-guardrail": {
            "command": "uvx",
            "args": [
                "neurodock-mcp-guardrail"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from neurodock-mcp-guardrail <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-guardrail": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "neurodock-mcp-guardrail"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from neurodock-mcp-guardrail <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-guardrail uvx neurodock-mcp-guardrail
```
uvx runs the command named after the package; if the README names another one, use uvx --from neurodock-mcp-guardrail <command>

## When to use it
- spot a conversation that keeps circling the same wording
- catch a session that has run well past the end of the day
- tell real feedback apart from empty agreement
- check a chat history without storing it server-side
- see which rule fired and why

## Example prompts
- Run `check_rumination` over this conversation and tell me if I'm looping
- How long have I been working? Call `check_hyperfocus`
- Check the last few replies for sycophancy with `check_sycophancy`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
