Skip to main content
Glama

rubii-roleplay-mcp

License: MIT MCP Server Node.js >= 20 Local & No API Key

Official Model Context Protocol (MCP) Server for AI character creators, interactive storytellers, and roleplay prompt engineers—built and maintained by the team behind Rubii AI.

Runs 100% locally over stdio with zero API keys and zero external network calls. Plug it into Claude Desktop, Cursor, Windsurf, Claude Code, or any MCP-compatible client to validate Character Card V2/V3 JSON, budget multi-turn context windows, generate safe HTML/CSS status-bar regex templates, and lint character prompts.


Included Tools (5)

Tool

Purpose

validate_character_card

Validates Character Card V1, V2 (chara_card_v2), and V3 (chara_card_v3) JSON fields, Lorebook entries, regex triggers, macro syntax, and estimates token usage across 8K / 16K / 24K / 32K windows.

estimate_roleplay_context

Projects total token load for character sheets, editable long-story Memo notes, constant vs. keyword-triggered Lorebook entries, and conversation history turns—identifying turn eviction risks and trimming opportunities.

generate_status_bar_regex

Generates sandbox-safe HTML + inline CSS status bar templates (minimal-card, fantasy-rpg, cyber-hud, novel-chapter), tested capture-group regex patterns, LLM output instructions, and live verified previews compatible with Rubii AI Styles & Regex and SillyTavern regex rules.

lint_character_prompt

Audits character prompts for macro errors ({char}, {{ user }}, unclosed {{), conflicting POV instructions, negative-constraint overload, duplicated lines, token bloat, and opening messages that narrate {{user}} actions.

get_rubii_platform_guide

Returns accurate, machine-readable public platform documentation, supported languages, canonical URL patterns, and creator workflows aligned with rubii.ai/llms.txt.


Related MCP server: VerifierMCP

Quick Setup

Claude Desktop

Add to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "rubii-roleplay": {
      "command": "npx",
      "args": ["-y", "rubii-roleplay-mcp"]
    }
  }
}

Cursor

Add to .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "rubii-roleplay": {
      "command": "npx",
      "args": ["-y", "rubii-roleplay-mcp"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "rubii-roleplay": {
      "command": "npx",
      "args": ["-y", "rubii-roleplay-mcp"]
    }
  }
}

Claude Code (CLI)

claude mcp add rubii-roleplay -- npx -y rubii-roleplay-mcp

Example Prompts to Try in Your AI Assistant

  1. "Validate this Character Card V2 JSON and tell me if it fits comfortably inside an 8K context window."

  2. "Estimate how many dialogue turns I can sustain on 16K context with this character sheet, 3 Lorebook entries, and a 300-word Memo."

  3. "Generate a fantasy-rpg status bar regex and safe HTML/CSS template tracking Location, Quest, Stamina, and Key Item."

  4. "Lint my character prompt and first message for macro typos, POV conflicts, or user god-moding."

  5. "Look up the canonical Rubii AI public URL patterns and supported languages."


Privacy & Security

  • 100% Local Execution: Every tool runs purely in-memory on your local machine over MCP stdio. No telemetry, no API keys, and no outbound network requests.

  • Sandbox-Safe HTML/CSS Output: generate_status_bar_regex strictly validates tag names, field keys, and 6-digit hex colors, emitting static HTML with inline CSS only (zero <script>, zero inline event handlers, zero external URLs).


Development

npm install
npm run typecheck
npm test

Looking for a zero-dependency CLI & TypeScript library to read/write PNG tEXt (chara / ccv3) metadata chunks and convert Character Card V1/V2/V3 files? Check out character-card-toolkit.


License & Maintainers

Released under the MIT License.

Built & maintained by the team behind Rubii AI — AI character chat, interactive storytelling, Styles & regex formatting, and editable long-story Memo.

Available Tools

5 tools
estimate_roleplay_contextEstimate Roleplay Context Window BudgetB
Read-onlyIdempotent

Estimate total context window usage for a character setting, editable long-story Memo, constant/triggered Lorebook entries, and multi-turn conversation history across 8K/16K/24K/32K (or custom) context windows.

Inputs: memoText, scenario, description, personality, +8 more.

generate_status_bar_regexGenerate Safe HTML/CSS Status Bar & Regex TemplateA
Read-onlyIdempotent

Generate a sandbox-safe HTML + inline CSS status bar template, tested capture-group regex rule, and LLM output instruction block for roleplay chat UIs (compatible with Rubii AI Styles & Regex and SillyTavern regex scripts).

Inputs: theme, title, fields, tagName, +1 more.

get_rubii_platform_guideGet Rubii AI Platform GuideA
Read-onlyIdempotent

Return accurate public Rubii AI platform capabilities, supported languages, canonical URL patterns, creator workflow guidance, and machine-readable documentation links aligned with https://rubii.ai/llms.txt.

Inputs: topic.

lint_character_promptLint Character PromptB
Read-onlyIdempotent

Analyze a character description or roleplay system prompt for clarity, macro formatting, POV conflicts, negative-constraint overload, duplicate rules, token bloat, and opening-message user god-moding.

Inputs: prompt (required), firstMessage, characterName.

validate_character_cardValidate Character Card (V1/V2/V3)A
Read-onlyIdempotent

Validate a Character Card V1, V2 (chara_card_v2), or V3 (chara_card_v3) JSON payload for field completeness, Lorebook integrity, regex syntax, macro correctness, and estimated token usage across 8K/16K/24K/32K windows.

Inputs: card (required), strict.

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 5 tools

    Disambiguation4/5

    The tools mostly target distinct artifacts: full character-card JSON validation, prompt prose linting, context-window estimation, status-bar regex generation, and platform documentation. There is some conceptual overlap because validation, linting, and estimation all touch macros, regex, and token usage, but their descriptions make the primary use cases sufficiently distinguishable.

    Naming Consistency5/5

    All five tools follow a consistent snake_case verb_noun pattern: validate_character_card, lint_character_prompt, estimate_roleplay_context, generate_status_bar_regex, and get_rubii_platform_guide. The naming is predictable and readable throughout.

    Tool Count5/5

    Five tools is a well-scoped set for a focused roleplay character-card and prompt-assistance server. Each tool appears to cover a distinct workflow step, with no obvious padding or missing peer tool at this scale.

    Completeness4/5

    The surface covers validation, prompt analysis, context estimation, status-bar regex generation, and platform guidance, which addresses the main creator workflows described. Minor gaps remain, such as automated remediation/fixing of detected issues or more direct lorebook entry manipulation, but agents can work around these with the existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients such as Claude, Cursor and VS Code to validate SRT and WebVTT caption files mid-task against Netflix, BBC or DCMP limits, flagging reading speed, line length, line count, on-screen duration, gaps, overlaps and broken timestamps. Runs locally as a dependency-free stdio server, accepting a file path or pasted caption text and exposing each standard's limits with their source pages.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables LLMs and agents to check their own work by calling tools instead of trusting assertions, covering symbolic math identities, sandboxed Python execution, JSON-Schema validation, dimensional analysis, and regex testing. Runs over stdio or streamable HTTP for use in Claude Desktop and remote gateway deployments.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables fully offline diagnostics on local inputs: scrubbing secrets from HAR captures, pinpointing PostgreSQL EXPLAIN JSON hotspots, estimating GPU VRAM for local LLM quantizations, and linting mcp.json configs. Runs with zero dependencies over stdio, requiring no build step or external npm packages.
      4
      1
      MIT