IntraCom
> Agent总线MCP服务器,用于AI编码助手之间的跨代理通信。
IntraCom 是通用的 模型上下文协议(MCP) 该服务器使来自不同编码助手(OpenCode、Claude Code、Aider、Roo Code等)的AI代理能够通过共享消息总线相互通信。
特性
- 代理商注册:注册具有能力和分配列表的代理
- 消息传递:发送具有跨列表执行的消息
- 令牌身份验证:每个代理可选的基于令牌的身份验证
- 永久存储:基于JSON的状态持久性
- 工具发现:列出所有注册代理人及其能力
- 通用设计:适用于任何启用MCP的AI工具
安装```bash
Clone the repository
git clone https://github.com/btr-supply/agentic-intracom.git
cd agentic-intracom
Install dependencies
bun install
## 用法
### 启动服务器```bash
bun run start
服务器使用stdio进行MCP通信。在AI工具的MCP设置中配置它。
配置
通过环境变量:```bash
export INTRACOM_STORAGE="./intracom-state.json"
bun run start
## MCP工具
### `agent_list`
列出所有已注册的代理及其能力和分配列表。
### `agent_register`
使用功能、允许列表和可选令牌注册或更新代理。
### `agent_unregister`
从注册表中删除代理。
### `message_send`
向另一个代理发送消息(强制执行allowlist)。
### `message_read`
从代理的邮箱读取邮件(默认情况下会耗尽)。
### `message_peek`
在不阅读内容的情况下获取消息计数。
## OpenCode集成
添加到您的 `opencode.json`:```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"intracom": {
"type": "local",
"command": ["bun", "run", "/path/to/agentic-intracom/src/index.ts"],
"environment": {
"INTRACOM_STORAGE": "./intracom-state.json"
},
"enabled": true
}
}
}
代理配置示例```markdown
description: Frontend Lead
mode: subagent
Neo - Frontend Lead
You are registered as neo on IntraCom.
Protocol
- On start: Register yourself
- Send messages to other agents
- Read your mailbox periodically
## Claude代码集成
添加到您的 `claude.json`:```json
{
"mcpServers": {
"intracom": {
"command": "bun",
"args": ["/path/to/agentic-intracom/src/index.ts"],
"env": {
"INTRACOM_STORAGE": "./intracom-state.json"
}
}
}
}
发展```bash
Run with watch mode
bun run dev
Format code
bunx prettier --write .
```
许可证
麻省理工学院-见 许可证 了解详情。
