# StdioConnection

> **Class** in `langchain_mcp_adapters`

📖 [View in docs](https://reference.langchain.com/python/langchain-mcp-adapters/sessions/StdioConnection)

Configuration for stdio transport connections to MCP servers.

## Signature

```python
StdioConnection()
```

## Extends

- `TypedDict`

## Constructors

```python
__init__(
    transport: Literal['stdio'],
    command: str,
    args: list[str],
    env: NotRequired[dict[str, str] | None],
    cwd: NotRequired[str | Path | None],
    encoding: NotRequired[str],
    encoding_error_handler: NotRequired[EncodingErrorHandler],
    session_kwargs: NotRequired[dict[str, Any] | None],
)
```

| Name | Type |
|------|------|
| `transport` | `Literal['stdio']` |
| `command` | `str` |
| `args` | `list[str]` |
| `env` | `NotRequired[dict[str, str] \| None]` |
| `cwd` | `NotRequired[str \| Path \| None]` |
| `encoding` | `NotRequired[str]` |
| `encoding_error_handler` | `NotRequired[EncodingErrorHandler]` |
| `session_kwargs` | `NotRequired[dict[str, Any] \| None]` |


## Properties

- `transport`
- `command`
- `args`
- `env`
- `cwd`
- `encoding`
- `encoding_error_handler`
- `session_kwargs`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-mcp-adapters/blob/d0cb74e2a7a821bb3f4978b270c7add5a3940666/langchain_mcp_adapters/sessions.py#L83)