JackyJacky

Jacky integrates with Claude Code through three complementary mechanisms:

  1. Lifecycle hooks — Claude Code fires events as you work; Jacky reacts with emotions and speech automatically.
  2. MCP tool server — Claude Code can call Jacky tools (speak, notify, emote, run routines, and more) via the Model Context Protocol.
  3. Managed instructions — A marker block in CLAUDE.md tells Claude Code about Jacky's capabilities.

All three are set up with a single command: jacky claude install.


Quick Start

# 1. Launch the Jacky desktop app
jacky
 
# 2. One-command setup
jacky claude install
 
# 3. Restart Jacky to activate the WebSocket + MCP servers

That's it. Claude Code will now trigger Jacky reactions automatically, and can call Jacky tools via MCP.

Warning

Restart required: After running jacky claude install, restart the Jacky desktop app so the WebSocket and MCP servers start with the new configuration.


Lifecycle Hooks

How It Works

As you use Claude Code, it fires lifecycle events at key moments. Jacky listens to these events and reacts in real time on your desktop:

EventJacky's ReactionWhat It Means
User submits a prompt🤔 ThinkingYou sent a prompt to Claude Code
Agent starts using a tool🔧 WorkingClaude Code is executing a tool
Agent requests permission⚠️ AlertingClaude Code needs your approval
Agent sends a notification⚠️ AlertingClaude Code has a notification for you
Agent finishes successfully😊 HappyTask completed without errors
Agent finishes with error😢 HurtSomething went wrong

Throttling

To avoid overwhelming you with reactions during rapid agent activity (e.g. multiple tool calls in quick succession), Jacky applies smart cooldowns:

Cooldown TypeDurationDescription
Reaction10 secondsSame reaction won't re-trigger within 10s
Speech20 secondsSame speech category won't fire within 20s
Permission3 secondsPermission events fire more frequently

If Jacky seems quiet during intense coding sessions, this is normal — the throttling prevents reaction spam.


MCP Tool Server

Jacky runs a Model Context Protocol server using the streamable HTTP transport, bound to 127.0.0.1 (localhost only) for security.

Available MCP Tools

Once connected, Claude Code can call these Jacky tools:

ToolDescription
jacky_saySpeak text aloud with voice and show a speech bubble
jacky_notifyShow a system tray notification (no voice)
jacky_emoteChange Jacky's animation/emotion state
jacky_react_toHave Jacky react to text with an AI-generated response
jacky_askSend text through Jacky's full agent pipeline
jacky_run_routineRun a Jacky routine by ID with optional variables
jacky_set_timerCreate a countdown timer
jacky_set_alarmCreate an alarm clock
jacky_statusGet Jacky's current status (state, LLM, TTS, version)
jacky_move_toWalk Jacky to absolute screen coordinates (pixels)
jacky_moveWalk Jacky a relative distance in pixels (left/right/up/down/top/bottom)

Security

  • The server is bound to localhost only (127.0.0.1) — not accessible from other machines
  • Optional Bearer token authentication (stored securely in your OS keyring)
  • Allowed actions are configurable — you choose which tools external agents can use
  • Error messages are sanitized before reaching the AI agent (no file paths, tokens, or tracebacks leaked)

Managed Instructions (CLAUDE.md)

When you run jacky claude install, Jacky injects a managed block into your CLAUDE.md file that tells Claude Code about Jacky's presence and how to interact with it:

<!-- BEGIN JACKY:MANAGED -->
## Jacky Desktop Pet Integration
 
Jacky is a desktop pet that reacts to your coding activity in real time.
When you use Claude Code, Jacky will automatically emote and react to
lifecycle events (thinking, working, success, errors).
 
To control Jacky programmatically, use the `jacky` CLI:
 
- `jacky say "text"` — make Jacky say something
- `jacky emote happy` — set Jacky's emotion
- `jacky status` — check if Jacky is running
 
These hooks are managed by `jacky claude`. Do not edit the marker block.
Run `jacky claude uninstall` to remove.
<!-- END JACKY:MANAGED -->

Jacky looks for CLAUDE.md in this order:

  1. ./CLAUDE.md (current project directory — project-local)
  2. ~/.claude/CLAUDE.md (global)

The managed block is replaced on re-install (idempotent). Only one block is ever present.


CLI Commands

jacky claude install

One-command setup. Performs all of the following automatically:

StepWhat it does
Enable serversActivates the WebSocket and MCP servers in Jacky's configuration
Grant permissionsEnables the necessary permissions for external control
Write hooksAdds Jacky hook entries to Claude Code's settings
Write instructionsInjects a managed block into CLAUDE.md
Register MCPRegisters Jacky as an MCP server with Claude Code

jacky claude uninstall

Removes everything: hooks from Claude Code's settings, the managed block from CLAUDE.md, and the MCP server registration.

jacky claude --doctor

Health check that verifies:

  • Claude Code hooks are present for all lifecycle events
  • CLAUDE.md contains the Jacky managed block
  • Jacky desktop app is running
  • jacky CLI is on your PATH
  • Configuration has the necessary servers enabled
  • Required permissions are granted

jacky claude mcp install

Registers Jacky as an MCP server with Claude Code only (no hooks or config changes). This is called automatically by jacky claude install, but can be run standalone.

jacky claude mcp uninstall

Removes the Jacky MCP server registration from Claude Code.

jacky claude mcp --doctor

Checks MCP-specific health: Claude CLI availability, Jacky MCP registration, and whether the Jacky desktop app is running.

Full CLI Command Reference


Troubleshooting

Jacky doesn't react to Claude Code events

  1. Run jacky claude --doctor — check for any issues
  2. Verify Jacky desktop app is running: jacky status
  3. Restart Jacky after running jacky claude install
  4. Check that the hooks were written to Claude Code's settings

MCP tools not available in Claude Code

  1. Run jacky claude mcp --doctor
  2. Verify Jacky appears in claude mcp list
  3. Restart Jacky after enabling the MCP server
  4. Verify the MCP server is running on the expected port

Jacky seems quiet during rapid activity

This is likely throttling — Jacky intentionally limits reaction frequency to avoid spam. Throttle state is persisted locally and resets automatically over time. You can delete the throttle file to reset all cooldowns immediately.

Manual MCP registration

If jacky claude mcp install fails (e.g. claude CLI not on PATH), you can register manually:

claude mcp add --scope user --transport http jacky http://127.0.0.1:9877/mcp