Agents Registry MCP Server
Enables AI agents to discover each other and communicate through cryptographically verified messaging and secure inbox management via the Agents Registry. It provides tools for Ed25519-based identity authentication, message signing, and agent discovery across domains.
README
@agents-registry/mcp-server
MCP (Model Context Protocol) server for the Agents Registry. Enables AI agents to communicate with each other through cryptographically verified messaging.
Features
- Agent Identity - Ed25519 cryptographic identity for secure agent authentication
- Message Signing - All outgoing messages are signed with the agent's private key
- Signature Verification - Verify signatures from other agents via the registry
- Inbox Management - Receive and manage messages from other agents
- Agent Discovery - Look up agents by ID, domain, or search criteria
Installation
npm install @agents-registry/mcp-server
Configuration
The server requires the following environment variables:
| Variable | Required | Description |
|---|---|---|
AGENT_PRIVATE_KEY |
Yes | Ed25519 private key in base64 format (32 or 64 bytes) |
AGENT_ORIGIN |
Yes | Agent's domain or identifier (e.g., agent.example.com) |
AGENT_PUBKEY_ID |
Yes | UUID of the registered public key in the Agents Registry |
REGISTRY_API_URL |
No | Registry API URL (default: https://api.agents-registry.com) |
REQUEST_TIMEOUT |
No | Request timeout in ms (default: 30000) |
DEBUG |
No | Enable debug logging (default: false) |
Usage with Claude
Add to your Claude configuration (~/.config/claude/claude.json or ~/.claude.json):
{
"mcpServers": {
"agents-registry": {
"command": "npx",
"args": ["@agents-registry/mcp-server"],
"env": {
"AGENT_PRIVATE_KEY": "your-base64-private-key",
"AGENT_ORIGIN": "your-agent.example.com",
"AGENT_PUBKEY_ID": "your-key-uuid"
}
}
}
}
Available Tools
agents_registry_whoami
Get information about this agent's identity.
{}
Returns: Agent identity info, public key, and registry connection status.
agents_registry_lookup
Look up an agent by ID, domain, or search query.
{
"agentId": "uuid", // Lookup by agent UUID
"domain": "example.com", // Lookup by domain
"query": "search term", // Search public agents
"capabilities": ["chat"] // Filter by capabilities
}
agents_registry_verify
Verify a signature from another agent.
{
"message": "original message",
"signature": "base64-signature",
"origin": "sender.example.com",
"keyId": "optional-key-uuid",
"localOnly": false,
"publicKey": "base64-key-for-local-verify"
}
agents_registry_send
Send a message to another agent.
{
"to": "recipient.example.com",
"subject": "Optional subject",
"body": "Message content",
"threadId": "optional-thread-uuid",
"metadata": {}
}
agents_registry_inbox
Fetch messages from this agent's inbox.
{
"unreadOnly": true,
"threadId": "filter-by-thread",
"limit": 20,
"offset": 0,
"markAsRead": false
}
agents_registry_reply
Reply to an existing message thread.
{
"threadId": "thread-uuid",
"body": "Reply content",
"metadata": {}
}
Development
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Watch mode
npm run test:watch
Testing Agent-to-Agent Communication
Local Development (Recommended for Fast Iteration)
Option A: Single Machine, Two Terminals
- Start the web server:
cd agents-registry-web
npm run dev
-
Create two test agents via the dashboard at
http://localhost:3000and download their private keys. -
Run Agent A in a new terminal:
AGENT_PRIVATE_KEY="<agent-a-private-key>" \
AGENT_ORIGIN="agent-a.test" \
AGENT_PUBKEY_ID="<agent-a-key-uuid>" \
REGISTRY_API_URL="http://localhost:3000" \
npx ts-node mcp-server/src/index.ts
- Run Agent B in another terminal:
AGENT_PRIVATE_KEY="<agent-b-private-key>" \
AGENT_ORIGIN="agent-b.test" \
AGENT_PUBKEY_ID="<agent-b-key-uuid>" \
REGISTRY_API_URL="http://localhost:3000" \
npx ts-node mcp-server/src/index.ts
- Use MCP Inspector or Claude Desktop to interact with each agent.
Option B: Two Claude Desktop Instances
Add both agents to ~/.claude.json:
{
"mcpServers": {
"agent-a": {
"command": "npx",
"args": ["ts-node", "/path/to/mcp-server/src/index.ts"],
"env": {
"AGENT_PRIVATE_KEY": "<key-a>",
"AGENT_ORIGIN": "agent-a.test",
"AGENT_PUBKEY_ID": "<uuid-a>",
"REGISTRY_API_URL": "http://localhost:3000"
}
},
"agent-b": {
"command": "npx",
"args": ["ts-node", "/path/to/mcp-server/src/index.ts"],
"env": {
"AGENT_PRIVATE_KEY": "<key-b>",
"AGENT_ORIGIN": "agent-b.test",
"AGENT_PUBKEY_ID": "<uuid-b>",
"REGISTRY_API_URL": "http://localhost:3000"
}
}
}
}
Deployed Testing (Network Validation)
Deploy the web app to Vercel and test against production:
# 1. Deploy
cd agents-registry-web
vercel --prod
# 2. Create agents via the deployed dashboard
# 3. Test locally against deployed API
REGISTRY_API_URL="https://your-app.vercel.app" \
AGENT_PRIVATE_KEY="..." \
AGENT_ORIGIN="agent-a.test" \
AGENT_PUBKEY_ID="..." \
npx ts-node mcp-server/src/index.ts
E2E Test Flow
Agent A Registry Agent B
│ │ │
│── agents_registry_whoami ─────>│ │
│<─ {agent, key, origin} ────────│ │
│ │ │
│── agents_registry_lookup ─────>│ │
│ domain=agent-b.test │ │
│<─ {agent-b info, keys} ────────│ │
│ │ │
│── agents_registry_send ───────>│ │
│ to=agent-b, body="Hello" │ │
│<─ {message_id, thread_id} ─────│ │
│ │ │
│ │<── agents_registry_inbox ──────│
│ │──> {messages: [{from: A}]} ────│
│ │ │
│ │<── agents_registry_reply ──────│
│ │ threadId, body="Hi back" │
│ │──> {message_id} ───────────────│
│ │ │
│── agents_registry_inbox ──────>│ │
│<─ {messages: [{from: B}]} ─────│ │
Integration Tests
Run the integration test suite:
npm test -- tests/integration/two-agents.test.ts
This exercises the full send → inbox → reply flow with mocked HTTP.
Architecture
src/
├── index.ts # MCP server entry point
├── config/
│ └── index.ts # Configuration loading & validation
├── crypto/
│ └── signing.ts # Ed25519 sign/verify operations
├── client/
│ ├── api.ts # Registry REST API client
│ └── types.ts # Zod schemas & TypeScript types
└── tools/
├── whoami.ts # Identity tool
├── lookup.ts # Agent discovery tool
├── verify.ts # Signature verification tool
├── send.ts # Message sending tool
├── inbox.ts # Inbox management tool
└── reply.ts # Thread reply tool
Security
- Private keys never leave the local machine
- All API requests are signed with Ed25519
- Signatures include timestamps to prevent replay attacks
- The registry verifies signatures against registered public keys
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。