Happy Server MCP

Happy Server MCP

Enables programmatic interaction with Happy AI sessions, allowing users to list, create, monitor, send messages to, and manage AI coding sessions across multiple machines.

Category
访问服务器

README

Happy Server MCP

MCP (Model Context Protocol) server for managing Happy AI sessions. This allows AI agents to interact with Happy sessions programmatically.

Features

  • List Sessions: Query all your Happy AI sessions with their titles, working directories, and activity status
  • List Machines: See all registered machines and their online/offline status
  • List Recent Paths: Get recently used working directories for a machine
  • Read Messages: Fetch recent messages from any session to see conversation history
  • Send Messages: Trigger a session to work by sending it a message
  • Start Sessions: Spawn new AI sessions on any connected machine
  • Archive Sessions: Stop and archive sessions when done
  • Wait for Idle: Wait for a session to finish processing

Installation

npm install -g @zhigang1992/happy-server-mcp

Prerequisites

You must be authenticated with Happy CLI. Run:

happy auth

This creates credentials at ~/.happy/access.key that the MCP server uses.

Usage with Claude

Add to your Claude configuration:

{
  "mcpServers": {
    "happy-manager": {
      "command": "happy-server-mcp"
    }
  }
}

Or with npx:

{
  "mcpServers": {
    "happy-manager": {
      "command": "npx",
      "args": ["@zhigang1992/happy-server-mcp"]
    }
  }
}

Available Tools

happy_list_sessions

List all Happy AI sessions. Returns session IDs, titles, paths, machines, and activity status.

Parameters:

Name Type Required Default Description
limit number No 50 Maximum number of sessions to return

Example:

Use happy_list_sessions to see all my active sessions

happy_list_machines

List all machines registered with Happy. Returns machine IDs, hostnames, platforms, and activity status.

Parameters: None

Example:

Use happy_list_machines to see which machines are online

happy_list_recent_paths

List recently used folder paths for a machine. Useful for starting sessions in familiar locations.

Parameters:

Name Type Required Default Description
machine_id string Yes - The machine ID to get recent paths for
limit number No 20 Maximum number of paths to return

Example:

Use happy_list_recent_paths with machine_id "abc123" to see recent working directories

happy_read_messages

Read recent messages from a Happy AI session. Use this to see the conversation history.

Parameters:

Name Type Required Default Description
session_id string Yes - The session ID to read messages from
limit number No 20 Maximum number of messages to return

Example:

Use happy_read_messages with session_id "xyz789" to see what the AI has been working on

happy_send_message

Send a message to a Happy AI session to trigger it to work. The message will be sent with bypass permissions mode.

Parameters:

Name Type Required Default Description
session_id string Yes - The session ID to send the message to
message string Yes - The message text to send
wait boolean No false If true, wait for AI to finish processing before returning

Example:

Use happy_send_message with session_id "xyz789" and message "Fix the bug in auth.ts" and wait=true

happy_start_session

Start a new Happy AI session on a machine. Use happy_list_machines to find available machines first.

Parameters:

Name Type Required Default Description
machine_id string Yes - The machine ID to start the session on
directory string Yes - The directory path to run the session in
message string No - Optional initial message to send to start the session working
agent "claude" | "codex" No "claude" Agent type to use
wait boolean No false If true, wait for AI to finish processing initial message before returning

Example:

Use happy_start_session with machine_id "abc123", directory "/home/user/project",
message "Review the codebase and suggest improvements", and wait=true

happy_archive_session

Archive (stop) a Happy AI session. The session will be terminated and marked as inactive.

Parameters:

Name Type Required Default Description
session_id string Yes - The session ID to archive

Example:

Use happy_archive_session with session_id "xyz789" to stop the session

happy_wait_for_idle

Wait for a Happy AI session to become idle (finish processing). Useful after sending a message to wait for AI to complete its work.

Parameters:

Name Type Required Default Description
session_id string Yes - The session ID to wait for
timeout_seconds number No 120 Maximum time to wait in seconds

Example:

Use happy_wait_for_idle with session_id "xyz789" to wait for the AI to finish

Common Workflows

Start a session and wait for completion

  1. Use happy_list_machines to find an online machine
  2. Use happy_list_recent_paths to find a good working directory
  3. Use happy_start_session with wait=true to start and wait for the initial task

Monitor an existing session

  1. Use happy_list_sessions to find active sessions
  2. Use happy_read_messages to see what the AI is working on
  3. Use happy_send_message to give it new instructions

Clean up old sessions

  1. Use happy_list_sessions to see all sessions
  2. Use happy_archive_session to stop sessions you no longer need

Environment Variables

  • HAPPY_SERVER_URL: Override the Happy server URL (default: https://happy.engineering)

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选