# exa-pool-mcp-rs

基于 Rust 实现的轻量级 [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) Server，将 [Exa Pool](https://github.com/chengtx809/exa-pool) 提供的 API 封装为可供 AI 助手调用的工具集。

本项目是 [exa-pool-mcp](https://github.com/TullyMonster/exa-pool-mcp) 的 Rust 语言重写版本，旨在提供更高的性能和更低的资源消耗。

## 安装与编译

请确保本地已配置好 [Rust 工具链](https://www.rust-lang.org/tools/install)。

```powershell
# 编译 Release 版本
cargo build --release
```

## 运行与测试

通过命令行直接运行：

```powershell
$env:EXA_POOL_BASE_URL='https://your-exa-pool-host'
$env:EXA_POOL_API_KEY='your-api-key'
cargo run
```

运行单元测试：

```powershell
cargo test -- --nocapture
```

## MCP 客户端配置

你可以将本程序接入到任意支持 MCP 的客户端（例如 Cursor，Claude Desktop，Claude Code 等）中去。配置时，请将 `command` 字段指向编译后的可执行文件的绝对路径；如果已将该程序加入到系统 `PATH` 环境变量中，则可以直接填入 `exa-pool-mcp-rs`（或其对应的扩展名）。

### 配置示例

```json
{
  "mcpServers": {
    "exa-pool-rs": {
      "command": "exa-pool-mcp-rs",
      "env": {
        "EXA_POOL_API_KEY": "$YourToken",
        "EXA_POOL_BASE_URL": "https://exa.chengtx.vip"
      },
      "type": "stdio"
    }
  }
}
```

## ❤️ 致谢与参考

本项目的开发和实现，离不开以下优秀开源项目的灵感与支持：

- **[exa-pool-mcp](https://github.com/TullyMonster/exa-pool-mcp)**: 本项目参考的原始 Python 版本 MCP Server 实现。
- **[Exa Pool](https://github.com/chengtx809/exa-pool)**: 卓越的 Exa API 多账号代理与管理服务面板。
- **[rmcp](https://github.com/hwchen/rmcp)**: 本项目使用的优秀 Rust MCP 框架/SDK。
- [Exa Docs](https://docs.exa.ai/): Exa 官方文档。
- [Model Context Protocol](https://modelcontextprotocol.io/): 大模型上下文协议规范。
