# get()

Canonical URL: https://developers.iagenify.com/sdk/ref/mcp/get/
Language: en

`api.mcp.get(name, { refresh? }) → Promise<Server>`

One server with its tools. With refresh it shakes hands again, re-reads the catalogue from the server and records what came back.

Status: free without refresh · refresh contacts the server · keeps your choices

```javascript
const server = await api.mcp.get("example");

for (const tool of server.tools) {
  console.log(tool.allowed ? "✓" : " ", tool.name, "—", tool.description);
}
```

## Each tool {#tools}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `name` | string |  | As the server calls it. |
| `description` | string |  | What the model is told. |
| `inputSchema` | object |  | Its parameters, as the server declared them. |
| `allowed` | boolean |  | Whether it is declared to a model at all. |

## refresh re-reads the server {#refresh}

```javascript
const server = await api.mcp.get("example", { refresh: true });
```

|  | Without refresh | With refresh |
| --- | --- | --- |
| Contacts the server | no | yes — handshake and tool list |
| Costs | nothing | a round trip |
| Updates the catalogue | no | yes, and the agreed revision |
| Your allowed list | unchanged | **kept** |

> **Refreshing never widens what is allowed**
>
> The tools you had allowed stay allowed, and new ones the server has added arrive disallowed. A server cannot grant itself more surface by shipping more tools.

## When to refresh {#when}

- A tool started failing with an argument error — its schema may have changed.
- The server announced new tools you want to allow.
- `lastError` shows something, and you want to know whether it is still true.

## The token comes back to its owner {#token}

`get()` returns it, because the package needs it to contact the server. It is encrypted at rest and never leaves for anyone else — which is also why it is not in [list()](/sdk/ref/mcp/list).

- [update()](/sdk/ref/mcp/update): Changing what is allowed.
- [Tokens](/sdk/mcp/tokens): How they are handled.
- [api.mcp](/sdk/ref/mcp): Connecting, listing and using a server.

```python
server = api.mcp.get("example")

for tool in server["tools"]:
    print("✓" if tool["allowed"] else " ", tool["name"], "—", tool["description"])
```

```python
server = api.mcp.get("example", refresh=True)
```
