> ## 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.

# MCP Config • Rust AI Agent SDK

> MCPConfig: Configuration for MCP client.

# MCPConfig

> Defined in the [**MCP**](../modules/mcp) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Configuration for MCP client.

## Fields

| Name                     | Type              | Description                  |
| ------------------------ | ----------------- | ---------------------------- |
| `name`                   | `String`          | Server name                  |
| `transport`              | `TransportConfig` | Transport configuration      |
| `security`               | `SecurityConfig`  | Security configuration       |
| `auto_reconnect`         | `bool`            | Auto-reconnect on disconnect |
| `max_reconnect_attempts` | `u32`             | Maximum reconnect attempts   |
| `debug`                  | `bool`            | Enable debug logging         |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(name: impl Into<String>) -> Self
```

Create a new MCPConfig

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `name` | `impl Into&lt;String&gt;` |

### `transport`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn transport(mut self, transport: TransportConfig) -> Self
```

Set transport

**Parameters:**

| Name        | Type              |
| ----------- | ----------------- |
| `transport` | `TransportConfig` |

### `security`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn security(mut self, security: SecurityConfig) -> Self
```

Set security

**Parameters:**

| Name       | Type             |
| ---------- | ---------------- |
| `security` | `SecurityConfig` |

### `debug`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn debug(mut self, debug: bool) -> Self
```

Enable debug mode

**Parameters:**

| Name    | Type   |
| ------- | ------ |
| `debug` | `bool` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/mcp/mod.rs#L201">
  `praisonai/src/mcp/mod.rs` at line 201
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust MCP" icon="plug" href="/docs/rust/mcp" />

  <Card title="Rust Resources" icon="folder" href="/docs/rust/resources" />

  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />
</CardGroup>
