> For the complete documentation index, see [llms.txt](https://docs.goassay.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goassay.ai/developers/zh/shi-yong-gong-ju-jin-jie/urls-and-profiles.md).

# URL 与配置文件

连接另一个 MCP URL，同时分别管理付费许可和账户配置文件。

通用 Assay 连接继续使用 `/`。每个本地 MCP 进程只连接一个 URL。若要同时使用另一个工具集，请另加一个有独立名称的服务器条目。

例如，如果账户中已有标识为 `research` 的工具集，可将它安装到 Claude Code：

```sh
npx -y @goassay-ai/mcp add /my/research --client claude-code
npx -y @goassay-ai/mcp list
```

添加条目后请重启客户端。用户范围安装可能要求输入配置文件名称，以允许通过此 URL 进行付费调用。此许可与[钱包批准](/developers/zh/shi-yong-gong-ju-ru-men/how-paying-works.md)相互独立。

## 选择 URL

以下路径均基于 `https://mcp.goassay.ai`。你可以传入路径，也可以传入完整的 Assay URL。

| 路径                  | 提供的内容                        |
| ------------------- | ---------------------------- |
| `/`                 | 通用目录，默认通过搜索发现工具。仍遵循智能体的访问规则。 |
| `/my/research`      | 你所在组织的工具集草稿，包括当前条目和规则。       |
| `/my/research@2`    | 该工具集已发布的第 2 版。该版本必须存在。       |
| `/@acme/research`   | 该账号标识下工具集最新的公开共享版本。          |
| `/@acme/research@2` | 第 2 版，前提是仍可通过公开共享路径访问。       |

`research`、`acme` 和 `2` 都是示例：请使用目标 URL 中的标识、账号标识和版本。固定版本只会固定工具集快照，不保证提供方可用，也不授予工具使用权限。共享结束后，共享 URL 可能停止提供服务。

## 按 URL 允许付费调用

请自行在交互式终端中运行：

```sh
npx -y @goassay-ai/mcp allow-paid /my/research
npx -y @goassay-ai/mcp status
```

在确认提示中，输入提示中显示的配置文件名称（未传入 `--profile` 时为 `default`）。查看 `status` 中的 **Paid URLs** 以确认结果。

许可匹配规范化后的路径**和查询参数**，并非主机下的所有 URL。允许 `/` 不代表允许 `/my/research`；允许不带版本的工具集 URL 也不代表允许其 `@2` URL。内置默认列表包含 `/`。你也可以将其移除：

```sh
npx -y @goassay-ai/mcp disallow-paid /
```

移除付费许可后，免费调用仍可使用。运行中的服务器若带有 `--no-paid`，也会禁止该进程签名，即使其 URL 已获准。使用同一配置文件的所有服务器共享该配置文件的本地预算和支付密钥。

## 确认是否成功

`list` 显示每个已安装条目的名称、客户端、范围、URL 和状态。`status` 显示所选配置文件获准付费的 URL。允许付款前，新 URL 上的免费调用可以成功；尝试付费则会显示 **Paid calls through this server are off.**。

<details>

<summary>可选：在一台电脑上使用多个账户</summary>

使用命名配置文件，分别保存登录、支付密钥、本地限额、付费 URL 列表和支出记录。批准每个连接时，登录目标 Assay 账户并选择其智能体：

```sh
npx -y @goassay-ai/mcp login --profile work
npx -y @goassay-ai/mcp add / --client claude-code --profile work --name assay-work
npx -y @goassay-ai/mcp status --profile work
```

省略 `--profile` 即使用 `default`。配置文件名称以小写字母或数字开头，只能包含小写字母、数字和连字符，最多 32 个字符。没有切换配置文件的命令：请在各个相关命令或服务器条目中传入同一名称。

配置文件将设置分开，但无法隔离以同一操作系统用户身份运行的程序，也不会提高智能体的服务器端上限或整个账户的链上上限。退出某个配置文件会影响使用它的所有本地服务器；它的本地限额和付费 URL 选择会保留至下次登录。

</details>

<details>

<summary>可选：为项目安装</summary>

在项目目录中运行：

```sh
npx -y @goassay-ai/mcp add / --client cursor --scope project
npx -y @goassay-ai/mcp doctor
```

Claude Code、Gemini CLI、Cursor 和 VS Code 支持项目范围。Codex CLI、Windsurf 和 Claude Desktop 只支持用户范围。在 Windows 上，辅助命令不允许通过 Claude Code 或 Gemini CLI 可执行文件安装到项目范围；请使用 Cursor 或 VS Code 这类文件配置客户端。

项目安装遵循以下规则：

* 只接受内置 Assay 源站。
* 必须取消设置 `ASSAY_API_KEY`（参阅 [CLI 参考](/developers/zh/shi-yong-gong-ju-jin-jie/cli-reference.md)中的“环境变量与无界面使用”），且不接受 `--log-file`。
* 显式指定的配置文件必须已存在于此电脑。默认配置文件可在首次使用时登录。
* 安装不会添加付费许可。它可通过配置文件已允许的任何 URL 付款，包括默认的 `/`。其他 URL 只能免费调用，直到你在终端允许付费。
* **如果基于文件的安装将现有配置备份为 `.bak`，请勿提交备份。**

在客户端批准项目服务器前，请检查命令和环境。项目可以在 MCP 启动前预加载代码；参阅[安全模型](/developers/zh/shi-yong-gong-ju-jin-jie/security-model.md)。

</details>

<details>

<summary>可选：其他视图和查询筛选条件</summary>

| 形式                                  | 含义                                        |
| ----------------------------------- | ----------------------------------------- |
| `/c/weather`                        | 某个分类中已上架的工具。                              |
| `/@acme`                            | 某个创建者已上架的提供方工具。                           |
| `/u/<token>` 或 `/u/<token>@2`       | 通过链接共享的最新版本，或指定共享版本。应将链接视为仅供预期接收者使用的私密信息。 |
| `?tools=get_weather`                | 限定为指定工具；`get_weather@2` 选择契约主版本。          |
| `?category=weather`                 | 按分类筛选。                                    |
| `?free=1`                           | 强制使用免费调用。                                 |
| `?discovery=auto`、`full` 或 `search` | 选择工具发现方式。                                 |

在 shell 中，请为含查询标点的 URL 加引号。规范化过程会对筛选条件排序、去重，并移除部分默认发现参数值。请使用辅助命令报告的 URL。筛选条件只会缩小 URL 提供的内容范围，绝不会授予智能体策略之外的权限。

</details>

## 错误

| 原因                                     | 含义                | 解决方法               |
| -------------------------------------- | ----------------- | ------------------ |
| `MCP_URL_NOT_FOUND`                    | URL 不存在，或此连接无法访问。 | 检查完整路径、已发布版本和共享状态。 |
| 服务器名称过长或已被使用                           | 客户端条目无法使用该名称。     | 接受建议的短名称，或选择其他名称。  |
| Paid calls through this server are off | 此确切 URL 尚未在本地获准。  | 为正确的配置文件执行上方终端流程。  |

## 延伸阅读

* [安全模型](/developers/zh/shi-yong-gong-ju-jin-jie/security-model.md)
* [安装 assay-mcp](/developers/zh/shi-yong-gong-ju-ru-men/install-assay-mcp.md)

## 下一步

* [访问策略](/developers/zh/shi-yong-gong-ju-jin-jie/access-policy.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.goassay.ai/developers/zh/shi-yong-gong-ju-jin-jie/urls-and-profiles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
