Roshi's Signal MCP
Read, search, export, redact, watch, and send Signal Desktop messages from any MCP-compatible AI.
Live read-only access to encrypted Signal Desktop databases and media, enforced by a lockable local privacy policy and declarative trigger engine.
Visit the documentation site · GitHub repository · Glama directory
Install · Supported AIs · Capabilities · Search & dates · Resumable exports · Privacy & redaction · Watch & triggers · MCP tools · CLI · Security · Verification
Install in seconds
Antigravity (one command)
agy plugin install RIAEvangelist/roshi-signal-mcp
Installs the full bundle automatically—all 21 MCP tools, the roshi-signal-mcp skill, and the bundled safety rules—and bootstraps an isolated Python environment on first run via bootstrap_mcp.py.
On Windows, if you cloned the repo locally (or want to also install native signal-cli in WSL2 for sending messages):
git clone https://github.com/RIAEvangelist/roshi-signal-mcp.git
cd roshi-signal-mcp
.\setup.ps1 -InstallPlugin -InstallSignalCli
(Omit -InstallSignalCli if you only need read, search, export, redaction, and watching.)
Works with every major AI
Because Roshi's Signal MCP speaks the open Model Context Protocol (MCP 2.x over stdio), the exact same 21 tools, ignore lists, redaction rules, and watch triggers work across every major AI coding and desktop assistant—plus standalone from your terminal with no AI at all.
| AI Client / Environment | Integration Type | Setup |
|---|---|---|
| Google Antigravity (App, CLI, IDE) | Native Plugin (MCP + Skill + Rules) | agy plugin install RIAEvangelist/roshi-signal-mcp |
| Claude Code | Native Plugin Marketplace (.claude-plugin/) |
/plugin marketplace add RIAEvangelist/roshi-signal-mcp then /plugin install roshi-signal-mcp |
| OpenAI Codex (CLI & App) | Native Plugin (.codex-plugin/) or MCP stdio |
codex plugin marketplace add RIAEvangelist/roshi-signal-mcp --sparse .agents/plugins or ~/.codex/config.toml |
| Claude Desktop / Cursor / Windsurf / Cline / Zed / Gemini CLI | Standard MCP stdio server | uvx --from git+https://github.com/RIAEvangelist/roshi-signal-mcp.git roshi-signal-mcp or python bootstrap_mcp.py |
| Standalone CLI (No AI required) | PowerShell / Python CLI | .\signal-cli-tool.ps1 <cmd> or python -m signal_mcp.cli <cmd> |
Copy-paste MCP & plugin installs
Claude Code (native plugin marketplace or CLI one-liner)
# Native plugin (bundles MCP server + skill)
/plugin marketplace add RIAEvangelist/roshi-signal-mcp
/plugin install roshi-signal-mcp
# Or register the MCP server directly via uvx (no git clone needed)
claude mcp add roshi-signal-mcp -- uvx --from git+https://github.com/RIAEvangelist/roshi-signal-mcp.git roshi-signal-mcp
OpenAI Codex (native plugin or ~/.codex/config.toml)
# Native plugin marketplace
codex plugin marketplace add RIAEvangelist/roshi-signal-mcp --sparse .agents/plugins
codex plugin install roshi-signal-mcp@roshi-signal-mcp-marketplace
Or add directly to ~/.codex/config.toml:
[mcp_servers.roshi-signal-mcp]
command = "uvx"
args = ["--from", "git+https://github.com/RIAEvangelist/roshi-signal-mcp.git", "roshi-signal-mcp"]
Claude Desktop / Cursor / Windsurf / Gemini CLI (JSON MCP config)
Zero-clone (uvx):
{
"mcpServers": {
"roshi-signal-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/RIAEvangelist/roshi-signal-mcp.git",
"roshi-signal-mcp"
]
}
}
}
Or from a local clone (no uv required):
{
"mcpServers": {
"roshi-signal-mcp": {
"command": "python",
"args": ["/path/to/roshi-signal-mcp/bootstrap_mcp.py"]
}
}
}
Manual Antigravity plugin install (macOS / Linux / Windows)
Copy the cloned roshi-signal-mcp directory into:
- Windows:
%USERPROFILE%\.gemini\config\plugins\roshi-signal-mcp - macOS / Linux:
~/.gemini/config/plugins/roshi-signal-mcp
On first launch, bootstrap_mcp.py creates an isolated venv at ~/.cache/roshi-signal-mcp/venv and installs sqlcipher3, cryptography, mcp, and qrcode[pil] automatically (logging setup output to stderr so stdout stays clean MCP JSON-RPC).
Roshi's Signal MCP (roshi-signal-mcp) reads your local Signal Desktop 7.x / 8.x database live in read-only WAL mode (while Signal Desktop stays open), decrypts version = 2 media attachments (attachments.noindex/), enforces strict per-user ignore lists and text/metadata redaction rules before any tool or export sees data, evaluates declarative watch/trigger rules for Antigravity or Codex, and optionally sends messages and files through a linked signal-cli device.
Capabilities at a glance
| Do this | Start here |
|---|---|
Search Signal chats directly with date ranges, regex, media filters, and ±N surrounding messages |
search_messages, get_messages |
| Export a chat and all decrypted images/PDFs/videos into JSON, Markdown, and a searchable HTML gallery | export_conversation |
| Resume an interrupted export, restore deleted/corrupt files, or backfill newly downloaded media | resume_export |
| Block sensitive chats, people, keywords, or regexes from ever being read, exported, watched, or messaged | manage_ignore_list, policy lock |
| Redact SSNs, cards, emails, phones, API keys, and custom terms across reads, exports, and filenames | manage_redaction_rules, test_redaction |
| Trigger auto-replies, incremental exports, Antigravity tasks, or Codex/CLI commands on incoming Signal messages | add_watch_rule, manage_signal_watcher |
Link signal-cli via browser QR code and send text or local file attachments by conversation name |
link_signal_device, send_signal_message |
Direct search and date ranges
Exporting an entire chat just to find a few messages is slow and creates unnecessary plaintext copies on disk. search_messages queries the live Signal Desktop SQLCipher database directly while still passing every hit through the privacy ignore list and redaction engine:
- Filters:
query(substring orregex=True),conversation,sender,has_media=True,since,until,offset, andlimit. - Surrounding context: pass
context_messages=2(0–10) to include the non-ignored, redacted messages immediately before and after each match—useful when a receipt image and its description arrive in separate messages. - Inclusive date ranges: date-only
untilfilters (YYYY-MM-DD) automatically resolve to23:59:59.999local time sosince="2026-06-01", until="2026-06-30"includes all of June 1 through all of June 30 acrossget_messages,search_messages, andexport_conversation. - Anti-oracle protection: search queries are re-verified post-redaction so searching for a redacted secret cannot be used to discover whether that secret exists in a chat.
Crash-safe, resumable exports
export_conversation decrypts local attachments from attachments.noindex/ into <output_dir>/media/ with chronological, collision-free filenames (YYYY-MM-DD_HHMMSS_<sender>_<id>_<idx>.<ext>) and original message timestamps (mtime), alongside messages.json, chat.md, a self-contained searchable index.html gallery, and manifest.json.
- Atomic writes: each decrypted media file is written to
<name>.partfirst and atomically renamed on completion, so interruptions never leave half-written corrupt images. - Interrupted & partial recovery:
manifest.jsonrecordsinProgress, saved export options (since,until,formats,mediaOnly), exported file keys, and previously missing/undownloaded attachment keys. - One-call resume & backfill: call
resume_export(output_dir)(or.\signal-cli-tool.ps1 resume-export <dir>) to:- Remove any leftover
.partfiles from an interrupted run. - Restore any exported media file that was deleted or corrupted on disk.
- Backfill attachments that were previously unavailable locally once Signal Desktop downloads them.
- Pick up newly arrived messages (pass
expand_until_to_now=Trueto extend a previously date-bounded export).
- Remove any leftover
Privacy, ignore list, and redaction
All privacy rules live privately outside the repository at ~/.roshi-signal-mcp/privacy_policy.json (override with ROSHI_SIGNAL_STATE_DIR) and are enforced at the lowest data-access layer (desktop_db.py, exporter.py, watcher.py, sender.py).
Strict ignore list
Block anything you cannot or do not want read, searched, exported, extracted, watched, or messaged:
| Category | What it blocks |
|---|---|
conversations |
Exact name, glob (Attorney*), UUID, group ID, or phone — completely hidden from list_conversations and raises PermissionError on read, export, extract, watch, or send. |
senders |
Person's name, phone, or ACI — hides their private DM and strips their messages and reactions from shared group chats. |
keywords |
Any message whose body, quote, caption, or attachment filename contains the term is omitted entirely. |
regexes |
Any message matching the pattern is omitted entirely. |
Text and metadata redaction
- Built-in presets:
ssn(SSN/ITIN),credit_card(Luhn-validated to avoid false positives on order/tracking numbers),email,phone,secrets(API keys, Bearer tokens, private key blocks),bank_account, andipv4. - Custom rules: literal terms (
add_term, optionalwhole_wordandcase_sensitive) and custom regexes (add_regex) with custom replacement labels such as[REDACTED:CLIENT]. - Text-only scope: redaction applies to message bodies, expanded long messages, quotes, attachment captions, attachment filenames, sender/conversation labels, exported transcripts (
messages.json,chat.md,index.html), exported media filenames, and watch payloads. Binary images and PDFs are not OCR-redacted. If you need to exclude media whenever a message triggers redaction, enableset_block_media_on_redacted(True)or place the chat/sender on the ignore list.
Tamper-resistant CLI lock
.\signal-cli-tool.ps1 policy lock
While locked, AI agents calling MCP tools can inspect the policy and add new ignore entries or redaction rules, but cannot remove ignore entries, disable redaction, or weaken presets (PolicyLockedError). Unlocking requires running .\signal-cli-tool.ps1 policy unlock directly from your shell (or editing ~/.roshi-signal-mcp/privacy_policy.json).
Watch and trigger automation
Store declarative rules in ~/.roshi-signal-mcp/watch_rules.json so Antigravity or Codex can react to incoming Signal messages automatically:
- Matchers:
conversation,sender,contains,regex,has_media,include_outgoing(falseby default to prevent reply loops), andcooldown_seconds. - Actions (one or more per rule; all template variables
{sender},{conversation},{body},{timestamp},{attachment_paths}andSIGNAL_*env vars are redacted first):reply— auto-reply on Signal viasignal-cliexport— incrementally export the chat and decrypted mediaantigravity_task— start a new Antigravity conversation via the localConversationServiceAPI with your prompt template and extracted attachment pathscommand— run any local CLI or script (e.g.codex exec, Python script, or webhook)
- Two ways to run:
- Live background watcher:
manage_signal_watcher(action="start", poll_interval_seconds=3)or.\signal-cli-tool.ps1 watch run - Scheduled / cursor-based check:
check_new_messages()orrun_watch_rules_once(dry_run=...)(pairs cleanly with Antigravity/scheduleor Task Scheduler/cron)
- Live background watcher:
Sending messages (optional)
Reading, searching, exporting, privacy filtering, and watching require only Signal Desktop. Sending messages and attachments uses signal-cli linked to your account as a secondary device:
- Ensure
signal-cliis installed (.\setup.ps1 -InstallSignalClion Windows WSL2,brew install signal-clion macOS, or~/.local/bin/signal-clion Linux). - Start pairing and scan the browser QR code in Signal (Phone) → Settings → Linked Devices → Link New Device:
.\signal-cli-tool.ps1 link --open --wait
(Or ask Antigravity to calllink_signal_device(open_browser=True).) - Sync your contacts and groups:
.\signal-cli-tool.ps1 sync
- Preview target resolution safely with
--dry-run(ordry_run=Truein MCP) before sending.
MCP tool surface
All 21 tools are exposed over standard MCP stdio (server.py):
| Category | Tool | Purpose |
|---|---|---|
| Read & Search | list_conversations |
List/filter non-ignored Signal Desktop chats & groups with message and local media counts |
get_messages |
Read messages from a chat with inclusive date range (since/until), has_media, and search |
|
search_messages |
Search directly in SQLite with date range, sender, media, regex, pagination, and ±N context |
|
extract_attachment |
Decrypt a single attachment by message_id to disk for direct inspection |
|
| Export & Resume | export_conversation |
Export messages + decrypted media to JSON, Markdown, and a searchable HTML gallery |
resume_export |
Recover interrupted exports, repair missing/corrupt files, and backfill newly downloaded media | |
| Privacy Policy | get_privacy_policy |
Inspect active ignore lists, redaction presets/rules, lock status, and policy path |
manage_ignore_list |
Add/remove ignored conversations, senders, keywords, or regexes (respects CLI lock) | |
manage_redaction_rules |
Toggle presets, literal terms, regexes, and block_media_on_redacted (respects CLI lock) |
|
test_redaction |
Preview redaction and ignore matching on sample text without touching Signal | |
| Watch & Triggers | list_watch_rules |
List configured Signal watch/trigger rules |
add_watch_rule |
Create a rule matching conversation/sender/text/media -> reply/export/task/command | |
toggle_watch_rule |
Enable or disable a watch rule by ID or name | |
delete_watch_rule |
Delete a watch rule by ID or name | |
check_new_messages |
Return only brand-new messages since the saved cursor | |
run_watch_rules_once |
Evaluate enabled rules once against new messages (supports dry_run=True) |
|
manage_signal_watcher |
Start, stop, inspect, or reset the cursor of the live background watcher | |
| Sending | signal_send_status |
Check signal-cli backend availability and linked account(s) |
link_signal_device |
Start Signal linked-device pairing and generate QR PNG + browser HTML page | |
sync_signal_account |
Sync contacts and groups from your primary phone into signal-cli |
|
send_signal_message |
Send text and/or local file attachments by chat name, phone, UUID, or group ID |
CLI reference
Run commands on Windows with .\signal-cli-tool.ps1 <command> (or cross-platform with python -m signal_mcp.cli <command>):
# List chats
.\signal-cli-tool.ps1 list --search "Family"
# Search directly with date range, sender filter, and ±2 context messages
.\signal-cli-tool.ps1 search "invoice" --conversation "Family Chat" --since 2026-06-01 --until 2026-06-30 --context 2
# Export a date range and later resume/backfill newly downloaded media
.\signal-cli-tool.ps1 export "Family Chat" --since 2026-01-01 --until 2026-06-30 --output "C:\Exports\Family_H1"
.\signal-cli-tool.ps1 resume-export "C:\Exports\Family_H1" --expand-until-to-now
# Configure ignore list & redaction, then lock policy from AI tampering
.\signal-cli-tool.ps1 ignore add conversations "Attorney*"
.\signal-cli-tool.ps1 ignore add senders "+15551234567"
.\signal-cli-tool.ps1 redact preset-on ssn
.\signal-cli-tool.ps1 redact preset-on secrets
.\signal-cli-tool.ps1 redact add-term "ClientName" --replacement "[REDACTED:CLIENT]" --whole-word
.\signal-cli-tool.ps1 policy lock
# Add a watch rule and run the live daemon
.\signal-cli-tool.ps1 watch add --name "Urgent Ack" --contains "urgent" --reply "Got it, {sender}!"
.\signal-cli-tool.ps1 watch run --interval 3
# Link signal-cli via browser QR and preview a send
.\signal-cli-tool.ps1 link --open --wait
.\signal-cli-tool.ps1 sync
.\signal-cli-tool.ps1 send "Family Chat" "Hello!" --dry-run
Storage, security, and trust boundary
- 100% local execution: Signal Desktop reading, SQLCipher decryption, attachment decryption, ignore-list filtering, and redaction run locally under your OS user session. Database keys (
encryptedKey/ SQLCipher hex key) and attachmentlocalKeyvalues stay in memory only and are never written to logs, exports, or config files. - External state paths: user exports default to
~/SignalExports/(override viaSIGNAL_EXPORT_DIR), privacy policies and watch state live in~/.roshi-signal-mcp/(override viaROSHI_SIGNAL_STATE_DIR), andsignal-clikeys remain insignal-cli's own data directory—keeping the plugin repository free of personal data. - Unencrypted exports: exported
messages.json,chat.md,index.html, andmedia/files are plaintext on disk once exported; store them in an appropriately protected folder. - Revocable sending:
signal-clioperates as a standard Signal linked device and can be unlinked at any time from Signal → Settings → Linked Devices. The bundled plugin safety rules (rules/AGENTS.md) instruct agents to confirm recipient, text, and attachments before sending and never attempt to bypass ignore-list errors.
Verification
The test suite uses an isolated temporary SQLCipher profile and never touches your real Signal Desktop data or ~/.roshi-signal-mcp/ configuration:
python -m unittest discover -s tests -v
Current automated suite (6 tests in tests/test_privacy_and_watch.py) verifies:
- Ignore-list enforcement across
list_conversations,get_messages,search_messages,extract_attachment,send_message, andadd_watch_rule. - Text/metadata redaction presets (including Luhn card validation and SSN/ITIN), custom terms/regexes, export leak checks (JSON, Markdown, HTML, media filenames), anti-oracle search behavior, and optional
blockMediaOnRedactedMessage. - CLI policy lock enforcement preventing MCP-level weakening while still allowing stricter additions.
- Watch rule matching, loop protection (
includeOutgoing=False), deduplication, and redacted command payloads. - Direct search filters (
since/untilinclusive end-of-day,sender,has_media,regex,context_messages). - Crash-safe
resume_exportrecovery of.partleftovers, deleted media files, and backfilled newly downloaded attachments.
License
MIT — see LICENSE.
Metadata
Release files for roshi-signal-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| roshi_signal_mcp-0.2.0.tar.gz | 61.6 kB | Without provenance | Details for roshi_signal_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| roshi_signal_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for roshi_signal_mcp-0.2.0-py3-none-any.whl |
Total release size: 119.9 kB
Release files / roshi_signal_mcp-0.2.0.tar.gz
| Download URL | roshi_signal_mcp-0.2.0.tar.gz |
|---|---|
| Size | 61.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca2fb1f5dea0f13989bcb1c61085309dcb1a2eb4cbe955e8d0a75472578b4fb7
|
|
BLAKE2b-256 checksum How to use checksums |
c7cc4923c320b1343e3775541d0bd943cb8e78e8784dee237abfa0c68c3254a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / roshi_signal_mcp-0.2.0-py3-none-any.whl
| Download URL | roshi_signal_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 58.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d16e0dd3c108ee49b6a74efcf360886eea4af9135739de6fb8b45dbf535236a6
|
|
BLAKE2b-256 checksum How to use checksums |
8e65fdb30a49a2527b190276760fcec1792da19c1b8e2d2f507772054daa2044
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for roshi-signal-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.