Manage AI coding sessions from an AI assistant with Happier

Connect a general AI assistant to Happier so it can list, summarize and, if allowed, message your Claude Code, Codex and OpenCode sessions, with permission approvals left to you.

Based on
CLI
0.2.17
Preview ref
a6f72a6

TL;DR

Install the Happier CLI on the machine where the assistant runs, sign it in with happier auth login and approve the one-time link in the Happier app, then register happier mcp serve as a stdio MCP server in the assistant. The assistant can then list sessions, read their status and summarize them. Pick how much it may do: watch only, assist or drive. Permission prompts from the coding agents should always come back to you. Monitoring works by polling on a schedule, because Happier has no push event stream yet.

The problem

Five coding agents running on two computers produce a lot of state. One is waiting on a permission prompt, one finished an hour ago, one is stuck in a loop. Checking each one means opening each session and reading back through the transcript.

A general AI assistant is good at exactly this kind of triage: read a pile of status, say what matters, and draft the next message. The missing piece is a safe way for that assistant to see and touch the sessions without handing it a shell on every machine.

Common approaches and their trade-offs

  • Paste transcripts into a chat: works once, but it is manual and goes stale immediately.
  • Give the assistant SSH access: it can see everything, and it can also do anything. Hard to scope, hard to audit.
  • Scripts around agent log files: each agent stores history differently, and the scripts break when formats change.
  • Happier as an MCP server: Happier is an open-source app that lets you run and orchestrate Claude Code, Codex and other agents cross-device, from your phone, desktop or the web. Its CLI can run as a stdio MCP server, so an assistant gets a defined set of session tools tied to your Happier account instead of a raw shell.

If you're new to Happier (what it is, and where to get it)

Happier is an open-source app that lets you run and orchestrate Claude Code, Codex, OpenCode and other agents cross-device, from your phone, desktop or the web.

The workflow here is: let an assistant read and summarize your Happier sessions through MCP, while the sessions, repos and tools stay on the machines that own them.

Get set up:

Who this is for

  • People running several agent sessions who want a summary instead of reading each transcript
  • Teams on Happier Cloud or a self-hosted relay
  • Anyone using an assistant that can spawn stdio MCP servers, such as the Happier Grok Bot template

Prerequisites

  • A Happier account with at least one machine and session
  • The Happier app on a phone, desktop or the web, to approve the sign-in link
  • An assistant or MCP host that can run a local command as an MCP server
  • For a private relay, network access from the assistant's machine to that relay (for example over Tailscale)

A workflow that works (step-by-step)

1) Install the CLI where the assistant runs

The MCP server runs on the same machine as the MCP host, with that host's local privileges. Install the CLI there:

curl -fsSL https://happier.dev/install | bash

On Windows use iwr https://happier.dev/install.ps1 -useb | iex. If the assistant runs in its own sandbox or VM, install it inside that environment, not on your laptop.

2) Pair it with your account

happier auth login

The CLI asks whether to approve with a web browser or the mobile app. The browser path prints a terminal-connect URL, the mobile path prints a QR code and deep link. Open it in the Happier app where you are already signed in and approve. The CLI never needs your secret key.

For a self-hosted relay, sign in against that server, for example happier --server-url https://relay.example.com --webapp-url https://app.example.com auth login. In a non-interactive setup, --wait-timeout <seconds> ends the request instead of waiting forever.

3) Register happier mcp serve

Add Happier as a stdio MCP server in the assistant's config:

{
  "mcpServers": {
    "happier": {
      "command": "happier",
      "args": ["mcp", "serve"]
    }
  }
}

Use an absolute path from which happier if the host does not share your shell's PATH. happier mcp serve ignores server-selection environment variables like HAPPIER_SERVER_URL on purpose, so for a self-hosted relay put the server flags in args (for example ["--server", "company", "mcp", "serve"]).

4) Choose a mode

The MCP server exposes tools such as session_list, session_status_get, session_message_send, session_stop and session_wait_idle, plus generic action tools. Decide up front which of them the assistant may use:

  • Watch only: list sessions and summarize status. No messages, no changes.
  • Assist: also draft messages or next steps, which you send or confirm.
  • Drive: the assistant may send messages and change session settings itself.

In every mode, permission prompts raised by the coding agents go to you. An assistant should not answer them on your behalf. The Happier Grok Bot template follows this rule and asks for your yes on each approval.

5) Verify it worked

Ask the assistant to list your sessions. If it returns them, auth and the MCP wiring are fine. Then ask for a short status summary of the active ones.

Monitoring is polling, not push

Happier does not yet push session events to an MCP host. An assistant that "watches" sessions does it by calling session_list or session_status_get on a schedule and comparing with the previous result. A push event stream with resume cursors is tracked in issue #795.

In practice this means:

  • Updates arrive at the polling interval, not instantly. A 5 to 15 minute interval is a reasonable trade-off for summaries.
  • For urgent prompts, keep Happier's own app notifications on. They are faster than any polling routine.
  • If the assistant should pick up work on a machine, the Happier daemon has to be running there. A routine can check happier daemon status and run happier daemon start when needed.

Why this works (and what breaks)

happier mcp serve uses the same action catalog as the app, CLI and voice surfaces, with the CLI's authenticated credentials. That gives the assistant a fixed, named set of tools instead of a shell.

It is also a privilege grant. Anything that can edit the MCP host's config can act as you in Happier. Treat that config like a shell profile.

The server is stdio only. A remote assistant cannot connect to it over the network today. It has to run on the same machine as the CLI. Authenticated remote transport is tracked in issue #794.

Common mistakes

  • Wrong lane in the config → happier, hprev and hdev are separate installs → use the command you signed in with.
  • Relying on HAPPIER_SERVER_URL → mcp serve ignores it → pass --server or --server-url in args.
  • Expecting instant alerts → monitoring is polling → keep app notifications for urgent prompts.
  • Letting the assistant approve permissions → defeats the point of the prompt → keep approvals with a person.

Troubleshooting

Symptom: tools fail with not_authenticated

Likely cause:

  • The CLI on the assistant's machine is not signed in, or is signed in to a different server.

Fix:

  1. Run happier auth login on that machine and approve the link in the app.
  2. Check that the server flags in args match the server you signed in to.

Symptom: the assistant cannot start the server

Likely cause:

  • happier is not on the host's PATH.

Fix:

  1. Run which happier and put the absolute path in command.

Symptom: the session list is empty

Likely cause:

  • The CLI is connected to another server or account than the app.

Fix:

  1. Compare the server profile in the CLI with the one shown in the app, then sign in again against the right one.

FAQ

Can the assistant approve permission prompts for me?

It should not. Keep permission approvals with you in the Happier app, in every mode.

Does this work with a self-hosted relay?

Yes. Sign in against the relay and pass the same server flags to mcp serve. For a private relay, the assistant's machine needs network access to it, for example through Tailscale.

Does the assistant get notified when a session changes?

No. It polls. Push events are tracked in issue #795.

mcpassistantsessionsautomation
Last updated: 2026-10-30