# MCPViewerScreen

> **Class** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen)

Modal viewer for active MCP servers and their tools.

Displays servers grouped by name with transport type and tool count.
Navigate with arrow keys, Enter to expand/collapse tool descriptions,
Escape to close.

## Signature

```python
MCPViewerScreen(
    self,
    server_info: list[MCPServerInfo],
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_info` | `list[MCPServerInfo]` | Yes | List of MCP server metadata to display. |

## Extends

- `ModalScreen[None]`

## Constructors

```python
__init__(
    self,
    server_info: list[MCPServerInfo],
) -> None
```

| Name | Type |
|------|------|
| `server_info` | `list[MCPServerInfo]` |


## Properties

- `BINDINGS`
- `CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/on_mount)
- [`action_move_up()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/action_move_up)
- [`action_move_down()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/action_move_down)
- [`action_toggle_expand()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/action_toggle_expand)
- [`action_page_up()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/action_page_up)
- [`action_page_down()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/action_page_down)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-cli/widgets/mcp_viewer/MCPViewerScreen/action_cancel)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/1ae053f347679e58562d2b81eb6d6e6e9bbf0b07/libs/cli/deepagents_cli/widgets/mcp_viewer.py#L136)