Stdio MCP server for CSCEC (中建三局) enterprise WeCom QR login
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"cscec-login-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# cscec-login-mcp 一个**零依赖、可分发**的 MCP(Model Context Protocol)服务器,把 **中建三局(CSCEC)门户的企业微信扫码登录**流程封装成标准化工具,供任意 MCP 客户端(WorkBuddy、Claude Desktop 等)调用。 > 适用场景:你要在自己的 AI 工作流 / 客户端里,让最终用户通过企业微信扫码登录 > CSCEC 门户(及「应用商城」),并拿到门户 / 应用市场的令牌。 --- ## 特性 - **零第三方依赖**:只用 Python 标准库,`python3 mcp_server.py` 即可运行。 - **9 个工具**:覆盖「生成二维码 → 等待扫码 → 兑换门户令牌 → 列出/搜索应用 → 选择应用 → 兑换应用市场令牌 → 查询令牌状态 → 清理会话」。 - **内置登录页(产品级展示)**:`cscec_qr_create` 返回 `login_url` —— 一个本地 Web 登录页(`http://127.0.0.1:<port>/login?session=...`),页面 自动显示二维码、110 秒倒计时、**到期自动刷新二维码**(session_id 不变)、 实时扫码状态反馈、成功页。AI 客户端只需把这一个 URL 交给用户,用户在 浏览器里完成全部交互。SSO 长轮询由后台线程承担,页面状态查询即时返回。 - **唯一展示通道**:浏览器登录页(`login_url`)。二维码在页面内渲染, 不依赖任何系统图片预览或桌面 PNG 副本。 - **密钥不外露**:一次性 code、令牌只落在用户私有目录 `~/.cscec_qr_login/mcp/<session>/`,tool 结果一律脱敏。 --- ## 前置条件 - Python 3.10+ ## 安装 / 分发 无需 `pip install`。把整个目录发给对方(或 `git clone`)即可: ```bash git clone <repo> cscec-login-mcp # 或直接拷贝目录 ``` ## 接入 MCP 客户端 在客户端的 MCP 配置文件(如 `~/.workbuddy/mcp.json`、 `claude_desktop_config.json`)里加: ```json { "mcpServers": { "cscec-wecom-qr-login": { "command": "python3", "args": ["/abs/path/to/cscec-login-mcp/mcp_server.py"] } } } ``` > 若客户端无法解析 `python3`,把 `command` 换成绝对路径,例如 > `/usr/bin/python3` 或 `~/.workbuddy/binaries/python/versions/3.13.12/bin/python3`。 重启客户端后,9 个 `cscec_*` 工具即被加载。 --- ## 工具一览 | 工具 | 作用 | |---|---| | `cscec_qr_create` | 向 SSO 申请二维码,返回 `login_url`(登录页)等 | | `cscec_qr_wait` | 等待用户扫码(默认 100 秒;`session_id` 可传 `"latest"`) | | `cscec_portal_exchange` | 用一次性 code 兑换门户 `access_token` / `iam_token` | | `cscec_portal_list_apps` | 列出当前用户的门户应用(按「岗位场景」配置树) | | `cscec_portal_search_apps` | 按关键词搜索门户应用目录 | | `cscec_select_app` | 按序号选中某个应用 | | `cscec_exchange_market_code` | 用应用市场一次性 code 兑换 `xindun_token` | | `cscec_token_status` | 查询门户 / 应用市场令牌的非敏感状态 | | `cscec_session_cleanup` | 删除本次会话的私有文件 | ## 典型流程 ``` 1. cscec_qr_create → 拿到 login_url,立即 present 给用户(浏览器打开登录页) 2. cscec_qr_wait → 用户在登录页扫码(页面自动刷新码…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.