# serve_service_with_token

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-mcp/function-serve_service_with_token/

**function** · [`ferroui-mcp`](/docs/0.5.0/api/ferroui-mcp/) · v0.5.0

```rust
fn serve_service_with_token(options: Options, provider: std::sync::Arc<dyn ServiceToolProvider>, bearer: String) -> io::Result<ServerHandle>
```

Use a securely persisted 256-bit bearer for a durable service, so restarting the process
does not invalidate peers' endpoints. Inspector servers continue generating fresh tokens.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Mcp/lib.rs#L131)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
