# select_server

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/mcp_login_service/select_server)

Pull `server` out of a resolved config and validate its shape.

## Signature

```python
select_server(
    resolution: ConfigResolution,
    server: str,
) -> ServerSelection | ConfigResolutionError
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `resolution` | `ConfigResolution` | Yes | A successful `resolve_mcp_config` result. |
| `server` | `str` | Yes | Target server name as supplied by the user. |

## Returns

`ServerSelection | ConfigResolutionError`

A `ServerSelection` on success, or a `ConfigResolutionError`
describing why the server entry is unusable.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/a98f0dfa8d534d8a1885b524632400e52db22ac6/libs/code/deepagents_code/mcp_login_service.py#L212)