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

# MCP sessions

> Typed lifecycle methods for short-lived MCP credentials.

`client.mcpSessions` manages the revocable credentials accepted by the [Vetta MCP server](https://vetta.sh/docs/api/mcp.md).

```ts theme={"system"}
const minted = await client.mcpSessions.create({
  name: "release agent",
  identity_id: "idn_01H...",
  scopes: ["agents:read"],
  allowed_tools: ["agents_list"],
  expires_in_seconds: 3600,
});
```

`create(input)` calls `POST /v1/mcp_sessions`. `name`, at least one `scope`, and at least one
`allowed_tool` are required. `identity_id` is optional and is a label only (not enforced yet). `expires_in_seconds` defaults to one day.
The returned `secret` is available only on this response.

* `list(query?)` calls `GET /v1/mcp_sessions` and accepts `limit` and `after`.
* `get(id)` calls `GET /v1/mcp_sessions/{id}`.
* `revoke(id)` calls `DELETE /v1/mcp_sessions/{id}` and takes effect on the next authenticated call.

List and get results contain the safe display `prefix`, never the bearer or its stored digest. See
[MCP sessions](https://vetta.sh/docs/api/mcp-sessions.md) for the complete authorization contract.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.