realagent-mcp
An MCP server that enables AI agents to perform SM2-based identity binding, generate and verify SD-JWT verifiable presentations, and use SM2 cryptographic operations with local communication and national cryptography encryption.
README
realagent-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 工具
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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。