---
title: "Connecting an agent"
description: "Any MCP client connects to the platform in one of two ways: through the local server on your machine, or through the platform's MCP server over HTTPS with a key. Both serve the same tools and the same cards."
section: install
address: /install/connecting-an-agent
contract: 0476e35e6e275db5
---

# Connecting an agent

Any MCP client connects to the platform in one of two ways: through the local server on your machine, or through the platform's MCP server over HTTPS with a key. Both serve the same tools and the same cards.

[figure: An agent connects through the local server on your machine or through the platform's MCP server. Both serve the same tools and the same cards.]

You can connect your own agent, on your machine or elsewhere. The agent uses MCP, and the platform serves MCP.

## Connection options

| connection | use it when | requirement |
|---|---|---|
| the local server | the agent runs on your machine, or it needs your files and the app's cache | the desktop app, with the socket or a listener turned on |
| the platform's MCP server | the agent runs elsewhere, or several people's agents share one tenant | a key with the grants that the agent needs |

The agent gets the same tools and the same cards through either connection. A long step runs as a task that the agent can watch or stop. A host that renders cards draws each card from the address in the manifest. A host that does not render cards reads the card as text.

## First calls

1. [`si.session.whoami`](/reference/tools/si-session-whoami) returns the person or service that the agent acts for.
2. [`si.session.my_grants`](/reference/tools/si-session-my_grants) returns what the agent may do in each place.
3. [`si.read.catalogue`](/reference/tools/si-read-catalogue) returns the sources and connectors of the tenant.
4. [`si.ask.preview`](/reference/tools/si-ask-preview) previews a definition before anything is spent.

## Delegation to the platform's agent

An outside agent can hand a whole job to the platform's own agent with [`si.harness.delegate`](/reference/tools/si-harness-delegate). The platform's agent runs the job under the caller's grants, reports progress as a task, and returns the cards. The platform's agent treats everything that it reads from a source as data and never as an instruction. A page, a message or a document therefore cannot steer it.
