Skip to main content
Glama

@dannyphan190/anti-rea-mcp

Listed on MCP Servers

Anti Rea MCP server

This is an MCP server - a Model Context Protocol (MCP) server for the antiRea library (@dannyphan190/anti-rea).

  • Protocol: Model Context Protocol (MCP) - https://modelcontextprotocol.io

  • Transport: stdio - the server reads JSON-RPC from stdin and writes to stdout; startup logs go to stderr

  • Built with: the official @modelcontextprotocol/sdk for TypeScript

  • Version: 3.3.4, wrapping @dannyphan190/anti-rea 3.3.4

  • Exposes: 6 MCP tools - list_signals, create_signal, observe, observe_reference, evaluate, close_signal - that run antiRea's eight advisory signal kinds as stateful sessions

antiRea is a server-side TypeScript library that meters dataset access per identity and flags coordinated bot abuse - bulk extraction crews, scheduler-driven herds, seat squatting - for web apps and SaaS. This MCP server exposes the library's coordinated-cohort signal family - herd phase, herd tightness, seat occupancy, room guard, activity phase, vote brigading, room hopping and reconnect storms - as stateful sessions an MCP client can drive with tool calls. The library's core - per-identity dataset metering against bulk extraction and cloning - stays in-process by design and is not part of this server; only the signal family is exposed here, because signals are what an agent can exercise through tool calls.

It exists so an AI agent (or a developer driving one) can open a signal, feed it a synthetic or replayed event stream, and read the signal's verdict - for trying antiRea out, running the integration checklist shapes from the library's AGENT-GUIDE.md, and demoing what each signal does, without writing any host code first.

The library's current release

The antiRea SDK itself is now at 3.3.4 - 1,978 automated tests (1,976 passing, 0 failing, 2 skipped). New in 3.3.4, the attribution-and-detection release: the PASS-lab build queue shipped as opt-in modules - canary replay detection (verbatim and encoded), a cross-version reuse signal, a deviation-profile signal with three lab calibrations, chunk-level fingerprint tracing at L=256 with optional session rotation (plus an L=512 joint mode whose lab margin is thin and printed wherever it is documented), form armor bound to session and config, action-bound signed tokens, an export entitlement gate and a step-up consumer - plus a fail-closed audit round across the existing HMAC surfaces and a fold-in round of hardening (resource caps, the trusted-header IP fix, poisoned armor for flagged identities, relocation bait for the decoy mode, cursor session-rotation recovery). Every number is a lab measurement on a synthetic surface; what was not measured is not claimed. No cost claim is made: the frozen cost gate remains FAILED from 3.3.3. LAB-E, CB-01, IH-01 and FC-07 are not in this release. This MCP wrapper is at 3.3.4 and wraps SDK 3.3.4: it exposes the signal family for evaluation and demos.

Related MCP server: agent-hub

Run it

Requires Node.js >= 20.

Run it directly:

npx -y @dannyphan190/anti-rea-mcp

Or install globally:

npm install -g @dannyphan190/anti-rea-mcp
anti-rea-mcp

Client configuration

Standard mcpServers config for MCP clients (Claude Code, Cursor, and other stdio clients use this shape):

{
  "mcpServers": {
    "anti-rea": {
      "command": "npx",
      "args": ["-y", "@dannyphan190/anti-rea-mcp"]
    }
  }
}

Honest caveat - read this first

This wrapper is a registry-presence, evaluation and demo channel. It is not a production enforcement path.

antiRea's signals are designed to live inside the host application's process, fed by its real event streams (room joins, seat lifecycles, socket connect/disconnect hooks). Every signal output is advisory - each result carries enforcement: "none" - because antiRea measures and reports; the host application decides what to do. A signal session held in this MCP server's memory sees only what a tool caller feeds it, dies when the server process exits, and is separated from your serving path by an agent round-trip. Production integrations should import @dannyphan190/anti-rea in-process and follow its AGENT-GUIDE.md. The strongest legitimate reaction to any signal remains a step-up challenge for new actions, wired host-side through createVerificationGrace - never a ban, kick or block driven by this wrapper's output.

Tools

Tool

What it does

list_signals

Returns the 8 signal kinds, the library factory behind each, and the exact event shape observe expects per kind.

create_signal

Opens a session around one library signal instance. { kind, sessionId?, options? } - options are forwarded verbatim to the factory; seat-occupancy and room-guard require options: { capacity }. Returns the sessionId.

observe

Feeds one event into a session. Fill only the fields the kind uses (see the table below). Returns the library's observation object.

observe_reference

Feeds { identity, ts } to a herd-tightness session's observeReference() - the established legitimate population the cohort is standardised against. Other kinds return an error: they have no such method in the library.

evaluate

Runs the instance's evaluate() and returns its JSON verbatim. { sessionId, args? } - args are forwarded as the evaluate options.

close_signal

Drops the session and its in-memory instance. Nothing is persisted.

The eight kinds and their event shapes

kind

factory

observe event

Notes

herd-phase

createHerdPhaseSignal

{ identity, ts }

Shared-scheduler fleet on a 900 s grid. Evaluate with args: { cohortWindowMs: 86400000 } for room joins.

seat-occupancy

createSeatOccupancySignal

{ type: "join" | "leave" | "activity", identity, ts, accountCreatedTs? }

Requires capacity at create. Population-only room state; names nobody.

room-guard

createRoomGuard

{ type: "join" | "leave" | "activity", identity, ts, accountCreatedTs? }

Requires capacity at create. Combined guard: burst / sustained / churn join-pressure paths plus the seat-occupancy FAST/DRIP laws, on 30 s ticks. Population-only; its step-up recommendation covers NEW joins only.

activity-phase

createActivityPhaseSignal

{ identity, ts }

Herd-phase law over one activity stream. Scoped evaluation is mandatory - pass cohortWindowMs.

vote-brigading

createVoteBrigadingSignal

{ identity, ts, accountCreatedTs? }

Vote-skip scope only (the measured scope). Flags need >= 2 contributing windows.

room-hop

createRoomHopSignal

{ identity, room, ts }

>= 16 distinct rooms / trailing hour. Self-disarms above a 25% flagged share - never act on names while disarmed.

reconnect-storm

createReconnectStormSignal

{ source, kind: "connect" | "disconnect", ts }

source is a session/account key, never an IP. >= 40 connects / 10 min with median session < 5 s.

herd-tightness

createHerdTightnessSignal

{ identity, ts } (+ observe_reference)

Whole-cohort tightness vs the fed reference; without one it returns status: "uncalibrated" and classifies nothing. Names nobody.

ts is always a millisecond timestamp. Feed one homogeneous stream per session (joins OR chats OR retries - never mixed), and keep the lab-frozen default options unless you have your own measurements: thresholds in these modules were fixed before the lab ran.

A first session

  1. list_signals - pick a kind.

  2. create_signal { "kind": "herd-phase" } - keep the returned sessionId.

  3. observe { "sessionId": "...", "identity": "acct-1", "ts": 1730000000000 } - repeat per event.

  4. evaluate { "sessionId": "...", "args": { "cohortWindowMs": 86400000 } } - read the advisory result.

  5. close_signal { "sessionId": "..." } when done.

Development

npm install
npm run build   # tsc -> dist/index.js
npm run smoke   # scripted JSON-RPC smoke test over stdio (scripts/smoke.mjs)
npm start       # node dist/index.js

The smoke test mirrors the library's own verification checklist: a synthetic shared-grid herd (12 identities x 12 events, 900 s grid, ~+/-30 s jitter) confirms in herd-phase and names exactly its members; a herd-tightness cohort fed against a spread reference scores tight; 16 fresh silent joins flag a 30-seat room in seat-occupancy after the 600 s sustain; missing capacity and use-after-close return clean tool errors.

Scope notes

  • Sessions are in-memory only and unbounded in count; this is a deliberate thin-wrapper trade-off for evaluation use, not a serving component.

  • seat-occupancy and room-guard sessions require options: { capacity } at create time - the wrapper forwards options verbatim and invents nothing on top of the published dist/index.d.ts surface.

  • All lab numbers quoted by the library (and echoed in its result notice fields) are seeded-simulation numbers, not real-traffic performance.

License

MIT. The wrapped library @dannyphan190/anti-rea is also MIT.

Available Tools

6 tools
close_signalClose a signal sessionB

Drops the session and its in-memory signal instance. State is not persisted anywhere.

Inputs: sessionId (required).

create_signalCreate a signal sessionA

Creates one antiRea signal instance (from @dannyphan190/anti-rea) and holds it in an in-memory session. kind is one of the 8 from list_signals. options are forwarded verbatim to the library factory - seat-occupancy and room-guard REQUIRE options { capacity: number }; for all other kinds options may be omitted (lab-frozen defaults - do not retune silently). Returns the sessionId to feed with observe.

Inputs: kind (required), options, sessionId.

evaluateEvaluate a signal sessionA

Runs the session instance's evaluate() and returns its JSON result verbatim. args are forwarded as the evaluate options object: { cohortWindowMs } for herd-phase / activity-phase (scoping is part of the law for room streams - use 86400000), { asOfTs } for the other kinds. Omit args to evaluate with defaults. Every result is advisory (enforcement: "none").

Inputs: sessionId (required), args.

list_signalsList antiRea signal kindsA

Returns the 8 signal kinds this server can open sessions for, the library factory behind each, and the exact event shape observe() expects per kind. No session needed.

Inputs: no named parameters.

observeFeed one event into a signal sessionA

Forwards one event to the session instance's observe(). Fill only the fields the session's kind uses (see list_signals): herd-phase / activity-phase / vote-brigading / herd-tightness use { identity, ts } (vote-brigading also takes accountCreatedTs); seat-occupancy and room-guard use { type, identity, ts, accountCreatedTs? }; room-hop uses { identity, room, ts }; reconnect-storm uses { source, kind, ts }. ts is a millisecond timestamp. Returns the library's observation object (e.g. { status, counted }). Feed ONE homogeneous stream per session.

Inputs: sessionId (required), ts, kind, room, +4 more.

observe_referenceFeed the reference stream (herd-tightness only)B

Forwards { identity, ts } to a herd-tightness session's observeReference() - the established, known-legitimate population the cohort is standardised against. Only herd-tightness instances have this method in the library; other kinds return an error.

Inputs: ts (required), identity (required), sessionId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool maps to a distinct phase of the session lifecycle (list kinds, create, observe, evaluate, close), so overlap is minimal. The one soft spot is observe vs. observe_reference, which share a verb and a payload shape; the description does clarify that observe_reference only works on herd-tightness sessions, so an agent can recover, but misselection is plausible.

    Naming Consistency4/5

    Four of six names follow a clean verb_noun pattern (list_signals, create_signal, close_signal, observe_reference). The bare verbs evaluate and observe break the pattern and, in observe's case, sit awkwardly next to observe_reference, but overall the convention is readable and predictable.

    Tool Count5/5

    Six tools is well-scoped for a thin session wrapper over a signal library: enumerating kinds, create/observe/evaluate/close lifecycle, plus the one special reference-observation path. No tool feels redundant or padded.

    Completeness4/5

    The create → observe → evaluate → close lifecycle is fully covered, including discovery via list_signals. Minor gaps remain: there is no way to list active sessions or inspect held state before closing, and no reset/re-open, which forces agents to track sessionIds themselves in memory.

    Related MCP Connectors

    Related MCP Servers