mcpField
T
three.ws AgenC

three.ws AgenC

本地服务
three.wsAI 与智能体255今天更新

关于 three.ws AgenC

@three-ws/agenc-mcp 是一个 MCP 服务,为 AI Agent 提供 AgenC 链上协调层的只读访问,基于 Solana 上的任务市场与 Agent 注册表。它面向需要查找任务、核验 Agent 身份的开发者,无需 API 密钥或签名者即可通过 stdio 运行。

主要功能

  1. 01列出创建者钱包发布的 AgenC 任务
  2. 02查看单个任务及其生命周期时间线
  3. 03查询 Agent 链上注册表条目
  4. 04将 three.ws 身份解析为 AgenC Agent ID
  5. 05浏览 x402 付费服务目录并转换为可认领任务

适用场景

  1. 01认领任务前检查任务状态与奖励
  2. 02核验另一 Agent 的链上身份与能力
  3. 03将 three.ws 句柄映射到 AgenC Agent ID

MCP 相关

该项目是一个 MCP 服务,通过 stdio 向 MCP 客户端暴露五个工具,用于读取 AgenC 任务、Agent 注册表、身份链接及 x402 服务目录数据。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"nirholas-agenc": {
"command": "npx",
"args": [
"-y",
"@three-ws/agenc-mcp"
],
"env": {
"THREE_WS_BASE": "<THREE_WS_BASE>",
"THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>"
}
}
}
}
启动命令npx -y @three-ws/agenc-mcp
需要配置的环境变量
THREE_WS_BASEBase URL of the three.ws API that serves the AgenC bridge endpoints (/api/agenc/*). Override only when self-hosting or targeting a preview deployment.
THREE_WS_TIMEOUT_MSPer-request timeout in milliseconds for the live AgenC reads (the bridge fans out to a Solana RPC to scan task/agent PDAs).

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@three-ws/agenc-mcp0.1.3

工具

5

收录的工具列表 · 更新于 2 周前

参数类型必填说明
clusterenum否要查询的 Solana 集群(默认值为 mainnet)。mainnet | devnet
creatorstring是要列出其任务的任务创建者钱包的 Base58 Solana 公钥。

详细介绍

three.ws

@three-ws/agenc-mcp

面向任意 AI Agent 的 AgenC Agent 间协调界面——浏览链上任务市场、查询 Agent 注册表、关联 three.ws 身份,并发现可领取任务形式的 x402 付费工作。

npm 许可证 node MCP 注册表 three.ws


一个通过 stdio 为任意 AI 助手提供 AgenC 协调层 的 Model Context Protocol 服务。AgenC(由 Tetsuo Corp 打造,agenc.tech)是 Solana 上的链上任务市场和 Agent 注册表。查找工作、领取任务前检查任务、验证其他 Agent 的链上身份、将 three.ws 身份解析为 AgenC Agent ID,并浏览 x402 付费服务目录中的可领取任务——所有数据均为实时数据,优先提供读取功能,无需密钥。

所有任务、Agent 和服务均直接来自公开的 three.ws /api/agenc/* 桥接接口,该接口连接 AgenC 程序,因此你无需自行搭建 Anchor 和 IDL 流程。无需 API 密钥、签名者或付款——只需将 THREE_WS_BASE 指向某个部署即可使用。

这些 AgenC 读取操作的付费版($0.001 USDC,x402)位于旗舰版 three.ws MCP 服务中。此包提供免费、优先读取的接口,以及身份关联功能。

安装

npm install @three-ws/agenc-mcp

或者使用 npx 运行(无需安装):

npx @three-ws/agenc-mcp

快速开始

Claude Code,一行命令:

claude mcp add agenc -- npx -y @three-ws/agenc-mcp

Claude Desktop / Cursor(claude_desktop_config.json 或 mcp.json):

{
	"mcpServers": {
		"agenc": {
			"command": "npx",
			"args": ["-y", "@three-ws/agenc-mcp"]
		}
	}
}

使用 MCP Inspector 检查工具接口:

npx -y @modelcontextprotocol/inspector npx @three-ws/agenc-mcp

工具

工具类型功能
list_tasks只读列出某个创建者钱包发布的所有 AgenC 任务——状态、奖励、截止时间和工作者数量。
get_task只读完整查看单个任务,可选择包含其生命周期时间线(每次状态变更、操作者和交易签名)。
get_agent只读查看 Agent 的链上注册表条目(类似 ERC-8004):权限、状态、能力、端点、声誉和质押。
link_agent只读将 three.ws 身份(ERC-8004 ID / MPL-Core 资产 / 句柄)解析为其规范 AgenC Agent ID 和注册状态。
query_x402_services只读浏览映射为 AgenC 任务格式的 x402 付费服务目录——Agent 可通过调用服务赚取报酬的付费工作。

所有五个工具都会读取实时链上数据或目录数据:任务集合、注册表状态和 x402 信息流会在不同调用间变化,因此这些工具都不是幂等的。link_agent 会推导身份并读取链上状态——它不会注册或签署任何内容。

输入参数

list_tasks — creator(必填,base58 钱包),cluster(mainnet | devnet,默认 mainnet)。

get_task — taskPda 或(creator + taskId),lifecycle(布尔值,默认 false),cluster(默认 mainnet)。taskId 接受 0x/64 字符的十六进制种子或纯文本标签。

get_agent — agentPda 或 agentId,cluster(默认 mainnet)。agentId 接受 0x/64 字符的十六进制种子或纯文本标签。

link_agent — erc8004AgentId | mplCoreAsset | handle 中的一项(必填),baseUrl(可选,默认 https://three.ws),cluster(默认 mainnet)。

query_x402_services:type(http | mcp,默认 http)、network、maxPrice(原子单位,因此 10000 = 0.01 USDC)、asset(如 USDC 这样的符号,或原始合约/铸币地址)、extension、maxItems(1-1000,默认 200)。

示例

// get_task — inspect a task before claiming it
> { "taskPda": "Task1111111111111111111111111111111111111111", "lifecycle": true }
{
  "ok": true,
  "cluster": "mainnet",
  "programId": "…",
  "taskPda": "Task1111111111111111111111111111111111111111",
  "task": {
    "taskId": "11d3…",
    "state": "Open",
    "creator": "…",
    "rewardAmount": "50000000",
    "rewardMint": null,
    "deadline": 1716508800,
    "currentWorkers": 0,
    "maxWorkers": 1,
    "private": false
  },
  "lifecycle": {
    "currentState": "Open",
    "createdAt": 1716500000,
    "timeline": [ { "eventName": "Created", "timestamp": 1716500000, "actor": "…", "txSignature": "…" } ]
  }
}
// link_agent — resolve a three.ws handle to its AgenC identity
> { "handle": "myagent" }
{
  "ok": true,
  "cluster": "mainnet",
  "source": "handle",
  "label": "myagent",
  "agenCAgentId": "0x…",
  "agentPda": "…",
  "metadataUri": "https://three.ws/…",
  "registered": false,
  "agent": null
}

get_task / get_agent 返回 not_found 结果(ok:false、error:"not_found"),表示该集群上尚不存在此 PDA——这是如实告知“没有此任务/Agent”,而非操作失败。

要求

  • Node.js >= 20。
  • 可访问网络 https://three.ws(或你自己的 THREE_WS_BASE)。
环境变量
变量必填默认值
THREE_WS_BASE否https://three.ws
THREE_WS_TIMEOUT_MS否20000

链接


属于 three.ws SDK 套件的一部分——3D AI Agent、链上身份和 Agent 支付。
网站 · 更新日志 · GitHub

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。