内容
<p align="center">
<a href="https://three.ws"><img src="https://three.ws/three-ws-mcp-icon.svg" alt="three.ws" width="88" height="88"></a>
</p>
<h1 align="center">@three-ws/copy-mcp</h1>
<p align="center"><strong>驱动您的 three.ws 复制交易功能,支持任意 AI 代理 - 跟随领导者,调整仓位和风控规则,处理复制意图消息,并跟踪应付费用。支持无头,非托管。</strong></p>
<p align="center">
<a href="https://www.npmjs.com/package/@three-ws/copy-mcp"><img alt="npm" src="https://img.shields.io/npm/v/@three-ws/copy-mcp?logo=npm&color=cb3837"></a>
<img alt="license" src="https://img.shields.io/npm/l/@three-ws/copy-mcp?color=3b82f6">
<img alt="node" src="https://img.shields.io/node/v/@three-ws/copy-mcp?color=339933&logo=node.js">
<a href="https://registry.modelcontextprotocol.io/?q=io.github.nirholas"><img alt="MCP Registry" src="https://img.shields.io/badge/MCP%20Registry-io.github.nirholas-0ea5e9"></a>
<a href="https://three.ws"><img alt="three.ws" src="https://img.shields.io/badge/built%20by-three.ws-000"></a>
</p>
---
> 一个 [Model Context Protocol](https://modelcontextprotocol.io) 服务器,将 three.ws 的**复制交易**控制界面转换为可由代理驱动的工具,支持标准输入/输出。所有网站复制仪表盘功能均可在无头模式下运行。
**非托管设计**。three.ws 永远不会签署交易或持有您的资金。当您关注的领导者进行交易时,引擎会生成一个**按比例、风控检查的复制意图**,您(或您的代理)可以从自己的钱包中执行。每笔订单都受到每笔交易上限和每日预算的限制,因此失控的领导者永远无法耗尽您的资金。绩效费用以 **$THREE** 结算。
## 安装
```bash
npm install @three-ws/copy-mcp
```
或使用 `npx`(无需安装):
```bash
npx @three-ws/copy-mcp
```
## 快速开始
复制交易按账户范围划分,因此请将 `THREE_WS_API_KEY` 设置为 three.ws API 密钥(`sk_live_…` / `sk_test_…`)或 OAuth 访问令牌 - 在 [three.ws/settings/api-keys](https://three.ws/settings/api-keys) 处创建。
**Claude Code**,一行:
```bash
claude mcp add copy --env THREE_WS_API_KEY=sk_live_xxx -- npx -y @three-ws/copy-mcp
```
**Claude Desktop / Cursor**(`claude_desktop_config.json` 或 `mcp.json`):
```json
{
"mcpServers": {
"copy": {
"command": "npx",
"args": ["-y", "@three-ws/copy-mcp"],
"env": { "THREE_WS_API_KEY": "sk_live_xxx" }
}
}
}
```
使用 MCP Inspector 检查界面:
```bash
THREE_WS_API_KEY=sk_live_xxx npx -y @modelcontextprotocol/inspector npx @three-ws/copy-mcp
```
> 发现(哪些领导者可关注)位于 [`@three-ws/intel-mcp`](https://www.npmjs.com/package/@three-ws/intel-mcp) → `copy_smart_wallets`。此服务器管理您提交的关注。
## 工具
| 工具 | 类型 | 功能 |
| --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------- |
| `list_subscriptions` | 只读 | 您关注的所有领导者 - 状态、仓位规则、完整的风控规则集、绩效费用和实时待处理/已处理计数。 |
| `create_subscription` | 写(幂等) | 关注领导者/重新调整关注。定义他们的交易如何进入您的钱包。按领导者更新。 |
| `update_subscription` | 写(幂等) | 暂停/恢复/停止关注,或更改其仓位和风控规则。按 ID 修补 - 仅限您传递的字段。 |
| `cancel_subscription` | 写(破坏性) | 软停止关注:不再有意图,历史记录保留。稍后可以使用 `create_subscription` 重新关注。 |
| `get_executions` | 只读 | 您的复制意图消息 + 历史记录 - 币种、方向、仓位订单、跳过原因、状态、记录的成交。 |
| `record_execution` | 写 | 将待处理意图标记为**已执行**(可选地带有您的成交签名)或**已忽略**。永远不会为您签署。 |
| `get_earnings` | 只读 | 您关注的领导者应付的费用 - 或使用 `agent_id` 获取领导者的公共总收益。 |
所有只读操作均返回实时数据(计数、意图和累计金额在调用之间移动),因此没有一个操作是幂等的。
### 输入参数
**`list_subscriptions`** - 无。
**`create_subscription`** - `leader_agent_id`(必需,UUID),`copier_wallet`(必需,base58),`network`(`mainnet` | `devnet`,默认为 `mainnet`),`sizing_rule`(`fixed` | `multiplier` | `pct_balance`,默认为 `fixed`),`fixed_sol`(`fixed` 仓位必填),`multiplier`(默认为 `0.1`),`pct_balance`(0-100),`per_trade_cap_sol`(默认为 `0.5`),`min_order_sol`(默认为 `0.02`),`daily_budget_sol`(默认为 `1`),`max_open_copies`(1-100,默认为 `5`),`mcap_floor_usd`,`mcap_ceiling_usd`,`copy_sells`(默认为 `true`),`require_safety_pass`(默认为 `false`),`min_oracle_score`(0-100),`perf_fee_bps`(0-3000,默认为 `1000`),`telegram_chat_id`。
**`update_subscription`** - `id`(必需,UUID)以及以下任意一项:`status`(`active` | `paused` | `stopped`),以及与 `create_subscription` 相同的仓位/风控字段(每个字段可选;传递 `null` 以清除 `mcap_floor_usd` / `mcap_ceiling_usd` / `min_oracle_score` / `telegram_chat_id`)。只有您传递的字段会更改。
**`cancel_subscription`** - `id`(必需,UUID)。
**`get_executions`** - `status`(`pending` | `acted` | `dismissed` | `skipped` | `expired` | `all`,默认为 `pending`),`limit`(1-100,默认为 `50`)。
**`record_execution`** - `id`(必需,UUID),`action`(`acted` | `dismissed`),`tx_signature`(可选,仅在 `acted` 时记录)。
**`get_earnings`** - `agent_id`(可选 UUID - 提供领导者的公共总收益;省略您自己的汇总),`network`(`mainnet` | `devnet`,默认为 `mainnet`)。
## 示例
```jsonc
// create_subscription - 关注领导者,每次复制 0.05 SOL,限制上限,安全检查
> {
"leader_agent_id": "8f3c…-uuid",
"copier_wallet": "7Np…YourWallet",
"sizing_rule": "fixed",
"fixed_sol": 0.05,
"per_trade_cap_sol": 0.1,
"daily_budget_sol": 0.5,
"mcap_floor_usd": 50000,
"require_safety_pass": true
}
{
"ok": true,
"subscription": {
"id": "…",
"status": "active",
"network": "mainnet",
"leader": { "agent_id": "8f3c…", "name": "…", "image": "…", "wallet": "…" },
"copier_wallet": "7Np…YourWallet",
"sizing": { "rule": "fixed", "fixed_sol": 0.05, "multiplier": 0.1, "pct_balance": 0 },
"guards": {
"per_trade_cap_sol": 0.1, "min_order_sol": 0.02, "daily_budget_sol": 0.5,
"max_open_copies": 5, "mcap_floor_usd": 50000, "mcap_ceiling_usd": null,
"copy_sells": true, "require_safety_pass": true, "min_oracle_score": null
},
"perf_fee_bps": 1000,
"pending_count": 0,
"acted_count": 0
}
}
```
```jsonc
// get_executions - 可操作的收件箱
> { "status": "pending", "limit": 5 }
{
"ok": true,
"status": "pending",
"count": 1,
"executions": [
{
"id": "…",
"status": "pending",
"leader": { "name": "…" },
"coin": { "mint": "…", "symbol": "…", "name": "…" },
"direction": "buy",
"planned_sol": 0.05,
"expires_at": "…"
}
]
}
```
```jsonc
// record_execution - 您自己购买了它;记录成交
> { "id": "…", "action": "acted", "tx_signature": "5xQ…" }
{ "ok": true, "execution": { "id": "…", "status": "acted", "tx_signature": "5xQ…" } }
```
## 要求
- **Node.js >= 20.**
- `THREE_WS_API_KEY` 中的 three.ws 账户凭证(所有工具均需要,除领导者的公共总收益外)。
- 可以访问 `https://three.ws`(或您自己的 `THREE_WS_BASE`)。
### 环境变量
| 变量 | 必需 | 默认 | 说明 |
| --------------------- | -------- | ------------------ | -------------------------------------------------------- |
| `THREE_WS_API_KEY` | **是** | - | API 密钥(`sk_live_…`)或 OAuth 令牌。请像现金一样保管。 |
| `THREE_WS_BASE` | 否 | `https://three.ws` | 自主托管/预览部署的覆盖。 |
| `THREE_WS_TIMEOUT_MS` | 否 | `20000` | 每次请求的超时时间,单位为毫秒。 |
## 链接
- 首页:https://three.ws
- 更新日志:https://three.ws/changelog
- 问题:https://github.com/nirholas/three.ws/issues
- 许可证:Apache-2.0 - 请参阅 [LICENSE](./LICENSE)
---
<p align="center">
<sub>
three.ws SDK 套件的一部分 - 3D AI 代理、链上身份和代理支付。<br/>
<a href="https://three.ws">网站</a> · <a href="https://three.ws/changelog">更新日志</a> · <a href="https://github.com/nirholas/three.ws">GitHub</a>
</sub>
</p>
## 许可证
Copyright © 2026 nirholas。保留所有权利。
本软件为专有软件 - 请参阅 [LICENSE](./LICENSE)。未经版权所有者明确书面许可,不得授予任何权利。