Skip to main content
Claude Code integrates with EISPATCH through a UserPromptSubmit block hook and an MCP stdio server. The hook launches the Local Composer, blocks execution until you approve, and dispatches via clipboard fallback because Claude Code does not expose a direct same-session prompt API.

Verified version

EISPATCH v1.1.0 is verified with Claude Code 2.1.332.

Installation

Run the installer from the cloned repository:
The installer supports an optional --target <dir> flag to install into an alternate home directory.

What the installer writes

The installer modifies three locations under the target home.
The EISPATCH skill file containing instructions and metadata for the Claude Code skill system.
Adds an MCP server entry under mcpServers.eispatch:
Existing servers are preserved; only the eispatch key is added or updated.
Merges a hooks.UserPromptSubmit entry:
Other hooks in settings.json are not touched.
Keep the cloned repository in place after installing. The installer references absolute paths inside it; moving the repo breaks the integration.
After installation the installer automatically runs a check and prints one of the following:

Check error messages

If verification fails, the installer prints one of these errors:

Hook flow

When you submit a prompt, the hook processes JSON from stdin containing prompt, session_id, and cwd. It then follows this flow:
1

Intercept

The hook matches the trigger prefix and determines EISPATCH should handle the prompt.
2

Launch Local Composer

A detached process spawns core/launch-local-composer.mjs with --host claude-code, the prompt, workspace path, and a temporary ready-file path.
3

Wait for ready signal

The hook waits up to 2.5 seconds for the ready file to contain url, port, and pid.
4

Block and respond

The hook outputs a block message with composerUrl so you can open the Local Composer.

Block output

When the Local Composer launches successfully, the hook outputs:
If the Local Composer fails to launch, the hook outputs:
The hook is registered with a timeout of 5 seconds and an empty matcher so it runs on every prompt (the prefix check is handled inside the script).

Clipboard fallback flow

1

Open composer

Click the URL from the block output, or start the composer manually with npm run preview.
2

Review and approve

Review capabilities, edit the final prompt, and click Approve.
3

Dispatch

Click Dispatch to copy the approved prompt to your clipboard.
4

Paste

Paste the compiled prompt into Claude Code. Prompts containing the compiled marker (<!-- DISPATCH_COMPILED_PROMPT) pass through the hook automatically.

Environment variables

Uninstall

Remove EISPATCH entries from Claude Code:
Uninstall removes only EISPATCH-owned entries. It does not remove other MCP servers, skills, or hooks.