
Telegram Managed Bot Factory
io.github.laser54由 GitHub 账号 laser54 发布v0.1.0更新于 Oct 24, 2026
Provision owner-confirmed isolated Telegram Managed Bot instances.
概览
一个自托管的 MCP 控制平面,让助手准备并跟踪创建隔离 Telegram 子机器人的请求,由所有者在 Telegram 中确认。
- 可以做什么
- 为受支持的 Telegram 子机器人准备有边界的创建请求,返回创建链接供所有者在 Telegram 中批准,并在持久 worker 于模型上下文之外完成配置时报告请求状态。列出内置配置档(快速问答、线索收件箱、链接收件箱、所有者回声),并在明确确认后将其附加到已有子机器人。启动和停止子机器人以实现暂停与恢复。子机器人凭据由后台 worker 获取,不进入 MCP 参数和结果。
- 适用场景
- 当你拥有带 systemd 的 Linux 主机,希望助手协助创建和管理受配置档限制的小型 Telegram 机器人,且每次创建都由你在 Telegram 中批准时使用。
- 运行要求
- Linux 与 systemd --user(已测试 Ubuntu 和 WSL2)、Python 3.11–3.14、uv、Hermes 0.18,以及一个启用 Bot Management Mode 的独立自有 Telegram 机器人。安装需在交互式终端运行,并以隐藏输入方式提示一次管理器令牌;未声明环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Telegram Managed Bot Factory,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Telegram Managed Bot Factory
A self-hosted MCP control plane that turns one user-owned Telegram manager bot into isolated, useful child bots. Ask Hermes for a supported bot, confirm that specific creation in Telegram, and the persistent Factory worker retrieves and contains the child credential without exposing it to the model or MCP.
Version 0.2.3 is terminal-only: no Desktop bootstrap exists.
Each PyPI version is immutable; install the pinned release below.
Why this matters
Creating a bot manually involves a valuable credential and a real external side effect. Factory makes that workflow explicit: an agent can prepare a bounded request, but the owner approves creation in Telegram and the persistent worker receives the resulting credential outside the agent context.
What I built
I designed the MCP/control-plane boundary, the durable worker lifecycle, credential isolation, request state and reconciliation rules, then packaged and released the tool for self-hosted use. The design deliberately does not claim exactly-once external effects: a crash-ambiguous result is surfaced for reconciliation instead of being blindly retried.
Install
Requires Linux with systemd --user, Python 3.11–3.14, uv,
Hermes 0.18, and a separate Telegram bot with Bot Management Mode enabled.
The local installer first verifies systemd --user and enables verified user
lingering so the worker survives SSH logout, then securely prompts once for the manager credential, enrolls the owner, installs and verifies
the persistent user service and a fresh worker heartbeat, registers the nine-tool
stdio server with Hermes, and verifies discovery. It creates no child bot.
Terminal-only first run
Run the install command from an interactive SSH or console terminal on the same Linux host that will run the worker. It performs the complete setup in that terminal:
- install the exact Factory version as a persistent
uv tool(the worker unit never points at an evictableuvxcache); - verify
systemd --userand enable verified user lingering before requesting any credential; - accept the manager token only through hidden terminal input;
- enroll the owner, install the service, require it to be active, and observe a fresh worker heartbeat;
- register and verify the nine-tool stdio server with Hermes; any Hermes confirmation stays visible in this terminal.
There is no GUI launcher and no unconfigured MCP bootstrap tool. Until this command completes, Factory MCP deliberately refuses to start. The token must never be pasted into Hermes chat, an MCP argument, a shell command, or an environment variable.
How it works
Hermes and MCP are the non-secret control plane. The persistent worker alone polls the manager bot and retrieves credentials. Each child receives only its own credential and uses instance-local state.
Useful profiles
The same four built-in profiles are exposed as a strict Hermes function catalog.
After Telegram confirms and provisions a child, use factory_list_functions, then
factory_attach_function with the existing child slug and confirm=true. Repeating
the same attach is a no-op; rebinding keeps the bot username and Telegram identity.
Pause and resume continue to use the existing stop/start tools.
owner_echo is also included as an owner-only isolation and health smoke test.
Profiles cannot provide arbitrary code, executables, filesystem paths, HTML,
agent tools, or remote fetches.
60–90 second demo
After installation, ask Hermes:
Create a quick FAQ bot named “Studio FAQ” with username
studio_faq_bot. Welcome: “Choose a question.” Add pricing, turnaround, and contact FAQs.
Hermes returns the Telegram creation link. Open it, approve once, then open the
new child and send /start, /faq 1, and /health. If provisioning is still
in progress, ask Hermes for the request status. For the other profiles, submit
one test lead and try owner-only /export confirm then /purge confirm, or
save a URL in link_inbox, inspect /list, and use /done 1.
Platform and boundaries
- Supported runtime: Linux with
systemd --user; Ubuntu and WSL2 are tested. - Supported clients: Hermes 0.18 legacy stdio and tested MCP
2026-07-28paths. - Not supported: Windows/macOS installation, hosted multi-tenancy, arbitrary child code, automatic bot-account deletion, or bypassing Telegram approval.
- The manager bot is user-owned and separate from the Hermes gateway bot.
- Every child creation requires Telegram confirmation; this is not “one-click.”
- The Official MCP Registry listing is metadata, not a security certification.
Security highlights
- Tokens never enter MCP arguments/results, chat, CLI arguments, YAML, SQLite, manifests, logs, traces, fixtures, or Git.
- Secret directories are
0700, files are0600, and child credentials travel through an inherited anonymous file descriptor rather than argv or environment. - Child inbound update IDs and offsets are durable. Completed collisions are no-ops; a crash-ambiguous side effect is quarantined for reconciliation, not silently retried. External effects are not claimed to be exactly once.
- Inputs are bounded and validated; profiles cannot execute or fetch supplied content.
See the security policy and architecture for the full boundary model.
Documentation and source
- Source and issues
- Specification · acceptance · status · publication evidence
- Changelog · contributing · security
- Telegram Managed Bots · Official MCP Registry entry
Troubleshooting and removal
Check the worker and Hermes registration without sharing unreviewed journal output:
On WSL2, PID 1 must be systemd, and the distribution must remain running.
Uninstalling the service/package does not delete Factory data or revoke Telegram
bots; review local XDG bot-factory directories and BotFather controls separately.
来源:README.md,提交 237d5f0
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分