
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 密钥对、二维码实名关联以及 SD-JWT 可验证证明。
- 可以做什么
- 发起、查询和注销实名关联,包括生成二维码、扫码后领取凭证,以及查询关联状态与身份信息。生成、验证和解析支持选择性披露的 SD-JWT 可验证证明。查询本地凭证与密钥,包括凭证摘要、凭证原始数据和 SM2 密钥指纹。使用 SM2 对数据签名、验签、加密和解密。检查服务器是否有新版本。
- 适用场景
- 适用于智能体需要可验证的实名身份、需要签发或校验 SD-JWT 可验证证明,或需要在本地执行 SM2 签名与加解密操作的场景。
- 运行要求
- 以本地进程通过 stdio 运行;需要 Node.js 18.13 或更高版本及 npm、npx,并全局安装该软件包。每个智能体需通过命令行参数传入唯一的 agent-id;数据默认存放在工作目录下的 .realagent/agents/,可另行指定数据目录。实名关联需用户用设备扫描二维码。
安装
在 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 分
请在仓库或注册中心条目中声明许可证。