{
  "name": "The Nervous System MCP Server",
  "version": "1.11.0",
  "protocol": "2024-11-05",
  "description": "LLM behavioral enforcement framework. 7 core rules, preflight checks, session handoffs, worklogs, violation logging, kill switch, hash-chained audit, and forced reflection cycles. Built by Arthur Palyan.",
  "endpoints": {
    "sse": "/sse",
    "message": "/message",
    "http": "/mcp",
    "health": "/health",
    "kill": "POST /kill (auth required)",
    "audit_verify": "GET /audit/verify",
    "dispatches": "GET /dispatches"
  },
  "tools": [
    {
      "name": "get_framework",
      "description": "Returns the complete nervous system framework - all behavioral rules, guardrails, and enforcement patterns that keep LLMs from hurting themselves."
    },
    {
      "name": "session_handoff",
      "description": "Get the session handoff system that solves context loss between LLM sessions."
    },
    {
      "name": "preflight_check",
      "description": "Get the preflight check system that protects files from accidental LLM edits."
    },
    {
      "name": "worklog",
      "description": "Get the worklog pattern - continuous progress writing that prevents silent failures."
    },
    {
      "name": "guardrail_rules",
      "description": "Returns behavioral rules for LLM management: DISPATCH DONT DO, ASK BEFORE TOUCHING, STEP BACK, WRITE PROGRESS, HAND OFF, PERMISSION PROTOCOL."
    },
    {
      "name": "violation_logging",
      "description": "Get the violation logging pattern - how to track, log, and enforce guardrail breaches."
    },
    {
      "name": "step_back_check",
      "description": "The 7-level reflection system. Forces the LLM to zoom out and see the big picture."
    },
    {
      "name": "get_nervous_system_info",
      "description": "Overview of the entire nervous system - what it is, where it came from, how to implement it, what problems it solves, and operational stats."
    },
    {
      "name": "emergency_kill_switch",
      "description": "Emergency shutdown of all PM2 processes. Requires kill switch secret. Logs the event to the audit trail. Use only in emergencies."
    },
    {
      "name": "verify_audit_chain",
      "description": "Walks the hash-chained audit log and verifies every entry. Returns chain integrity status - valid/invalid, entry count, and where the chain breaks if tampered."
    },
    {
      "name": "dispatch_to_llm",
      "description": "Spawns a background LLM agent to handle a task. Checks RAM (needs 500MB+), enforces max 2 concurrent dispatches. Returns PID and log file path."
    },
    {
      "name": "drift_audit",
      "description": "Scans for configuration drift - finds files, docs, and configs that reference outdated values. Detects when a file is renamed but references are not updated, when roles change but downstream docs still show old values, when running processes do not match documentation, when bots fail compliance with the 6 universal standards, or when family members in family-roles.json are missing from downstream locations. Scopes: roles, versions, files, processes, website, platforms, docs, bots, members."
    },
    {
      "name": "security_audit",
      "description": "Scans for security vulnerabilities - hardcoded passwords in HTML, exposed API keys, missing TLS, missing rate limiting, exposed bot tokens, and insecure file permissions."
    },
    {
      "name": "auto_propagate",
      "description": "Runs all 3 propagators (role, version, content) and reports what changed vs what was already current. Ensures all downstream files match source-of-truth values."
    },
    {
      "name": "propagate_family_member",
      "description": "Checks family-roles.json as source of truth, detects missing members in all downstream locations, and auto-fixes what it can (family-status.json, system-config.json, HTML counts). Flags UNTOUCHABLE files for manual fix. Run after adding/removing a family member."
    },
    {
      "name": "session_close",
      "description": "One-call session close. Runs drift_audit scope=full, then all 3 propagators. Returns combined results. The end-of-session button."
    },
    {
      "name": "page_health",
      "description": "Checks HTML pages in /root/family-home/ for broken links, broken fetches, missing mobile nav, placeholder text, missing images, stale links, missing OG tags, missing favicon, JS syntax issues, and empty sections. Catches what drift_audit does not - actual page functionality and UX issues."
    },
    {
      "name": "pre_publish_audit",
      "description": "Scans the Nervous System source code itself before publishing. Catches hardcoded secrets, personal data, non-portable paths, and internal naming that should not ship to clients. RUN THIS BEFORE EVERY npm publish."
    },
    {
      "name": "mcp_analyzer",
      "description": "Analyzes your project structure and generates a tailored CLAUDE.md with the most useful tools for your workflow. Use mode=analyze to see recommendations, mode=write to generate CLAUDE.md, mode=reload to re-scan and update. Turns the NS from generic tools into a trained assistant that knows your project."
    },
    {
      "name": "self_check",
      "description": "Runs automated self-diagnosis on the Nervous System. Checks for: rate-limiting own operations, secrets in source code, info leakage in tool output, hardcoded paths, missing smoke tests, and version desync. Run before every publish and as part of security audits."
    },
    {
      "name": "bot_compliance_check",
      "description": "Checks all public bot files against the 6 mandatory universal standards: (1) thinking message with 3-sec delay, (2) persistent typing indicator, (3) owner self-identification, (4) acceptance philosophy in prompt, (5) read receipts, (6) session summary extraction. Returns pass/fail per bot per standard."
    },
    {
      "name": "usage_report",
      "description": "Check API token usage per bot per day. Shows which bots are consuming the most tokens and flags anomalies. Use this to monitor costs and catch runaway knowledge files."
    },
    {
      "name": "check_dependencies",
      "description": "Generate dependency map showing which files each PM2 process requires. Returns dependency-map.json content."
    },
    {
      "name": "create_snapshot",
      "description": "Create full system snapshot with one-command rollback script. Returns snapshot location, file count, and RESTORE.sh path."
    },
    {
      "name": "check_session_diff",
      "description": "Show what changed since last session - files modified, processes changed, alerts triggered. Returns SESSION_DIFF.md content."
    },
    {
      "name": "fix_doc_drift",
      "description": "Auto-fix drift between docs and reality (process counts, versions, port numbers). Use dry_run=true to preview changes."
    },
    {
      "name": "get_health_status",
      "description": "Generate current system health snapshot - RAM, disk, CPU, process states, crash loops, and alerts."
    },
    {
      "name": "test_deployment",
      "description": "Run 5-step test pipeline on a file before deployment: preflight, syntax, dependencies, ports, memory."
    },
    {
      "name": "check_page_changes",
      "description": "Detect changes to public pages since last check. Returns list of changed pages with diffs."
    },
    {
      "name": "check_archive_safety",
      "description": "Check if a file is safe to archive - verifies it is not in use by active PM2 processes, not required by other files, and not in the untouchable list."
    },
    {
      "name": "accountability_check",
      "description": "Detects when an LLM agent fabricated a solution instead of finding the real one. Scans for: placeholder credentials next to real ones in backups, duplicate files/directories serving the same purpose, config files with defaults when populated versions exist elsewhere, and recently created workarounds for things that already exist. Run this after every session to catch fabrication before it costs time and money."
    },
    {
      "name": "session_persist",
      "description": "Persists a fact from the current session to disk. Use during conversation to save research findings, decisions, confirmations, credentials, contacts, deadlines, partner info, or API results. Facts are stored in /root/family-data/session-facts/{date}.jsonl and auto-processed into business-builder files."
    },
    {
      "name": "discovery_briefing",
      "description": "Returns a structured intelligence briefing of discoveries relevant to your project. Reads user config to determine interests (AI updates, competitors, grants, gov contracts, trends). Items tagged [USE NOW], [WATCH], [OPPORTUNITY], [THREAT]. Run discovery-scanner.js via cron to keep data fresh."
    }
  ],
  "resources": [
    {
      "uri": "nervous-system://framework",
      "name": "The Nervous System Framework"
    },
    {
      "uri": "nervous-system://quick-start",
      "name": "Quick Start Guide"
    },
    {
      "uri": "nervous-system://rules",
      "name": "The 7 Core Rules"
    },
    {
      "uri": "nervous-system://templates",
      "name": "Templates"
    },
    {
      "uri": "nervous-system://drift-audit",
      "name": "Drift Audit"
    },
    {
      "uri": "nervous-system://tamara-reference",
      "name": "Tamara Reference Implementation"
    },
    {
      "uri": "nervous-system://case-study",
      "name": "Palyan Family AI System Case Study"
    }
  ],
  "links": {
    "game": "https://100levelup.com",
    "website": "https://www.levelsofself.com"
  }
}