
RealAgent MCP
io.github.RedDateTech由 GitHub 帳號 RedDateTech 發布v0.4.0更新於 Oct 24, 2026
AI agent real-name identity: SM2 keypair, QR real-name link, SD-JWT VP generate/verify.
概覽
本機 MCP 伺服器,為 AI 代理提供實名身分:SM2 金鑰對、QR 碼實名關聯以及 SD-JWT 可驗證證明。
- 可以做什麼
- 發起、查詢與註銷實名關聯,包含產生 QR 碼、掃碼後領取憑證,以及查詢關聯狀態與身分資訊。產生、驗證與解析支援選擇性揭露的 SD-JWT 可驗證證明。查詢本機憑證與金鑰,包含憑證摘要、憑證原始資料與 SM2 金鑰指紋。使用 SM2 對資料簽章、驗章、加密與解密。檢查伺服器是否有新版本。
- 適用情境
- 適用於代理需要可驗證的實名身分、需要簽發或檢核 SD-JWT 可驗證證明,或需要在本機執行 SM2 簽章與加解密操作的情境。
- 執行需求
- 以本機程序透過 stdio 執行;需要 Node.js 18.13 或更新版本及 npm、npx,並全域安裝該套件。每個代理需透過命令列參數傳入唯一的 agent-id;資料預設存放在工作目錄下的 .realagent/agents/,可另行指定資料目錄。實名關聯需使用者以裝置掃描 QR 碼。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 RealAgent MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
realagent-mcp
国信智能体实名关联服务 MCP Server — 单个可执行文件 · 本地通信 · 国密加密 · 全平台支持。
为 AI Agent 提供 SM2 实名身份关联、SD-JWT 可验证证明(VP)生成与验证、SM2 密码学操作等能力。
安装
必须全局安装(
-g)。这样realagent-mcp会进入 PATH,MCP 配置里的npx realagent-mcp才会命中全局副本,而不会每次都往_npx缓存里再拉一份 (即避免依赖重复与 npx 旧缓存问题)。
配置 MCP Client(--agent-id 必填,每个 Agent 使用唯一名称):
升级
升级后重启 MCP Client 即可。Agent 会在每次对话开始时自动调用 system_update 检查新版本。
功能
- SM2 密钥对生成 — 国密 SM2 签名/验签/加解密
- 实名关联 — 生成二维码 → 扫码认证 → 自动领取 VC
- VP 生成/验证 — SD-JWT 可验证证明,W3C VC Data Model v2
- SM4 加密存储 — 私钥和 VC 使用 SM4-CTR+SM3-HMAC 本地加密
- 自动更新 — 内置版本检查 + system_update 工具
Tools
MCP Server 运行时动态暴露以下 14 个工具:
实名身份关联
可验证证明(VP)
凭证与密钥查询
国密运算
系统
AGENT INSTRUCTIONS
以下内容供 AI Agent 读取,用于自动完成安装和配置。
-
Prerequisite — verify Node.js (do this FIRST, before installing). realagent-mcp requires Node.js >= 18.13 (npm and npx are bundled with it). Before installing, check the environment:
- Run
node --versionandnpm --version. If both succeed andnode --versionreports >= v18.13, skip to step 2. - If
node/npmis not found (no Node.js) or the version is older than 18.13, stop and help the user set it up before going further:- Windows:
winget install OpenJS.NodeJS.LTS(PowerShell), or download the LTS installer from https://nodejs.org. - macOS:
brew install node@22, ornvm install --lts(nvm: https://github.com/nvm-sh/nvm). - Linux:
nvm install --lts(nvm: https://github.com/nvm-sh/nvm), or the NodeSource repo for your distro.
- Windows:
- After installing/upgrading, have the user restart the terminal and
MCP client, then re-verify with
node --version,npm --version, andnpx --version. Only proceed to step 2 once all three succeed and Node >= 18.13 is confirmed.
- Run
-
Install via npm (global, so
realagent-mcpis on PATH): -
MCP client config — Each agent MUST have a unique
--agent-id. One agent-id = one identity = one SM2 key pair. Never reuse an agent-id across agents. The realagent platform registers each key pair as a separate identity; shared agent-id causes identity conflicts.Generate an agent-id yourself, using a descriptive name based on the current project or the agent's purpose (e.g. "my-claude-code", "frontend-dev-helper", "pr-review-bot"). Use lowercase letters, digits and hyphens only. Then ASK the user to confirm before using it:
I'll configure realagent-mcp with agent-id: <name>. This name will be used to derive your unique SM2 identity. Is that OK? You can change it to any name you prefer.
Once confirmed, write this MCP config:
Data is stored under
.realagent/agents/in the working directory. Add--data-dirto customize the path. -
Restart the MCP client. The server exposes 14 tools (5 identity + 4 key/VC
- 4 crypto + 1 system). Start with
identity_status.
- 4 crypto + 1 system). Start with
-
Version check — Call
system_updateat the start of each conversation (or at least once per day). When an update is available, tell the user and help them runnpm update -g realagent-mcpornpm i -g realagent-mcp@latest. Only skip the version check if the user explicitly asks you to.
來源:README.md,提交 d6d5eed
工具
0版本歷史
2- v0.4.0最新Sep 22, 2026
- v0.3.2Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。