devgate
Provides two-way Telegram integration for sending notifications, requesting mobile approvals, asking questions with options, and running whitelisted preset commands through a configured bot and allowed chat.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
devgate
Local-first approval gate, command wrapper, and MCP bridge for AI coding agents over Telegram, Unix domain sockets, and SQLite.
Requirements
Linux (
x64orarm64)Bun >= 1.2 (when building or running from source)
Related MCP server: Telegram Notifier MCP Server
Install
Download the devgate-linux-x64 or devgate-linux-arm64 binary from GitHub Releases and place it on your PATH (for example ~/.local/bin/devgate), or build from source:
bun install
bun x tsc --noEmit
bun test
bun build src/index.ts --compile --outfile dist/devgatePlace dist/devgate on your PATH (for example ~/.local/bin/devgate).
Setup
Create a Telegram bot via
@BotFatherand note your numeric chat ID.Initialize configuration (
~/.config/devgate/config.tomlwith mode0600) and optionally generate a systemd user unit:
devgate init --systemdStart the local daemon:
devgate daemon start
devgate daemon statusIf using systemd user services:
systemctl --user daemon-reload
systemctl --user enable --now devgate.serviceCLI Usage
# Wrap a command and notify on completion (or failure only with --on-fail)
devgate run --on-fail -- bun test
# Require mobile approval before executing
devgate run --confirm --risk high --timeout 2m -- npx prisma migrate deploy
# Direct notification, approval gate, or question
devgate notify "Build finished" --level success
devgate approve "Deploy staging" --detail "git push origin staging" --risk medium --json
devgate ask "Database engine?" --options "SQLite,PostgreSQL" --json
# Audit trail
devgate history --limit 20
devgate history --status denied --json
devgate statsExit codes:
0: success or approved/answered1: operational error, denied, or timed out2: invalid CLI arguments or config error126:devgate run --confirmcancelled because approval was denied or timed out130: cancelled viaSIGINT
For devgate run, the original exit code of the wrapped child process is preserved.
Telegram Two-Way Commands
From the allowed Telegram chat, you can query status and trigger whitelisted preset commands configured under [commands] in ~/.config/devgate/config.toml:
[commands]
status = "git status -sb"
test = { cmd = "bun test", cwd = "/path/to/repo", timeout_sec = 120 }Available bot commands in Telegram (registered automatically in the / command menu, with inline action buttons on /help, /list, and /status):
/status: daemon uptime, active pending requests, and SQLite stats/history [n]: recent audit trail entries (default 10, max 30)/list: list configured preset commands with tap-to-run buttons/run <name>: execute a whitelisted preset command and return redacted output/cancel <ID>: cancel a pending approval or ask request/help: show command reference and quick menu
MCP Integration (IDE / Agent Configuration)
devgate mcp exposes three tools over JSON-RPC 2.0 stdio:
notify_userrequest_approvalask_user
Example MCP server configuration (Claude Code, Cursor, Windsurf, or compatible clients):
{
"mcpServers": {
"devgate": {
"command": "/home/YOUR_USER/.local/bin/devgate",
"args": ["mcp"]
}
}
}If running directly from source without compiling a binary:
{
"mcpServers": {
"devgate": {
"command": "bun",
"args": ["/path/to/devgate/src/index.ts", "mcp"]
}
}
}Security Model
Outbound payloads pass through a 3-layer redaction engine (
src/security/redactor.ts): curated secret patterns, active workspace.envvalues, and context-aware Shannon entropy on sensitive assignments.Approvals are fail-closed: timeouts, client disconnects (
Ctrl+C), and daemon shutdowns resolve asTIMED_OUT,CANCELLED, orDENIED.Daemon IPC listens only on a
0600Unix domain socket (${XDG_RUNTIME_DIR:-/tmp}/devgate-${uid}.sock), never on TCP.Telegram updates are restricted to the configured
allowed_chat_id.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Reach your own phone from an AI agent: notifications, approval questions, reminders, ring, files.
Send AI results to Telegram as private notifications or channel posts. No copy-pasting - connect your Telegram account and publish directly from AI assistants.
Let AI assistants post to your Telegram chats, groups and channels. Not affiliated with Telegram.
Permission checks, human approval cards, and signed audit trails for AI agent tool calls.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to send and receive messages, media, and files on Telegram, and manage chats via a bot token.1762 PyPIMIT
- AlicenseBqualityDmaintenanceEnables AI agents to send notifications and media (text, photos, documents, videos) via a Telegram bot.461 npm4Do What The F*ck You Want To Public
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to operate a Telegram account through the same commands as the terminal client: messaging, chat management, voice transcription, calls, stickers, and privacy settings.1MIT
- AlicenseAqualityCmaintenanceEnables AI agents to access and search Telegram conversations, including transcribed voice messages and OCR'd images, and to draft messages that require user approval before sending.152MIT