内容
# MCP 服务器 PhantomBuster 版
[](https://github.com/globodai-group/mcp-phantombuster/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/globodai-mcp-phantombuster)
[](https://opensource.org/licenses/MIT)
一个 [模型上下文协议(MCP)](https://modelcontextprotocol.io/) 服务器,提供与 [PhantomBuster](https://phantombuster.com/) 自动化平台交互的工具。管理代理(phantoms),监控执行情况,并检索结果 — 所有这些都通过与 MCP 兼容的 AI 助手。
## 功能
- 🤖 **代理管理** — 列出、获取、启动、停止和删除代理
- 📦 **容器监控** — 列出和检查执行容器
- 📊 **结果检索** — 获取代理输出和结构化结果对象
- 🔒 **安全** — 通过环境变量使用 API 密钥,从不硬编码
## 快速开始
### 使用 npx(推荐)
无需安装:
```bash
npx globodai-mcp-phantombuster
```
### 全局安装
```bash
npm install -g globodai-mcp-phantombuster
mcp-phantombuster
```
## 配置
### 环境变量
设置您的 PhantomBuster API 密钥:
```bash
export PHANTOMBUSTER_API_KEY="YOUR_API_KEY"
```
> 📝 从 [PhantomBuster 工作区设置](https://phantombuster.com/workspace-settings) 获取您的 API 密钥
### Claude 桌面版
添加到您的 `claude_desktop_config.json`:
```json
{
"mcpServers": {
"phantombuster": {
"command": "npx",
"args": ["-y", "globodai-mcp-phantombuster"],
"env": {
"PHANTOMBUSTER_API_KEY": "YOUR_API_KEY"
}
}
}
}
```
### Cursor
添加到您的 Cursor MCP 设置:
```json
{
"mcpServers": {
"phantombuster": {
"command": "npx",
"args": ["-y", "globodai-mcp-phantombuster"],
"env": {
"PHANTOMBUSTER_API_KEY": "YOUR_API_KEY"
}
}
}
}
```
## 可用工具
### 代理工具
| 工具 | 描述 |
|------|-------------|
| `phantombuster_list_agents` | 列出您组织中的所有代理 |
| `phantombuster_get_agent` | 通过 ID 获取特定代理的详细信息 |
| `phantombuster_launch_agent` | 启动代理(添加到队列),可选参数 |
| `phantombuster_stop_agent` | 停止正在运行的代理 |
| `phantombuster_delete_agent` | 永久删除代理 |
### 容器工具
| 工具 | 描述 |
|------|-------------|
| `phantombuster_list_containers` | 列出代理的所有容器(运行) |
| `phantombuster_get_container` | 获取特定容器的详细信息 |
### 结果工具
| 工具 | 描述 |
|------|-------------|
| `phantombuster_get_agent_output` | 获取最新执行的控制台输出 |
| `phantombuster_get_container_result` | 获取容器的结构化结果数据 |
## 使用示例
### 列出所有代理
> "列出我所有的 PhantomBuster 代理"
### 启动具有自定义参数的代理
> "启动 PhantomBuster 代理 12345,参数:{\"search\": \"AI 初创公司\"}"
### 监控执行
> "代理 12345 的输出是什么?它还在运行吗?"
### 获取运行结果
> "获取容器 abc123 的结果"
## 开发
```bash
# 克隆仓库
git clone https://github.com/globodai-group/mcp-phantombuster.git
cd mcp-phantombuster
# 安装依赖
npm install
# 开发模式运行
PHANTOMBUSTER_API_KEY="YOUR_API_KEY" npm run dev
# 构建
npm run build
# 类型检查
npm run lint
```
## API 参考
此 MCP 服务器封装了 [PhantomBuster API v2](https://hub.phantombuster.com/reference):
- **基准 URL:** `https://api.phantombuster.com/api/v2`
- **身份验证:** `X-Phantombuster-Key` 头部
- [完整 API 文档](https://hub.phantombuster.com/docs/api)
## 贡献
欢迎贡献!请打开问题或提交拉取请求。
## 许可证
[MIT](LICENSE)
---
由 [GlobodAI](https://globodai.com) 用 ❤️ 构建