通过模型上下文协议(MCP)实现专业AI代理管理
Agent Q 是一个模型上下文协议(MCP)服务器,它使您能够创建、管理和组织适用于任何MCP兼容AI工具的专业AI代理。拥有超过120个预构建代理模板,涵盖从代码审查到DevOps的所有方面,Agent Q 帮助您简化AI工作流程。
关于兼容性的说明:Agent Q 基于开放的MCP标准构建,并旨在与所有MCP兼容工具一起使用。然而,它主要针对 Claude Code 进行了开发和测试。我们正在积极寻找贡献者来帮助测试并提高与其他MCP客户端如Cursor、Cline等的兼容性。如果您想做出贡献,请参阅我们的贡献指南。
# 使用npx(推荐)
npx @notsooshariff/agent-q
# 或全局安装
npm install -g @notsooshariff/agent-q
将Agent Q 添加到您的MCP兼容AI工具中:
标准配置:
{
"mcpServers": {
"agent-q": {
"command": "npx",
"args": ["-y", "@notsooshariff/agent-q"]
}
}
}
编辑您的配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json添加上述标准配置。
</details> <details> <summary><b>Claude Code</b></summary>使用CLI添加Agent Q:
claude mcp add agent-q npx @notsooshariff/agent-q
或手动编辑 ~/.claude/config.json 并添加标准配置。
通过VS Code CLI安装:
code --add-mcp '{"name":"agent-q","command":"npx","args":["-y","@notsooshariff/agent-q"]}'
或遵循MCP安装指南并使用标准配置。
</details> <details> <summary><b>Cursor</b></summary>agent-qnpx @notsooshariff/agent-q更新您的 settings.json:
"amp.mcpServers": {
"agent-q": {
"command": "npx",
"args": ["-y", "@notsooshariff/agent-q"]
}
}
或使用CLI:
amp mcp add agent-q -- npx @notsooshariff/agent-q
</details>
<details>
<summary><b>Goose</b></summary>
agent-qnpx @notsooshariff/agent-q使用CLI:
codex mcp add agent-q npx "@notsooshariff/agent-q"
或编辑 ~/.codex/config.toml:
[mcp_servers.agent-q]
command = "npx"
args = ["-y", "@notsooshariff/agent-q"]
</details>
<details>
<summary><b>Factory</b></summary>
使用CLI:
droid mcp add agent-q "npx @notsooshariff/agent-q"
或在Factory droid内键入 /mcp 以获取交互式UI。
编辑 .kiro/settings/mcp.json:
{
"mcpServers": {
"agent-q": {
"command": "npx",
"args": ["-y", "@notsooshariff/agent-q"]
}
}
}
</details>
<details>
<summary><b>opencode</b></summary>
编辑 ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"agent-q": {
"type": "local",
"command": ["npx", "@notsooshariff/agent-q"],
"enabled": true
}
}
}
</details>
<details>
<summary><b>Windsurf</b></summary>
遵循Windsurf MCP文档并使用上述标准配置。
</details> <details> <summary><b>Warp</b></summary>转到设置 → AI → 管理MCP服务器 → + 添加
或使用斜杠命令 /add-mcp 并粘贴标准配置。
转到程序(右侧边栏)→ 安装 → 编辑mcp.json
使用上述标准配置。
</details>Agent Q 提供了7个MCP工具用于管理您的代理:
create_agent - 创建具有自定义个性和行为的新专门代理update_agent - 修改现有代理的配置delete_agent - 删除代理list_agents - 查看所有可用代理(项目和用户范围)validate_agent - 检查代理配置是否有效install_template - 从模板库安装代理search_templates - 按类别浏览可用模板Agent Q 包含120+ 预构建代理模板,覆盖多个类别:
...还有很多!
安装后,您的AI工具可以自动调用Agent Q工具:
// 创建专门的代码审查代理
用户:"创建一个专注于安全的代码审查代理"
AI:[使用Agent Q的create_agent工具]
✅ 代理已创建:security-code-reviewer
📍 位置:.claude/agents/security-code-reviewer.md
🔧 工具:Read, Grep, Glob
// 从模板安装
用户:"安装devops工程师模板"
AI:[使用Agent Q的install_template工具]
✅ 已安装:devops-engineer
agent-q/
├── packages/
│ ├── core/ # 核心业务逻辑
│ │ ├── agent/ # 代理管理
│ │ ├── security/ # 安全与验证
│ │ ├── template/ # 模板系统
│ │ └── config/ # 配置
│ │
│ ├── mcp-server/ # MCP服务器实现
│ │ └── tools/ # 7个MCP工具
│ │
│ └── plugin/ # 插件包
│
└── templates/ # 120+ 代理模板
代理可以存储在两个范围内:
.claude/agents/) - 通过git与团队共享~/.claude/agents/) - 存储在您的主目录中的个人代理Agent Q 包含多层安全措施:
# 克隆仓库
git clone https://github.com/NotSooShariff/agent-q.git
cd agent-q
# 安装依赖
pnpm install
# 构建所有包
pnpm build
# 运行测试
pnpm test
pnpm build # 构建所有包
pnpm dev # 开发监视模式
pnpm test # 运行测试套件
pnpm lint # 代码检查
pnpm type-check # TypeScript类型检查
pnpm clean # 清理构建工件
我们欢迎贡献!Agent Q 是开源且社区驱动的。
我们特别需要帮助的是:
请参阅贡献指南以获取详细指导。
templates/ 中创建一个新目录agent.md 文件MIT © Agent Q 团队
使用以下工具构建:
准备好加速您的AI工作流程了吗? 今天就安装Agent Q!
npx @notsooshariff/agent-q