---
title: "Get Active Server"
description: "Get Active Server API Documentation"
icon: "code"
github: "https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/agents/managers/tools/get_active_server.py"
---

import {RandomGradientBackground} from "/snippets/gradient.jsx"

<Callout type="info" title="Source Code">
View the source code for this module on GitHub: <a href='https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/agents/managers/tools/get_active_server.py' target='_blank' rel='noopener noreferrer'>https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/agents/managers/tools/get_active_server.py</a>
</Callout>

## CurrentServerInput

<div>
<RandomGradientBackground className="rounded-lg p-4 w-full h-full rounded-full">
<div className="text-black">
<div className="text-black font-bold text-xl mb-2 mt-8"><code className="!text-black">class</code> CurrentServerInput</div>

Empty input for checking current server

</div>
</RandomGradientBackground>
```python
from mcp_use.agents.managers.tools.get_active_server import CurrentServerInput
```

<Card type="info">
### `method` __init__

Create a new model by parsing and validating input data from keyword arguments.

        Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
        validated to form a valid model.

        `self` is explicitly positional-only to allow `self` as a field name.

**Parameters**
><ParamField body="data" type="Any" required="True" >   Parameter value </ParamField>

**Signature**
```python wrap
def __init__(data: Any):
```

</Card>
</div>

## GetActiveServerTool

<div>
<RandomGradientBackground className="rounded-lg p-4 w-full h-full rounded-full">
<div className="text-black">
<div className="text-black font-bold text-xl mb-2 mt-8"><code className="!text-black">class</code> GetActiveServerTool</div>

Tool for getting the currently active MCP server.

</div>
</RandomGradientBackground>
```python
from mcp_use.agents.managers.tools.get_active_server import GetActiveServerTool
```

<Card type="info">
**Attributes**
>
<ParamField body="name" type="ClassVar" required="True" >   Name identifier </ParamField>
<ParamField body="description" type="ClassVar" required="True" >   Parameter value </ParamField>
<ParamField body="args_schema" type="ClassVar" required="True" >   Parameter value </ParamField>

</Card>

<Card type="info">
### `method` __init__

Initialize with server manager.

**Parameters**
><ParamField body="server_manager" required="True" >   Server name or configuration </ParamField>

**Signature**
```python wrap
def __init__(server_manager):
```

</Card>
</div>
