# MCPLoginScreen

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen)

Modal that renders the OAuth login flow and collects user input.

Implements the `OAuthInteraction` Protocol structurally so a
`mcp_auth.login(..., ui=screen)` call drives the same modal. Each
interaction method updates a status line, a clickable link area, and
an inline input prompt for the callback URL. Slack workspace selection
is deferred to Slack's browser page rather than prompted inline.

## Signature

```python
MCPLoginScreen(
    self,
    server_name: str,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_name` | `str` | Yes | MCP server name shown in the modal title. |

## Extends

- `ModalScreen[LoginOutcome]`

## Constructors

```python
__init__(
    self,
    server_name: str,
) -> None
```

| Name | Type |
|------|------|
| `server_name` | `str` |


## Properties

- `BINDINGS`
- `CSS`
- `is_done`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/on_mount)
- [`on_click()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/on_click)
- [`show_authorize_url()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/show_authorize_url)
- [`request_callback_url()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/request_callback_url)
- [`show_device_code()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/show_device_code)
- [`show_success()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/show_success)
- [`show_notice()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/show_notice)
- [`show_error()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/show_error)
- [`on_input_submitted()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/on_input_submitted)
- [`action_toggle_authorize_url()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/action_toggle_authorize_url)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/action_cancel)
- [`finish()`](https://reference.langchain.com/python/deepagents-code/widgets/mcp_login/MCPLoginScreen/finish)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/d1c6946218b4f0f86ab7b02b6bb6af1e4b75cede/libs/code/deepagents_code/widgets/mcp_login.py#L51)