ides_adapter_weixin
微信(WeChat iLink Bot)adapter for IDES channel——让微信消息驱动 IDES agent。
通过 fastmcp 暴露 3 个工具,对接 IDES 的 channel 机制(mcp_<server>_<tool> 命名)。
工具
| 工具 | 作用 |
|---|---|
weixin_qrcode_login |
登录:拿二维码 → 用户微信扫码 → 自动拿 token(后登录设计) |
channel_ingest |
收消息:带 sync_buf 游标增量拉取(未登录返回空,零打扰) |
channel_emit |
发消息:sendmessage 发文本 |
后登录(lazy login)设计
MCP server 启动时不登录。channel_ingest 被感知层轮询时:
- 有 token → 正常 getupdates
- 无 token → 返回
{"messages": []}(空),感知层is_empty()天然过滤,不打扰 agent
agent 想接微信时,主动调 weixin_qrcode_login 扫码,成功即存 token,之后收发光。
使用
作为 MCP server 接入 IDES
在 mcp/weixin.toml(IDES_HOME 下)注册:
[mcp_servers.weixin]
command = "uvx"
args = ["ides-adapter-weixin"]
或用本地开发版:
[mcp_servers.weixin]
command = "uv"
args = ["run", "--with", ".", "ides-adapter-weixin"]
登录
# 设置 IDES_HOME(默认取环境变量或当前目录)
export IDES_HOME=H:/RUSH
# 调用登录工具拿二维码,用微信扫
.env 配置
IDES_HOME=H:/RUSH # 存 token/游标的目录
WEIXIN_ACCOUNT_ID=default # 账号标识(多账号用)
实现参考
核心 API 参考 hermes-agent 的 gateway/platforms/weixin.py(已验证的 iLink Bot API),
按 IDES channel 契约精简重做,不依赖 hermes-agent 生态。
License
MIT
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 ides_adapter_weixin-0.1.0.tar.gz.
File metadata
- Download URL: ides_adapter_weixin-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b67e6411c867933a7578d5223c5155fbde2bb65f4124aa6243bec3640c34b9cc
|
|
| MD5 |
2a999d93eb07e4dc8f29c640740f739f
|
|
| BLAKE2b-256 |
8293697713ebcd66951a477d640207b0dd0fe501e6224a7a559f1fe7e425c46f
|
File details
Details for the file ides_adapter_weixin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ides_adapter_weixin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6af2d54cdef9b5fffca03f8c12ba0e5611af620aa687bca402f93981560805ea
|
|
| MD5 |
0eaed9100d151e1af67698d1e26fe900
|
|
| BLAKE2b-256 |
b637146f510f9996ef02c42204fccde3e50490f75ff7d0ff0dbfd202b3745c57
|