> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiIzOWQ5MGRlYS0wZTM2LTQ4MDQtYWU4Mi1lNzA5NjhmN2EwZDkiLCJleHAiOjE3Nzg0OTEyOTgsImlhdCI6MTc3ODQ5MDk5OH0.GGwnPP6pTmgZAbKf118RHEseAI3vSIDxGSV5mn9y18E
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# 服务器名称

> 在 AsyncAPI 规范中使用 `x-fern-server-name` 扩展配置自定义服务器名称。设置生产和测试服务器标签。

为服务器指定自定义名称：

```yaml title="asyncapi.yml" {4-5}
servers:
  production:
    host: api.yourcompany.com
    x-fern-server-name: Production
    protocol: wss
  staging:
    host: staging.api.yourcompany.com
    x-fern-server-name: Staging
    protocol: wss
```