> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# websocket • Rust AI Agent SDK

> websocket: Set WebSocket server

# websocket

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**MCPBuilder**](../classes/MCPBuilder) class in the [**mcp**](../modules/mcp) module.

Set WebSocket server

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def websocket(mut self, url: impl Into<String>) -> Self
```

## Parameters

<ParamField query="url" type="impl Into<String>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Self">
  The result of the operation.
</ResponseField>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Web" icon="globe" href="/docs/rust/web" />

  <Card title="Rust Web Search" icon="search" href="/docs/rust/web-search" />
</CardGroup>
