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

# McpClientConfig

<span id="atoti_ai.McpClientConfig" />

> atoti\_ai.McpClientConfig(<br />
>     \*,<br />
>     *servers*: [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [StdioMcpServerConfig](./atoti_ai.config.mcp.StdioMcpServerConfig#atoti_ai.StdioMcpServerConfig) | [StreamableHttpMcpServerConfig](./atoti_ai.config.mcp.StreamableHttpMcpServerConfig#atoti_ai.StreamableHttpMcpServerConfig)],<br />
> )

The configuration of the MCP servers a session takes tools from.

Once connected, the session uses the tools of these servers as its own.
Each call to such a tool runs under the identity of the user who triggered it, so the other server’s own access restrictions stay in force.

<Note>
  This feature requires a license including Atoti Intelligence Extension.
</Note>

```pycon theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
>>> import atoti as tt
>>> from atoti_ai import (
...     AiConfig,
...     McpClientConfig,
...     StdioMcpServerConfig,
...     StreamableHttpMcpServerConfig,
... )
>>> mcp_config = McpClientConfig(
...     servers={
...         "filesystem": StdioMcpServerConfig(
...             command="npx",
...             args=["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
...         ),
...         "pnl-server": StreamableHttpMcpServerConfig(
...             url="https://pnl.example.com",
...             authentication="atoti-jwt",
...         ),
...     },
... )
>>> session_config = tt.SessionConfig(ai=AiConfig(mcp=mcp_config))
```

### Attributes

<h4 id="atoti_ai.McpClientConfig.servers">
  *servers*
</h4>

The servers to take tools from, keyed by the name this session gives them.

Each tool of a server is renamed `f"{prefix}_{tool_name}"` so that identically named tools of two servers never collide.
The prefix is the server’s name with each hyphen turned into an underscore and anything outside letters, digits, and underscores dropped.
Two names sharing a prefix would rename their tools the same way, so the session refuses to start.
