modedial
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@modedial switch to Debug Mode and help me track down this failing test"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
modedial
Named modes for coding agents, as a tiny MCP server. Switch your agent between things like Deep Focus, Debug Mode or Fast Prototype with one call, and get a shareable card and a local recap.
Status: v0.1.x, new. Smoke-tested with Claude Code, Codex CLI and opencode (details). Cursor is untested.
Watch the 56-second tour of the site. It shows the page with its illustrative transcripts, not a real agent session.
A real session: three recorded Claude Code runs with the hooks installed. In the last one the agent is told to edit a file in Careful Reviewer mode, and the hook blocks it.

26 s: the guard · 83 s: all three scenes. Replayed from the recorded event log (pauses shortened, long replies trimmed, internal tool-loading steps hidden). Re-create it with tools/demo-recorder.
Every mode switch makes a card like these, drawn locally. The sample images are in docs/examples.
What it does (and doesn't)
list_modes: the available modes (id, name, tagline)set_mode(id): returns a short instruction bundle for the agent to follow, and logs the switch locallycurrent_mode: the active modeend_mode: back to default behaviorrecap: usage stats from your local log
An MCP tool cannot force an agent to do anything. set_mode returns text, and the agent chooses to follow it. Modes are nudges that tend to work when the agent is told to use them (see the snippet below), not guarantees. We have not measured whether modes improve results, so this project makes no performance claims. A small, observational check of what each mode changes is in docs/behavior-check.
Related MCP server: Moderator MCP Server
Install
Requires Node 20+. The server runs with npx -y modedial.
Claude Code
claude mcp add modedial -- npx -y modedialCursor: add to .cursor/mcp.json (or ~/.cursor/mcp.json). Untested by us.
{ "mcpServers": { "modedial": { "command": "npx", "args": ["-y", "modedial"] } } }Codex CLI: add to ~/.codex/config.toml. Tested by us. Codex asks before running a tool; the optional last line skips that prompt for this server.
[mcp_servers.modedial]
command = "npx"
args = ["-y", "modedial"]
default_tools_approval_mode = "approve"opencode: add to opencode.json. Tested by us.
{ "mcp": { "modedial": { "type": "local", "command": ["npx", "-y", "modedial"] } } }Any other MCP client: run npx -y modedial as a stdio server. On Windows, some clients need cmd /c npx -y modedial.
Make agents use it reliably
Paste this into CLAUDE.md, AGENTS.md, .cursor/rules, or your agent's equivalent:
## Modes (modedial)
You have a `modedial` MCP server. When the user asks for a mode (for example "deep focus",
"debug mode"), call `list_modes` if unsure, then `set_mode` with the matching id, and follow the
returned instructions until `end_mode` is called or the user picks another mode. When the user
changes task type (for example from building to reviewing), suggest a fitting mode in one line
instead of switching silently.Enforcement (Claude Code)
By default a mode is advice: the agent reads the instructions and chooses to follow them. On Claude Code you can add guards, which run as hooks, outside the model:
npm install -g modedial # hooks run on every edit, so install globally (fast start)
modedial install claude-code # this project (.claude/settings.json)
modedial install claude-code --user # all projects
modedial uninstall claude-code # remove them againMode | What is enforced |
Careful Reviewer | Claude Code's file-edit tools are denied. Common shell commands that change files, git state or packages are denied too (best effort). Leaving the mode needs your approval. It is reminded once if its reply lacks "Not checked". |
Debug Mode | If it tries to finish after an edit with nothing run, it is sent back once to run something or to say the fix is unconfirmed. After that it can finish. |
Deep Focus | If the agent declares |
Chill Refactor | File-tool edits to dependency manifests (package.json, lockfiles, requirements, go.mod…) need your approval, and so does leaving the mode. Shell commands such as |
Creative Sprint, Fast Prototype | Instructions only. Nothing to enforce. |
The hooks are deterministic code with unit tests, and an end-to-end script (node scripts/e2e-claude-code.mjs) checks them against a real Claude Code session. Honest limits:
The shell filter is best effort. For example,
node -ecan still write a file. Denying the file-edit tools is the part you can rely on; it is not a sandbox.Other MCP servers' tools are not gated.
Upgrading from 0.1.2 or earlier: run
modedial install claude-codeagain. Before 0.1.3 the agent could switch a guard off by callingend_modeorset_modeitself."Needs your approval" prompts you in an interactive session. In headless runs it simply does not apply the edit.
The "verify" and "tell" nudges happen once per round, so a stubborn agent can still finish. They improve the odds, they are not a lock.
Each hook is a short Node process. On the Windows machine this was measured on, where Node itself takes about 360 ms to start, a hook added roughly 100 ms per edit or command. Expect less on a faster setup. Through
npxinstead of a global install the same call took about 3.4 s, which is why the Claude Code installer asks fornpm install -g modedialfirst and refuses to writenpxhooks.Hooks only run if you install them. Without them the guards are not enforced, and the modes behave as plain instructions.
Other agents have their own installers (see the table below). Claude Code has the hooks above, and opencode's reviewer agent has its edit tools switched off. Roo Code modes declare tool limits, which we have not run. Elsewhere the guards are written into the mode as plain rules.
Setup for every agent
npx modedial install # lists the supported agents and marks the ones it finds in your project
npx modedial install <agent> # writes that agent's native files (add --dry-run to preview, --user for global where it applies)
npx modedial uninstall <agent> # removes exactly what install addedEach agent gets files in the format it reads natively, so a mode is a real rule file, agent or custom mode in your tool, not only text from a tool call.
Agent | What | Real enforcement | How it was checked |
Claude Code | Hooks in | Yes (see above) | Real session, 3/3 scenarios |
opencode |
| Yes: Careful Reviewer's agent has write, edit and bash off | Real run: agents parsed, reviewer could not create a file, control agent could |
Codex CLI |
| Use | Real run: Codex read and used the block |
Roo Code |
| Yes: reviewer has only read and MCP tools; refactor cannot edit manifests | Format from Roo's docs; not run here |
Cursor |
| No (rules) | Format from Cursor's docs; not run here (MCP loading was verified earlier) |
Windsurf |
| No | Format from Windsurf's docs; not run here |
Cline |
| No | Format from docs; not run here |
Any |
| No | Same block Codex read |
GitHub Copilot (VS Code) |
| Reviewer limited to read and search tools | Unverified |
Gemini CLI |
| No | Unverified |
Kilo Code |
| Same as Roo | Unverified (file name not confirmed) |
Aider |
| No | Unverified (Aider has no MCP; you load it by hand) |
Where an agent cannot enforce a guard, install writes it into the mode as an explicit rule ("Do not finish until you have run something after your last edit"), so the agent at least knows it. Shared files (AGENTS.md, GEMINI.md, JSON configs) are edited in place with a marked block or one keyed entry, backed up once, and your other content is left alone. The modedial MCP server still needs adding to each agent; install prints or writes the config where it safely can.
Privacy
No telemetry. No network calls. Nothing leaves your machine unless you choose to share a card or recap.
The local log records only: schema version, timestamp, event (
set/end), mode id, and a random per-run session id. Never code, prompts, command text, file contents or the names of files that were edited.If you install the Claude Code hooks, a small per-session state file (
sessions/<id>.jsonin the same folder) holds the active mode id, any scope you declared for Deep Focus (the file or folder names you chose to name), an edit count and a few flags. It is deleted after 7 days and never uploaded.Location:
%APPDATA%\modedial(Windows),~/Library/Application Support/modedial(macOS),$XDG_DATA_HOME/modedialor~/.local/share/modedial(Linux). Override withMODEDIAL_HOME. Disable logging withMODEDIAL_NO_LOG=1.Modes are static and bundled in the package. They are never fetched from the network.
CLI
npx modedial list # show modes
npx modedial card # export the latest mode card (PNG, 1200x630)
npx modedial card --mode debug # render a card for any mode
npx modedial recap # recap from your local log, as text
npx modedial recap --image # recap as a PNG (1080x1350)Every set_mode also saves a mode card to cards/latest.png in the data folder below. Cards and recaps are drawn on your machine with bundled open-licensed fonts, so they look the same on every OS. Posting one is your choice; nothing is uploaded.
Settings
Variable | Effect |
| Use this folder for the log and cards |
| Do not write the local log |
| Do not save a card on |
| Show the project folder name in the card footer (off by default; drawn into the image only, never logged) |
Develop
npm install
npm test
npm run buildLicense
MIT
Available Tools
5 toolscurrent_modeA
Return the active mode, if any.
Inputs: no named parameters.
end_modeA
Leave the active mode and return to default behavior.
Inputs: no named parameters.
list_modesA
List the available agent modes (id, name, tagline).
Inputs: no named parameters.
recapA
Usage stats computed from the local log only (nothing is sent anywhere).
Inputs: no named parameters.
set_modeA
Activate a mode. Returns short instructions you should follow until end_mode is called or the user picks another mode.
Inputs: id, mode, scope.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: listing available modes, activating one, querying the active one, exiting the active mode, and retrieving local usage stats. There is no meaningful overlap between set_mode and end_mode or between list_modes and current_mode.
Most names follow a verb_noun or verb pattern (list_modes, set_mode, end_mode), but current_mode is a noun phrase and recap is a bare noun. These deviations are minor and still readable.
Five tools are well-scoped for a mode-management server. Each operation earns its place, and the set is neither too thin nor too heavy.
The mode lifecycle is fully covered: list available modes, activate a mode, check the current mode, and exit it. The recap tool adds useful local usage stats without creating gaps.
Maintenance
Related MCP Connectors
Governed app access for AI agents: 1,000+ apps & 12,000+ tools via Code Mode MCP.
Your AI mind directs coding agents; work reviewed against your memories: Claude Code, Codex, Cursor
Shared long-term memory & Stop-hook task handoff across Claude Code, Codex, Cursor, and mobile.
Adaptive plan/build/review cycles for AI coding assistants, persisted across sessions.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides access to a library of 18 specialized skills, project templates, and prompt patterns for Claude Code. It enables automated workflows for feature development, security audits, and system maintenance through multi-agent collaboration.6MIT
- FlicenseNot gradedqualityDmaintenanceAllows users to manage multiple remote AI coding agents from a single Claude Code session, with a controlled execution model where operations require moderator approval.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code and Claude Desktop to delegate coding tasks to any model available in OpenCode while Claude remains the orchestrator, planning work, reviewing diffs, and running tests. Supports synchronous and async delegation, model selection, session continuation, and permission-aware execution.6MIT
- AlicenseAqualityBmaintenanceEnables Claude Code to delegate easy and medium work to opencode agents with enforced routing modes, and to monitor, inspect, rename, and cancel opencode sessions across projects.10MIT