signal-api-mcp 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +94 -0
  3. package/dist/index.js +24459 -0
  4. package/package.json +49 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BarbellDwarf
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # signal-api-mcp
2
+
3
+ A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for Signal. It talks to a
4
+ [signal-cli-rest-api](https://github.com/bbernhard/signal-cli-rest-api) instance and gives an AI
5
+ agent a working Signal toolset: send and receive messages, manage groups and contacts, update your
6
+ profile, and register or link a number.
7
+
8
+ The build produces one self-contained JavaScript file. The server needs nothing but a Node runtime
9
+ and a few environment variables, so it runs on a laptop just as well as on a remote MCP gateway like
10
+ [MetaMCP](https://metamcp.io).
11
+
12
+ ## Quick start
13
+
14
+ Run signal-cli-rest-api in Docker, link or register a Signal number, then install and start the
15
+ server. The full walkthrough is in [docs/quickstart.md](docs/quickstart.md).
16
+
17
+ ```bash
18
+ # 1. signal-cli-rest-api
19
+ docker run -d --name signal-api --restart=always -p 8080:8080 \
20
+ -e 'MODE=json-rpc' bbernhard/signal-cli-rest-api
21
+
22
+ # 2. install the server
23
+ npm install -g signal-api-mcp
24
+
25
+ # ⚠ The npm package named "signal-mcp-server" is an unrelated project.
26
+ # Do not install it by mistake.
27
+
28
+ # 3. run it
29
+ SIGNAL_API_URL=http://localhost:8080 \
30
+ SIGNAL_NUMBER=+15551234567 \
31
+ signal-api-mcp
32
+ ```
33
+
34
+ ## Configuration
35
+
36
+ The server reads its configuration from environment variables. `SIGNAL_API_URL` points at your
37
+ signal-cli-rest-api instance, `SIGNAL_NUMBER` sets the default account, and `SIGNAL_TRANSPORT`
38
+ picks between stdio and streamable HTTP. [docs/configuration.md](docs/configuration.md) covers
39
+ every variable in detail.
40
+
41
+ | Variable | Default | What it does |
42
+ |---|---|---|
43
+ | `SIGNAL_API_URL` | `http://localhost:8080` | Base URL of signal-cli-rest-api. |
44
+ | `SIGNAL_NUMBER` | empty | Default account used when a tool omits `number`. |
45
+ | `SIGNAL_TRANSPORT` | `stdio` | `stdio` or `http`. |
46
+ | `HOST` | `127.0.0.1` | Bind host for the HTTP transport. |
47
+ | `PORT` | `3000` | Bind port for the HTTP transport. |
48
+ | `SIGNAL_API_TOKEN` | empty | Optional bearer token for the HTTP endpoint. |
49
+ | `SIGNAL_MAX_BODY_BYTES` | `10485760` | Largest POST body the HTTP endpoint accepts, larger requests get a 413. |
50
+ | `SIGNAL_SESSION_TTL_SECONDS` | `3600` | Seconds an HTTP session may sit idle before the server closes it. |
51
+ | `SIGNAL_ALLOWED_HOSTS` | empty | Comma-separated Host header allowlist for the HTTP endpoint. Empty derives one from the bind host and port. |
52
+ | `LOG_LEVEL` | `info` | `debug`, `info`, `warn`, or `error`. |
53
+ | `SIGNAL_ALLOWED_RECIPIENTS` | empty | Comma-separated allowlist of recipients `send_message` may target. |
54
+ | `SIGNAL_DISABLED_TOOLS` | empty | Comma-separated list of tool names to remove from the MCP surface. |
55
+
56
+ ## The tools
57
+
58
+ The server exposes fifteen MCP tools. `send_message` and `receive_messages` handle messaging.
59
+ `list_accounts`, `list_contacts`, and `list_groups` show you what the account can reach. The
60
+ remaining tools cover groups, profiles, registration, linking, and the health endpoints. Every tool
61
+ maps to one signal-cli-rest-api endpoint, and [docs/tools.md](docs/tools.md) documents them all.
62
+
63
+ ## Security
64
+
65
+ The HTTP transport binds to `127.0.0.1` by default and accepts an optional bearer token, a
66
+ recipient allowlist for `send_message`, DNS rebinding protection, body size limits, and session
67
+ expiry. CI runs an audit gate on every pull request. [SECURITY.md](SECURITY.md) has the
68
+ vulnerability reporting policy, and [docs/security.md](docs/security.md) covers the threat model.
69
+
70
+ ## Guides
71
+
72
+ - [Quick start](docs/quickstart.md)
73
+ - [Configuration](docs/configuration.md)
74
+ - [Tools](docs/tools.md)
75
+ - [Transports and remote hosting](docs/transports.md)
76
+ - [Security](docs/security.md)
77
+ - [Development](docs/development.md)
78
+
79
+ ## For AI agents
80
+
81
+ If you are an agent that will call these tools, read
82
+ [docs/agents/AGENTS.md](docs/agents/AGENTS.md) first. It explains the tool set, the default-number
83
+ behavior, and the rules around sending.
84
+
85
+ ## Disclaimer
86
+
87
+ This project comes with no warranty. It is provided as-is, and the authors accept no responsibility
88
+ for anything that happens when you use it. Signal messages are real and immediate, and an AI agent
89
+ can make mistakes. Treat the agent's output as untrusted, guardrail it, and review what it sends
90
+ before it goes out. You are responsible for how you use this software.
91
+
92
+ ## License
93
+
94
+ MIT