内容
<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/naming-mcp</h1>
<p align="center"><strong>AI 智能体的链上身份层 — 解析 .sol 名称并在 three.ws 上为您的智能体申领一个名称。</strong></p>
<p align="center">
<a href="https://www.npmjs.com/package/@three-ws/naming-mcp"><img alt="npm" src="https://img.shields.io/npm/v/@three-ws/naming-mcp?logo=npm&color=cb3837"></a>
<img alt="license" src="https://img.shields.io/npm/l/@three-ws/naming-mcp?color=3b82f6">
<img alt="node" src="https://img.shields.io/node/v/@three-ws/naming-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) 服务器,为任何 AI 助手提供 three.ws **命名/身份** 层,基于 stdio。解析 Solana `.sol` 名称到拥有它的钱包,反向查找钱包到其主要名称,并检查 `*.threews.sol` 智能体句柄是否仍可申领。
这是 three.ws 身份层:头像为您的智能体提供 *面孔*,场景为它提供 *世界*,名称为它提供 *身份*。`*.threews.sol` 子域名在 `https://three.ws/u/<label>` 处展示智能体配置文件 — 申领一个给您的智能体命名。不需要 API 密钥,不需要签名者,不需要支付 — 每次调用都命中公共 `/api/sns` 和 `/api/threews/subdomain` 端点,由 Solana / Bonfida SNS(主网)支持。
> **注意:** 铸造 `*.threews.sol` 子域名是 three.ws HTTP API 上的 **身份验证写入路径**。此 MCP 服务器公开公共 **解析 + 可用性** 读取;一旦您找到一个空闲句柄,请从您的 three.ws 帐户中申领它。
## 安装
```bash
npm install @three-ws/naming-mcp
```
或使用 `npx` 运行(无需安装):
```bash
npx @three-ws/naming-mcp
```
## 快速开始
**Claude Code**,一行:
```bash
claude mcp add naming -- npx -y @three-ws/naming-mcp
```
**Claude Desktop / Cursor**(`claude_desktop_config.json` 或 `mcp.json`):
```json
{
"mcpServers": {
"naming": {
"command": "npx",
"args": ["-y", "@three-ws/naming-mcp"]
}
}
}
```
使用 MCP Inspector 检查表面:
```bash
npx -y @modelcontextprotocol/inspector npx @three-ws/naming-mcp
```
## 工具
| 工具 | 类型 | 功能 |
| ---------------------- | --------- | -------------------------------------------------------------------------------------------- |
| `sns_resolve` | 只读 | 解析 `.sol` 名称 → 拥有它的 base58 钱包。 |
| `sns_reverse` | 只读 | 反向查找钱包 → 其主要 `.sol` 名称。 |
| `threews_availability` | 只读 | 检查 `<label>.threews.sol` 是否可作为 three.ws 智能体身份申领。 |
所有三个工具都是针对 Solana 主网的实时公共读取。`.sol` 名称无所有者(或钱包无最爱名称)返回 `resolved: false` — 一个例行、预期的答案,不是错误。
### 输入参数
**`sns_resolve`** — `name`(必填:`.sol` 标签,子域名或完整名称,带或不带后缀 `.sol`)。
**`sns_reverse`** — `address`(必填:base58 Solana 公钥)。
**`threews_availability`** — `label`(必填:要检查的句柄,例如 `nick` 表示 `nick.threews.sol`;1–63 个字符的 `[a-z0-9-]`)。
## 示例
```jsonc
// sns_resolve
> { "name": "bonfida" }
{
"ok": true,
"name": "bonfida.sol",
"address": "Fw1ETanDZafof7xEULsnq9UY6o71Tpds89tNwPkWLb1v",
"resolved": true
}
// threews_availability
> { "label": "test" }
{
"ok": true,
"full": "test.threews.sol",
"label": "test",
"available": true,
"owner": null,
"on_chain_check": "ok",
"showcase_url": null
}
```
## 要求
- **Node.js >= 20.**
- 可以访问 `https://three.ws`(或您自己的 `THREE_WS_BASE`)。
### 环境变量
| 变量 | 必需 | 默认 |
| --------------------- | -------- | ------------------ |
| `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. All rights reserved.
本软件是专有软件 — 见 [LICENSE](./LICENSE)。未经版权所有者明确书面许可,不得授予任何权利。