An MCP client that uses signal for sending and receiving texts.
Project description
Signal MCP Client
An MCP (Model Context Protocol) client that uses Signal for sending and receiving texts.
Setup The Signal Chat Bot
These Instructions are for Linux. With some minor modification this should also work on a Mac or Windows. I recommend to use an extra phone number for the bot, so you don't have to use your own.
- Clone the repository and navigate into the directory:
git clone https://github.com/piebro/signal-mcp-client.git cd signal-mcp-client
- Save your Anthropic API key, the bot's phone number and optionally for voice messages your FAL API key in
.env:cat << EOF > .env ANTHROPIC_API_KEY='your-key' SIGNAL_PHONE_NUMBER='+1234567890' FAL_API_KEY='your-key' EOF
- Rename
example.config.jsontoconfig.json. You can add more MCP servers to it later.mv example.config.json config.json
- Install uv and podman:
sudo apt install podman curl -LsSf https://astral.sh/uv/install.sh | sh
- Start the Signal CLI Rest Server container:
mkdir -p $HOME/.local/share/signal-api podman run \ --name signal-cli-api \ --replace \ -p 8080:8080 \ -v $HOME/.local/share/signal-api:/home/.local/share/signal-cli \ -e 'MODE=json-rpc' \ docker.io/bbernhard/signal-cli-rest-api:latest-dev
- Connect the signal-cli-rest-api container to your signal account by opening this link and scanning the QR code:
http://localhost:8080/v1/qrcodelink?device_name=signal-api - Start the MCP client:
uv run signal_mcp_client/main.py
Adding MCP Server
Add the MCP server in the config.json file.
Here are some example servers I use:
- vlc-mcp-server: An MCP Server to play and control local movies using VLC.
- fal-ai-mcp-server: An MCP Server to use the fal.ai APIs to generate images and videos.
Contributing
Contributions to this project are welcome. Feel free to report bugs, suggest ideas, or create merge requests.
Development
Installation from source
- Clone the repo
git clone git@github.com:piebro/signal-mcp-client.git. - Go into the root dir
cd signal-mcp-client. - Install in development mode:
uv pip install -e .
Formatting and Linting
The code is formatted and linted with ruff:
uv run ruff format
uv run ruff check --fix
Building with uv
Build the package using uv:
uv build
Releasing a New Version
To release a new version of the package to PyPI, create and push a new Git tag:
git tag v0.2.0
git push origin v0.2.0
Running as a Systemd Service
To ensure the Signal REST API and the MCP Client run automatically on boot and restart if they fail, you can set them up as systemd user services. User services run under your specific user account.
This setup assumes that you have completed the setup steps and your project is located at /home/$USER/signal-mcp-client.
-
Enable User Lingering to keep your user session active after logging out.
sudo loginctl enable-linger $USER
-
Create Systemd Service Directory
mkdir -p /home/$USER/.config/systemd/user/
-
Create Service File for Signal REST API
cat << EOF > "/home/$USER/.config/systemd/user/signal-cli-rest-api.service" [Unit] Description=Signal CLI REST API Container After=network.target Wants=network-online.target [Service] Environment="XDG_RUNTIME_DIR=/run/user/%U" Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus" SyslogIdentifier=signal-cli-rest-api Restart=on-failure RestartSec=30 ExecStartPre=-/usr/bin/podman stop signal-cli-api ExecStartPre=-/usr/bin/podman rm signal-cli-api ExecStart=/usr/bin/podman run --name signal-cli-api \\ -p 127.0.0.1:8080:8080 \\ --replace \\ -v /home/$USER/.local/share/signal-api:/home/.local/share/signal-cli \\ -e MODE=json-rpc \\ docker.io/bbernhard/signal-cli-rest-api:latest ExecStop=/usr/bin/podman stop signal-cli-api [Install] WantedBy=default.target EOF
-
Create Service File for Signal MCP Client
cat << EOF > "/home/$USER/.config/systemd/user/signal-mcp-client.service" [Unit] Description=Signal MCP Client Application After=network.target signal-cli-rest-api.service Wants=signal-cli-rest-api.service [Service] WorkingDirectory=/home/$USER/signal-mcp-client EnvironmentFile=/home/$USER/signal-mcp-client/.env Environment="PATH=/usr/bin:/home/$USER/.local/bin:%{PATH}" SyslogIdentifier=signal-mcp-client Restart=on-failure RestartSec=30 ExecStart=/home/$USER/.local/bin/uv run signal_mcp_client/main.py [Install] WantedBy=default.target EOF
-
Enable and Start the Services
systemctl --user daemon-reload systemctl --user enable signal-cli-rest-api.service systemctl --user enable signal-mcp-client.service systemctl --user start signal-cli-rest-api.service systemctl --user start signal-mcp-client.service
-
Check Service Status and Logs
systemctl --user status signal-cli-rest-api.service systemctl --user status signal-mcp-client.service journalctl --user -u signal-cli-rest-api.service -f journalctl --user -u signal-mcp-client.service -f
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file signal_mcp_client-0.1.0.tar.gz.
File metadata
- Download URL: signal_mcp_client-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
361901cc7f751202304b949e3bae5838c3b258a8ffdf068d9c37832610577feb
|
|
| MD5 |
cd0d649bcbef6bf32b6f2e714b3c1bf1
|
|
| BLAKE2b-256 |
ef8698f5f7cb50a4353c16e971d7df169e235d1599b648c36e4f984c1725193e
|
Provenance
The following attestation bundles were made for signal_mcp_client-0.1.0.tar.gz:
Publisher:
publish.yml on piebro/signal-mcp-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
signal_mcp_client-0.1.0.tar.gz -
Subject digest:
361901cc7f751202304b949e3bae5838c3b258a8ffdf068d9c37832610577feb - Sigstore transparency entry: 203147059
- Sigstore integration time:
-
Permalink:
piebro/signal-mcp-client@a7b2f3dc2a2230b51d49775d87e126381c5972e9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/piebro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a7b2f3dc2a2230b51d49775d87e126381c5972e9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file signal_mcp_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: signal_mcp_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bceb637df96a9b8879d732395de5d96e96afcbda8a8b196d93662e9165c2dc95
|
|
| MD5 |
c27ca3d260a4c5afb7aa606f306dc3b0
|
|
| BLAKE2b-256 |
676d5238f3813652c266bac687a70b9a61e0b160bb6ecdeff11ffbe73c5741f5
|
Provenance
The following attestation bundles were made for signal_mcp_client-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on piebro/signal-mcp-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
signal_mcp_client-0.1.0-py3-none-any.whl -
Subject digest:
bceb637df96a9b8879d732395de5d96e96afcbda8a8b196d93662e9165c2dc95 - Sigstore transparency entry: 203147061
- Sigstore integration time:
-
Permalink:
piebro/signal-mcp-client@a7b2f3dc2a2230b51d49775d87e126381c5972e9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/piebro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a7b2f3dc2a2230b51d49775d87e126381c5972e9 -
Trigger Event:
push
-
Statement type: