
MCP服务器+兼容OpenAI的shim,通过驱动真实登录的Chrome来使用Meta Muse(muse.ai,Hatch)。
概览
Muse 没有公开 API:它的聊天是 (wss://hatch.metaaivm.com/v1/noise,X25519 + HKDF + AES-GCM + Ed25519 噪声传输)。所以这次和 Playwright 合作的项目没有重新实现协议:应用自己执行所有加密,我们输入作曲器并阅读渲染后的回复。 还有一个小巧的(muse-cli.mjs)用于从脚本生成一次性生成。 这会驱动浏览器和Muse账号。它附带凭证,没有Chrome配置文件,也没有流量被捕获——你在第一次运行时登录自己的Meta账号。请参见免责声明。 - 通过 stdio —— 直接插入 Claude Desktop / Opencode / 任何 MCP 主机。- 带 (SSE)、正确 finish_reason 和 /v1 错误对象。- —— 向 Muse 开放 OpenAI 工具并恢复tool_calls。- —— 发送带有提示的图片/视频(MCP 文件、OpenAI image_url 部分、CLI -f)。—— 在任意 Muse 聊天中列出/打开/阅读/发送,并提取 Muse 生成的图片/视频(链接 + 下载)。
概述(AI 翻译)
使用Meta Muse——muse.ai“Hatch”代理——使用任何MCP客户端或任何兼容OpenAI的客户端,使用您自己的账户和配额。
Muse 没有公开 API:它的聊天是一个加密的 WebSocket(wss://hatch.metaaivm.com/v1/noise,X25519 + HKDF + AES-GCM + Ed25519 Noise 传输)。所以这个项目没有重新实现协议,而是用 Playwright 驱动你真实登录的 Chrome:应用自己完成所有加密,我们输入作曲器并阅读渲染后的回复。
这样你就有两扇前门:
| 前门 | 是什么 | 用它 |
|---|---|---|
| MCP 服务器(标准) | 7个工具:muse_status, muse_login, muse_new_chat, muse_chat, muse_read_last, muse_dump_dom, muse_close |
Claude Desktop,opencode,光标,任意MCP主机 |
| OpenAI 兼容 shim(HTTP) | GET /v1/models, POST /v1/chat/completions(流 + 非流,工具调用) |
任何 OpenAI SDK / @ai-sdk/openai-compatible 提供者 |
还有一个很小的CLI(muse-cli.mjs),用于从脚本生成一次性事件。
[!重要] 这会驱动你的浏览器和你的Muse账号。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Muse-Chat-MCP
Use Meta Muse — the muse.ai “Hatch” agent — from any MCP client or any OpenAI-compatible client, with your own account and quota.
Muse has no public API: its chat is an encrypted WebSocket (wss://hatch.metaaivm.com/v1/noise, an X25519 + HKDF + AES‑GCM + Ed25519 Noise transport). So instead of re‑implementing the protocol, this project drives your real, logged‑in Chrome with Playwright: the app performs all the crypto itself, and we type into the composer and read the rendered reply.
That gives you two front doors:
| Front door | What it is | Use it from |
|---|---|---|
| MCP server (stdio) | 7 tools: muse_status, muse_login, muse_new_chat, muse_chat, muse_read_last, muse_dump_dom, muse_close |
Claude Desktop, opencode, Cursor, any MCP host |
| OpenAI-compatible shim (HTTP) | GET /v1/models, POST /v1/chat/completions (stream + non-stream, tool calling) |
any OpenAI SDK / @ai-sdk/openai-compatible provider |
Plus a tiny CLI (muse-cli.mjs) for one-shot generation from scripts.
[!IMPORTANT] This drives your browser and your Muse account. It ships with no credentials, no Chrome profile, and no captured traffic — you sign in to your own Meta account on first run. See Disclaimer.
Features
- MCP tools over stdio — drop-in for Claude Desktop / opencode / any MCP host.
- OpenAI-compatible HTTP shim with real streaming (SSE), correct
finish_reason, and/v1error objects. - Prompt-injected tool calling — expose OpenAI
toolsto Muse and gettool_callsback. - Attachments — send images/video with a prompt (MCP
files, OpenAIimage_urlparts, CLI-f). - Sessions & media — list/open/read/send in any Muse chat, and pull out the images/videos Muse generates (links + download).
- Muse Manual — a living guide to Muse’s video/image/content capabilities at
manual/MUSE_MANUAL.md, regenerated withnode manual/interview.mjs. - Reuses your existing login via a dedicated Chrome profile, or attaches to a Chrome you already run with
--remote-debugging-port=9222. - Never kills your browser: when attached over CDP it only disconnects on close.
- Resilient: if the profile is locked by a running Chrome, it auto-attaches over CDP instead of failing.
- Correct streaming: only stable, monotonic text is emitted, so a rewrite mid-answer never duplicates.
- No browser download — it uses your installed Chrome via
playwright-core.
Requirements
- Node.js ≥ 18 (tested on v24).
- Google Chrome (or Edge) installed.
- A Meta account with access to Muse.
- Windows / macOS / Linux (paths in the examples are Windows; adjust for your OS).
Install
git clone https://github.com/duclm1x1/Muse-Chat-MCP.git
cd Muse-Chat-MCP
npm install
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"muse": {
"command": "node",
"args": ["/absolute/path/to/Muse-Chat-MCP/muse-server.mjs"],
"env": { "MUSE_PROFILE_DIR": "/absolute/path/to/Muse-Chat-MCP/.muse-profile" }
}
}
}