# McpServerSpec

> **Class** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/mcp_auth/McpServerSpec)

Parsed MCP server config entry.

All keys are optional at the type level because `mcpServers` entries
are validated shape-first by `_validate_server_config` rather than by
the type system. This TypedDict documents the accepted shape for
readers and static checkers — validate the fields at use sites before
relying on them.

## Signature

```python
McpServerSpec()
```

## Extends

- `TypedDict`

## Constructors

```python
__init__(
    auth: Literal['oauth'],
    type: Literal['stdio', 'http', 'sse'],
    transport: Literal['stdio', 'http', 'sse'],
    url: str,
    headers: dict[str, str],
    command: str,
    args: list[str],
    env: dict[str, str],
)
```

| Name | Type |
|------|------|
| `auth` | `Literal['oauth']` |
| `type` | `Literal['stdio', 'http', 'sse']` |
| `transport` | `Literal['stdio', 'http', 'sse']` |
| `url` | `str` |
| `headers` | `dict[str, str]` |
| `command` | `str` |
| `args` | `list[str]` |
| `env` | `dict[str, str]` |


## Properties

- `auth`
- `type`
- `transport`
- `url`
- `headers`
- `command`
- `args`
- `env`

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/64d45f67c86edb4df2ced0e7b82f1a8fd158ec8c/libs/cli/deepagents_cli/mcp_auth.py#L57)