Provides AI agents with SM2 cryptographic identity, real-name verification via QR codes, and SD-JWT verifiable credential generation.
Also known as RedDateTech/RealAgentMCP, realagentmcp, realagent-mcp
- Stars
- 1
- Tools
- 14
- Downloads, 30 days
- —
- Latest version
- 0.4.0
- Last commit
- Sep 22, 2026
- License
- —
What is RealAgent MCP?
RealAgent provides AI agents with SM2 cryptographic identity, real-name verification via QR codes, and SD-JWT verifiable credential generation. It exposes 14 tools, such as identity_link, identity_status, identity_revoke.
Summary generated from the project's README
About RealAgent MCP server
RealAgent MCP provides AI agents with cryptographic identities and real-name verification capabilities using Chinese national standard algorithms. It enables agents to establish a verifiable presence through SM2 key pair generation and SD-JWT verifiable credential management. The server operates via local communication using a single executable and requires a unique agent-id for each identity to prevent conflicts.
Developers use this server to implement secure identity workflows. The system uses SM4-CTR and SM3-HMAC for local encryption of private keys and credentials. It exposes 14 specific tools for identity linking via QR codes, verifiable presentation generation, and cryptographic operations like signing and decryption. Setup requires a global npm installation and a Node.js environment of version 18.13 or higher.
What you can do with it
- 1Establish agent identityAn agent can initiate a real-name association process by generating a QR code for a user to scan.
- 2Share selective credentialsAn agent can generate an SD-JWT verifiable presentation that allows for selective disclosure of specific fields.
- 3Perform cryptographic signingAn agent can use its unique SM2 private key to sign data for authentication purposes.
- 4Verify identity statusAn agent can check its current real-name verification status and identity information.
Written from the project's README. Every use case is checked against a quote from it.
How to install RealAgent MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall RealAgent MCP in Claude Code
$ claude mcp add realagentmcp -- npx -y realagent-mcpInstall RealAgent MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"realagentmcp": {
"command": "npx",
"args": [
"-y",
"realagent-mcp"
]
}
}
}Install RealAgent MCP in VS Code
.vscode/mcp.json
{
"servers": {
"realagentmcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"realagent-mcp"
]
}
}
}Install RealAgent MCP in VS Code CLI
$ code --add-mcp '{"name":"realagentmcp","type":"stdio","command":"npx","args":["-y","realagent-mcp"]}'Install RealAgent MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"realagentmcp": {
"command": "npx",
"args": [
"-y",
"realagent-mcp"
]
}
}
}Install RealAgent MCP in Codex
$ codex mcp add realagentmcp -- npx -y realagent-mcpInstall RealAgent MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.realagentmcp] command = "npx" args = ["-y", "realagent-mcp"]
Install RealAgent MCP in Gemini CLI
$ gemini mcp add -s user realagentmcp npx -- -y realagent-mcpInstall RealAgent MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"realagentmcp": {
"command": "npx",
"args": [
"-y",
"realagent-mcp"
]
}
}
}RealAgent MCP tools 14
Detected from the READMEidentity_linkidentity_statusidentity_revokeidentity_vpidentity_verify_vpvp_parsevc_infovc_rawkey_infocrypto_signcrypto_verifycrypto_encrypt
| identity_link | — | |
| identity_status | — | |
| identity_revoke | — | |
| identity_vp | — | |
| identity_verify_vp | — | |
| vp_parse | — | |
| vc_info | — | |
| vc_raw | — | |
| key_info | — | |
| crypto_sign | — | |
| crypto_verify | — | |
| crypto_encrypt | — |
Show all 14 toolsShow fewer tools
crypto_decryptsystem_update
| crypto_decrypt | — | |
| system_update | — |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablereddatetech/realagentmcp is public and reachablegithub.com/reddatetech/realagentmcp ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-09-22github.com/reddatetech/realagentmcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from realagent-mcpPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model14 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubrealagent-mcp
国信智能体实名关联服务 MCP Server — 单个可执行文件 · 本地通信 · 国密加密 · 全平台支持。
为 AI Agent 提供 SM2 实名身份关联、SD-JWT 可验证证明(VP)生成与验证、SM2 密码学操作等能力。
安装
npm i -g realagent-mcp
必须全局安装(
-g)。这样realagent-mcp会进入 PATH,MCP 配置里的npx realagent-mcp才会命中全局副本,而不会每次都往_npx缓存里再拉一份 (即避免依赖重复与 npx 旧缓存问题)。
配置 MCP Client(--agent-id 必填,每个 Agent 使用唯一名称):
{
"mcpServers": {
"realagent-mcp": {
"command": "npx",
"args": ["-y", "realagent-mcp", "stdio", "--agent-id", "my-agent"]
}
}
}
升级
npm update -g realagent-mcp
# 或
npm i -g realagent-mcp@latest
升级后重启 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 个工具:
实名身份关联
| 工具 | 说明 |
|---|---|
identity_link |
发起实名关联:生成二维码,用户扫码认证后自动领取实名凭证(VC) |
identity_status |
查询当前 Agent 的实名关联状态与身份信息 |
identity_revoke |
注销实名关联并作废凭证 |
可验证证明(VP)
| 工具 | 说明 |
|---|---|
identity_vp |
生成 SD-JWT 可验证证明(VP),支持选择性披露字段 |
identity_verify_vp |
验证 VP 的签名与披露内容 |
vp_parse |
解析 VP 结构,提取披露的声明字段 |
凭证与密钥查询
| 工具 | 说明 |
|---|---|
vc_info |
查询本地已领取的可验证凭证(VC)摘要信息 |
vc_raw |
获取 VC 原始数据 |
key_info |
查询本地 SM2 密钥对与指纹信息 |
国密运算
| 工具 | 说明 |
|---|---|
crypto_sign |
使用 SM2 私钥对数据签名 |
crypto_verify |
验证 SM2 签名 |
crypto_encrypt |
SM2 加密数据 |
crypto_decrypt |
SM2 解密数据 |
系统
| 工具 | 说明 |
|---|---|
system_update |
检查 MCP Server 是否有新版本 |
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):npm i -g realagent-mcp -
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:
{ "mcpServers": { "realagent-mcp": { "command": "npx", "args": [ "-y", "realagent-mcp", "stdio", "--agent-id", "<confirmed-name>" ] } } }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.
RealAgent MCP questions
How do I add RealAgent MCP to Claude Code?
Run claude mcp add realagentmcp -- npx -y realagent-mcp in your terminal. Add --scope user to make it available in every project.
How do I add RealAgent MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does RealAgent MCP provide?
It exposes 14 tools, including identity_link, identity_status, identity_revoke, identity_vp, identity_verify_vp.
What are the main capabilities of RealAgent?
It provides SM2 keypair generation, QR-based real-name identity linking, SD-JWT verifiable presentation (VP) generation and verification, and SM4 encrypted storage.
How do I configure the server for my agent?
You must provide a unique --agent-id for each agent in the MCP configuration to ensure each agent has its own unique SM2 identity.
What are the system requirements for installation?
The server requires Node.js version 18.13 or higher.
How is my private key and credential data secured?
Private keys and Verifiable Credentials (VC) are stored locally using SM4-CTR and SM3-HMAC encryption.