# Overview

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

MCP servers the account has connected: an address, a token and a list of allowed tools. Agents use them, and so can your own model loop.

Status: 8 methods · https only · exec by default

A connection belongs to the **account**, not to an agent: it is an address, a credential and a decision about which of its tools may be used. An agent then says which servers it wants, and `api.mcp.tools()` hands the same declarations to anyone writing their own loop.

## The surface {#surface}

| Call | Does |
| --- | --- |
| [connect(options)](/sdk/ref/mcp/connect) | Checks the address, shakes hands, lists its tools, saves the connection. |
| [list()](/sdk/ref/mcp/list) | Every connected server, without tokens. |
| [get(name, { refresh })](/sdk/ref/mcp/get) | One, with its tools. `refresh` re-reads them from the server. |
| [update(name, changes)](/sdk/ref/mcp/update) | Allowed tools, category, token, label, address. |
| [call(name, tool, args)](/sdk/ref/mcp/call) | Runs one tool, without an agent. |
| [disconnect(name)](/sdk/ref/mcp/disconnect) | Removes the connection. |
| [tools(names)](/sdk/ref/mcp/tools) | Declarations for `models.turn({ tools })`. |
| [forAgent(names)](/sdk/ref/mcp/for-agent) | Servers ready for the engine, tokens included. |

```javascript
await api.mcp.connect({
  url: "https://mcp.example.com/sse",
  name: "example",
  token: process.env.EXAMPLE_TOKEN,
  tools: ["search_docs", "get_issue"],      // nothing is allowed without this
  category: "read",
});

const agent = api.agents.create({
  runtime: "local", machine: pc, model: "gemini-3.5-flash",
  mcp: ["example"],
});
```

## The client lives in the package {#client-side}

> **Why not a provider's own MCP feature**
>
> A provider that runs the tool round trips inside its turn gives no exact pre-authorisation, no permission asked per call, and no budget that bites. Here an MCP tool is one more declaration — so it works on every provider, and it needed no route of ours to execute.

## Five things that are deliberate {#five}

|  | Why | Page |
| --- | --- | --- |
| `exec` by default | The protocol's read-only hint is declared by the server itself — not proof. | [connect()](/sdk/ref/mcp/connect) |
| No tool allowed unless listed | Each declaration costs tokens on every turn. | [Allowed tools](/sdk/mcp/allowed-tools) |
| Schemas are sanitised | A raw schema can fail the **whole turn**, not just that tool. | [sanitizeSchema()](/sdk/ref/mcp-client/sanitize-schema) |
| The address is checked first | Before the package ever contacts it. | [Address check](/sdk/mcp/address-check) |
| The token is encrypted at rest | And returned only to its owner. | [Tokens](/sdk/mcp/tokens) |

## One transport {#transport}

Streamable HTTP over https. The revision this client speaks made the protocol core stateless, so a call is an ordinary request and response — nothing to hold open, nothing to resume when the process carrying the package restarts.

- [Protocol revision](/sdk/mcp/protocol-revision): Which ones are spoken, and how one is chosen.
- [Allowed tools](/sdk/mcp/allowed-tools): Why none is allowed by default.
- [McpClient](/sdk/ref/mcp-client): The client itself, for a server you hold yourself.

```python
import os

api.mcp.connect(
    url="https://mcp.example.com/sse",
    name="example",
    token=os.environ["EXAMPLE_TOKEN"],
    tools=["search_docs", "get_issue"],      # nothing is allowed without this
    category="read",
)

agent = api.agents.create(
    runtime="local", machine=pc, model="gemini-3.5-flash",
    mcp=["example"],
)
```
