Skip to main content
Glama
B-HS

message-container

by B-HS

message-container

一个用于读取 macOS Messages(chat.db) 并提供查询 API、Web 仪表盘和 MCP 的 Docker 容器单体仓库。

  • apps/server — Bun + Hono + Drizzle API 服务器。以只读方式挂载 ~/Library/Messages,增量同步到自有数据库(默认 MySQL · SQLite · PostgreSQL)。仅限查询(不可发送)

  • apps/web — Next.js(App Router) + shadcn + Tailwind v4 Web 仪表盘。通过服务器预取 + Hydration 从首次绘制即渲染数据,应用 flunti-otel 设计系统(方形·扁平·1px 细线)

  • 安全:在 Web 上设置初始密码后,服务器会签发 msg_ API 密钥,Web 以 httpOnly cookie 保存,仅通过代理调用 API

  • MCP:AI 客户端使用相同的 API 密钥连接 /mcp(Streamable HTTP)

快速开始

./scripts/smoke-test.sh          # docker compose 기동 + 상태 확인 (docker 만 있으면 됨)
open http://localhost:32000       # 웹에서 초기 패스워드 설정 → 대시보드

首先需要为 Docker Desktop/OrbStack 授予完全磁盘访问权限(Full Disk Access),才能读取实际的 chat.db。详细步骤请参阅 docs/setup.md、API 规范 docs/api.md、MCP 指南 docs/mcp.md、架构 docs/architecture.md。

Related MCP server: iMessage MCP

开发

bun install
bun run typecheck   # 전체 워크스페이스
bun run test        # 전체 워크스페이스
(cd apps/server && bun run dev)                                  # API :33000
(cd apps/web && MESSAGE_API_URL=http://localhost:33000 bun run dev) # 웹 :32000

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables reading, searching, and sending iMessages directly from MCP-compatible clients by accessing the local macOS iMessage database, supporting conversations, attachments, and both individual and group chats.
    836 npm
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Read-only MCP server for local macOS Messages database, enabling querying of chats, messages, attachments, and metadata.
    836 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to read the entire Apple Messages (iMessage/SMS) history on a Mac through a read-only, batched tool that supports listing chats, retrieving transcripts, polling recent messages, and searching message bodies via REST or streamable HTTP MCP.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables an agent to read the user's local Messages.app database on macOS, listing chats and threads and searching iMessage/SMS history entirely on localhost, with optional AppleScript sending gated behind an explicit flag. Access is read-only and scoped-shut by default, and replies can be optionally sent when send mode is enabled.
    4
    MIT