mcpField
N
NeuroDock Guardrail

NeuroDock Guardrail

Local
neurodock.orgHealth18Updated 18w ago

About NeuroDock Guardrail

NeuroDock Guardrail is an MCP server for detecting rumination, hyperfocus, and sycophancy patterns in LLM interactions, including patterns relevant to neurodivergent users. Its stateless, auditable heuristics provide advisory results and do not silently block interactions.

Key features

  1. 01Rumination detection using word overlap
  2. 02Hyperfocus detection using elapsed time
  3. 03Sycophancy detection across four patterns
  4. 04Stateless, auditable heuristics
  5. 05No telemetry or network calls

Use cases

  1. 01Reviewing repeated discussion for rumination loops
  2. 02Flagging extended focus sessions
  3. 03Checking responses for over-validation

MCP support

Exposes three MCP tools: `check_rumination`, `check_hyperfocus`, and `check_sycophancy`. Callers supply history; the server persists nothing.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"tlennon-ie-neurodock-mcp-guardrail": {
"command": "uvx",
"args": [
"neurodock-mcp-guardrail"
]
}
}
}
Run commanduvx neurodock-mcp-guardrail

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypineurodock-mcp-guardrail0.0.5

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
historyarrayYes
current_promptstringYes
window_minutesintegerNo
threshold_countintegerNo
similarity_thresholdnumberNo

Details

From the project README

neurodock-mcp-guardrail

Clinical guardrails MCP server for NeuroDock. Detects three patterns that unmodified LLM interaction tends to amplify for neurodivergent users: rumination loops (OCD), unregulated hyperfocus (ADHD), and sycophancy / over-validation. See ETHICS.md and MANIFESTO.md for the full framework.

Status

  • v0.0.2: All three detectors are live.

    • check_rumination — word-overlap Jaccard heuristic.
    • check_hyperfocus — elapsed-threshold-with-end-of-day heuristic.
    • check_sycophancy — four-pattern overlap heuristic.

    Heuristics are public and auditable; thresholds are defaults, not prescriptions. See ADR 0006 for the rationale.

Tools

ToolStatusHeuristicDefault thresholds
check_ruminationlive (v0.0.1)word_overlap_jaccardwindow 90 min, count 3, similarity 0.55
check_hyperfocuslive (v0.0.2)elapsed_threshold_with_eod60 / 90 / 120 minutes
check_sycophancylive (v0.0.2)pattern overlap (4 patterns)similarity 0.5

Design invariants

  • Stateless. The server persists nothing — no SQLite, no JSONL, no in-memory caches that survive a call. Callers supply all history.
  • No telemetry, no network sockets. Per ETHICS.md commitment 4.
  • No user content in logs. Only tool_invoked metadata is logged.
  • Override-token vocabulary is closed at v0.1.0. New tokens require a minor bump and sign-off per ADR 0006 §3 and §10.
  • Heuristics are auditable. Source for each heuristic lives in src/neurodock_mcp_guardrail/heuristics/. Changes there require sign-off per ETHICS.md commitment 3.

Usage

# Run the server over stdio (via the console script):
neurodock-mcp-guardrail

# Or smoke-test the build directly:
python -c "from neurodock_mcp_guardrail import server; print(server.app.name)"

Tests

uv run pytest packages/mcp-guardrail/tests/ -v

Tests cover:

  • The Jaccard heuristic (identical, disjoint, stopword-only, paraphrase, case-insensitivity, punctuation handling).
  • The check_rumination tool (empty history, in-window detection, out-of-window non-detection, threshold honour, override-token contract, history-ordering rejection, false-positive-feedback path).
  • check_hyperfocus (escalation level mapping, end-of-day strictness, idle-signal handling, override-token contract, schema conformance).
  • check_sycophancy (each of the four patterns, counter-prompt generation, override-token contract, schema conformance).
  • Protocol conformance: every tool response is validated against the schema files in schemas/.

License

AGPL-3.0-or-later.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.