> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentity.to/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Setup

> Connect any MCP-compatible agent framework to Agentity using the hosted MCP server.

Agentity exposes its tools as an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server. Any MCP-compatible agent framework can connect to it and call tools to provision and manage agent identities.

The MCP server URL is:

```text theme={null}
https://api.agentity.to/mcp?apiKey=YOUR_API_KEY
```

## Adding to your MCP client

<Steps>
  <Step title="Generate an API key">
    Create an API key from the dashboard. Make sure you have supplied api keys for all providers you support.
  </Step>

  <Step title="Add the server config to your MCP client">
    ### Claude Desktop

    [https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp#h\_3d1a65aded](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp#h_3d1a65aded)
  </Step>

  <Step title="Verify the connection">
    After connecting, your agent should see at least the following tools exposed by the server:

    * `initialize_vault`
    * `save_secret_to_vault`
    * `get_secret_from_vault`
    * `create_agent_identity`
    * `get_agent_identity`
  </Step>
</Steps>

## Passing agent IDs

Every tool call requires a unique `agentId` string that identifies the agent making the call. Use a stable identifier — a UUID or a meaningful name — so the agent can reliably retrieve the same identity and vault across sessions.

<Tip>
  Give each distinct agent a unique, stable agentId. If you use the same agentId across sessions, the agent will retrieve the same identity each time.
</Tip>

<Note>
  The MCP server uses Streamable HTTP transport (not WebSocket or stdio). Make sure your MCP client supports this transport type.
</Note>
