signal-mcp
signal-mcp
Signal Desktopの暗号化されたSQLiteデータベースを直接読み取り、オリジナルのPython版 signal-mcp-server よりも高度なクエリツールを提供するNode/TypeScript製の MCP サーバーです。
読み取り専用。 データベースは
readonly: trueおよびquery_only=ONで開かれます。サーバーがSignalのデータを変更することはありません。
要件
macOS(Signal Desktopがインストールされており、少なくとも一度サインインしていること)。
Node.js 20以上。
初回実行時にmacOSキーチェーンのプロンプトが表示されます。承認してください(今後確認を求められたくない場合は「常に許可」にチェックを入れてください)。サーバーはログインキーチェーンからSignalの
safeStorageパスワードを読み取り、SQLCipherキーを復号します。
Related MCP server: Cursor DB MCP Server
インストール
オプションA — GitHubからインストール(推奨)
npm経由でグローバルにインストールします。リポジトリの prepare スクリプトが自動的に tsc を実行するため、ビルド済みの dist/ は不要です。
npm install -g git+https://github.com/jagypus/signal-mcp.git次に、Claude Codeに登録します:
claude mcp add signal --scope user -- signal-mcp以上です。Claude Codeを開いて次のように試してみてください:"List my Signal chats."(Signalのチャットを一覧表示して)
後でアップデートする場合:
npm install -g git+https://github.com/jagypus/signal-mcp.git削除する場合:
claude mcp remove signal
npm uninstall -g signal-mcpオプションB — クローンしてビルド(開発用)
git clone https://github.com/jagypus/signal-mcp.git
cd signal-mcp
npm install
npm run build
claude mcp add signal --scope user -- node "$(pwd)/dist/index.js"オプションC — 手動設定
MCP設定を直接編集したい場合は、Claude CodeのMCPサーバー設定(例: ~/.claude.json の mcpServers ブロック、またはプロジェクトの .mcp.json)に以下を追加してください:
{
"mcpServers": {
"signal": {
"command": "signal-mcp"
}
}
}…または、クローンしたリポジトリのパスを使用する場合:
{
"mcpServers": {
"signal": {
"command": "node",
"args": ["/absolute/path/to/signal-mcp/dist/index.js"]
}
}
}確認
claude mcp listリストに signal が表示されるはずです。Claude Codeが既に実行中の場合は再起動し、チャットの一覧表示を依頼してください。
ツール
ツール | 目的 |
| 最終メッセージのメタデータを含む会話リストを表示。グループ/DM、メッセージ数、新着順でフィルタリング可能。 |
| 日付範囲、送信者、チャットフィルタを使用したチャット横断的なメッセージクエリ。 |
| 単一のチャット(IDまたは名前で指定)に絞った、上記と同じフィルタセット。 |
| 全メッセージ本文に対する全文検索に近い検索。 |
| 読み取り専用のSQLパススルー ( |
すべての入力はZodで検証されます。タイムスタンプはISO 8601形式で入出力されます。
フィルタリングルール
exclude_system(デフォルトtrue) はtype IN ('incoming','outgoing')のみを保持し、keychange、profile-change、group-v2-change、timer-notificationなどを除外します。only_with_body(デフォルトtrue) はbody IS NULLである添付ファイルのみ/リアクション/スタンプの行を除外します。sender:me(送信済み)、them(受信済み)、any(両方)。
開発
git clone https://github.com/jagypus/signal-mcp.git
cd signal-mcp
npm install
npm run build # compile to dist/
npm run dev # tsx, stdio (no build step)
npm run probe # dump schema/FTS/types against the live DB
npx tsx scripts/smoke.ts # exercise every tool against the live DBデータベースの開き方
macOS上のSignal Desktopは、SQLCipher v4データベースを ~/Library/Application Support/Signal/sql/db.sqlite に保存します。最近のSignalバージョンでは、SQLCipherキーはElectronの safeStorage を使用して config.json 内の encryptedKey に暗号化されて保存されています:
v10/v11プレフィックスを削除 → AES-128-CBC暗号文。暗号化キー = PBKDF2-HMAC-SHA1(password, "saltysalt", 1003回反復, 16バイト)。
macOSでは、
passwordはsecurity find-generic-password -s "Signal Safe Storage" -a "Signal" -wを介して取得されます(初回のみキーチェーンのプロンプトが表示されます)。IVは
0x20の16バイトです。
平文は64文字の16進数SQLCipherキーです。config.json に平文の key が含まれる古いSignalビルドもサポートされています。
データベースは better-sqlite3-multiple-ciphers を使用して readonly: true モードで開かれ、念のため query_only=ON が設定されます。SQLCipherはWALを使用しているため、Signal Desktopの実行中に開いても問題ありません。
検索に関する注意点
messages_fts は存在しますが、Signal Desktopのネイティブコードでのみ登録されるカスタムの signal_tokenizer を使用しています。サードパーティのリーダーはそれに対して MATCH クエリを実行できないため、search_messages は一度試行し、失敗した場合は自動的に body LIKE '%query%' にフォールバックします。
環境変数
変数 | 効果 |
| デフォルトのSignalデータディレクトリを上書きします(フィクスチャに便利)。 |
| 64文字の16進数SQLCipherキー。 |
クロスプラットフォームに関する注意点
macOS: 対応済み。
Linux:
safeStoragev10はリテラルパスワードpeanutsを使用します。v11 (libsecret/KWallet) は未実装です。SIGNAL_KEYを明示的に設定してください。Windows: 未実装です。
SIGNAL_KEYを明示的に設定してください。
プロジェクト構成
src/
index.ts # MCP server bootstrap
db.ts # connection + safeStorage key decryption
schema.ts # zod input shapes
util/
time.ts # iso <-> ms
messages.ts # row shaping, display name resolution
sql.ts # shared filter SQL
tools/
listChats.ts
getRecentMessages.ts
getChatMessages.ts
searchMessages.ts
querySql.ts
scripts/
probe.ts # live-DB schema dump
smoke.ts # live-DB end-to-end checkライセンス
MIT — LICENSE を参照してください。
このプロジェクトはSignal Messenger LLCと提携しておらず、承認も受けていません。 Signal Desktop自体はAGPL-3.0の下でライセンスされています。このプロジェクトはSignalのコードを再配布または変更するものではなく、ユーザー自身のマシン上でSignal Desktopが作成したローカルのSQLiteデータベースを読み取るだけです。
This server cannot be deployed
Maintenance
Related MCP Connectors
Explore your Messages SQLite database to browse tables and inspect schemas with ease. Run flexible…
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to local Beeper message history on macOS, enabling users to search conversations, read messages, and list recent chats through natural language queries. Supports both SQLite and IndexedDB storage formats with privacy-focused local-only operation.1-
- AlicenseNot gradedqualityDmaintenanceEnables querying, searching, and analyzing Cursor IDE conversation history from SQLite workspaceStorage databases. Supports exporting chat data in multiple formats and provides workspace utilities for managing conversation data across projects.MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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.1,108 npm10MIT
- AlicenseAqualityAmaintenanceProvides read-only access to local iMessage databases on macOS for searching message history and analyzing conversation patterns. It includes 25 tools to explore contacts, attachments, reaction statistics, and messaging trends through natural language queries.261,108 npm25MIT