---
sidebar:
  hidden: true
title: roboto.ai.mcp.record
---
## Module Contents

### McpServerOrgContextRecord

```python
class roboto.ai.mcp.record.McpServerOrgContextRecord(/, **data: Any)
```

`from roboto.ai.mcp import McpServerOrgContextRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L123-L143)

Bases: `pydantic.BaseModel`

Per-org context for an MCP server.

Org admins set this plaintext to provide the AI with org-specific instructions about how the server should be used (e.g., which repos, project names, conventions).

**Parameters**

- **data** (`Any`)

**Attributes**

- **McpServerOrgContextRecord.context** (`str`): Plaintext context injected into the AI system prompt.
- **McpServerOrgContextRecord.created** (`datetime.datetime`)
- **McpServerOrgContextRecord.created_by** (`str`)
- **McpServerOrgContextRecord.modified** (`datetime.datetime`)
- **McpServerOrgContextRecord.modified_by** (`str`)
- **McpServerOrgContextRecord.org_id** (`str`): Org that owns this context.
- **McpServerOrgContextRecord.server_id** (`str`): Server this context applies to.

### McpServerOrgCredentialRecord

```python
class roboto.ai.mcp.record.McpServerOrgCredentialRecord(/, **data: Any)
```

`from roboto.ai.mcp import McpServerOrgCredentialRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L162-L190)

Bases: `pydantic.BaseModel`

An org-wide bearer token for an MCP server.

AI chat calls the server with this token for org members who have no working OAuth connection of their own to it, and for service users (non-human callers, such as agents launched by triggers). The record names the org secret that holds the token and never contains the token itself.

**Parameters**

- **data** (`Any`)

**Attributes**

- **McpServerOrgCredentialRecord.created** (`datetime.datetime`): Timestamp when an org admin first set an org token for this server.
- **McpServerOrgCredentialRecord.created_by** (`str`): User who first set an org token for this server.
- **McpServerOrgCredentialRecord.modified** (`datetime.datetime`): Timestamp when an org admin last chose the secret. Changing the secret's value does not update it.
- **McpServerOrgCredentialRecord.modified_by** (`str`): User who last chose the secret.
- **McpServerOrgCredentialRecord.org_id** (`str`): Org that owns this token.
- **McpServerOrgCredentialRecord.secret_name** (`str`): Name of the org secret holding the token. Calls to the server send its value as `Authorization: Bearer <token>`.
- **McpServerOrgCredentialRecord.server_id** (`str`): Server this token authenticates against.

### McpServerRecord

```python
class roboto.ai.mcp.record.McpServerRecord(/, **data: Any)
```

`from roboto.ai.mcp import McpServerRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L41-L88)

Bases: `pydantic.BaseModel`

A registered external MCP server. May be global or scoped to specific orgs.

**Parameters**

- **data** (`Any`)

**Attributes**

- **McpServerRecord.allowed_tools** (`dict[str, bool] | None`) = `None`: Map of tool name to enabled flag. None = not yet configured (auto-populates on first discovery). Keys are all known tools from the server; True = allowed, False = blocked.
- **McpServerRecord.client_id** (`str`): OAuth2 client ID.
- **McpServerRecord.created** (`datetime.datetime`): Timestamp when this server was registered.
- **McpServerRecord.created_by** (`str`): User who first registered this server.
- **McpServerRecord.display_name** (`str`): User-friendly display name (e.g., 'GitHub', 'GitLab').
- **McpServerRecord.extra_auth_params** (`dict[str, str]`) = `None`: Extra query parameters appended to the OAuth authorization URL (e.g. audience for Atlassian).
- **McpServerRecord.modified** (`datetime.datetime`): Timestamp when this server record was last modified.
- **McpServerRecord.modified_by** (`str`): User who last modified this server record.
- **McpServerRecord.oauth_issuer_url** (`str`): OAuth2 authorization server URL for this MCP server.
- **McpServerRecord.org_ids** (`list[str]`) = `None`: Org IDs this server is scoped to. Empty = global (visible to all orgs).
- **McpServerRecord.registration_mode** (`str`) = `'dcr'`: How this server was registered: 'dcr' or 'manual'.
- **McpServerRecord.scopes** (`list[str]`) = `None`: OAuth2 scopes requested during authorization.
- **McpServerRecord.server_id** (`str`): Unique identifier for this server registration.
- **McpServerRecord.server_url** (`str`): MCP server Streamable HTTP endpoint URL.
- **McpServerRecord.status** (`McpServerStatus`): Current status of the server registration.

### McpServerStatus

```python
class roboto.ai.mcp.record.McpServerStatus
```

`from roboto.ai.mcp import McpServerStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L15-L25)

Bases: `roboto.compat.StrEnum`

Status of a registered MCP server.

**Attributes**

- **McpServerStatus.ACTIVE** = `'active'`: Server is registered and ready for use.
- **McpServerStatus.ERROR** = `'error'`: Server registration encountered an error.
- **McpServerStatus.PENDING_SETUP** = `'pending_setup'`: Server registration is in progress (e.g., awaiting Dynamic Client Registration).

### McpTokenRecord

```python
class roboto.ai.mcp.record.McpTokenRecord(/, **data: Any)
```

`from roboto.ai.mcp import McpTokenRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L91-L120)

Bases: `pydantic.BaseModel`

Per-user, per-org OAuth token metadata for an MCP server.

Token values (access_token, refresh_token) are never exposed — this record contains only status metadata for display in the UI.

**Parameters**

- **data** (`Any`)

**Attributes**

- **McpTokenRecord.created** (`datetime.datetime`): Timestamp when this token was first created.
- **McpTokenRecord.expires_at** (`datetime.datetime | None`) = `None`: When the access token expires, if known.
- **McpTokenRecord.modified** (`datetime.datetime`): Timestamp when this token was last refreshed or modified.
- **McpTokenRecord.org_id** (`str`): Org context this token is scoped to.
- **McpTokenRecord.scopes** (`list[str]`) = `None`: Scopes granted by this token.
- **McpTokenRecord.server_id** (`str`): Server this token is for.
- **McpTokenRecord.token_status** (`McpTokenStatus`): Current status of the token.
- **McpTokenRecord.user_id** (`str`): User who authorized this token.

### McpTokenStatus

```python
class roboto.ai.mcp.record.McpTokenStatus
```

`from roboto.ai.mcp import McpTokenStatus`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L28-L38)

Bases: `roboto.compat.StrEnum`

Status of a user's OAuth token for an MCP server.

**Attributes**

- **McpTokenStatus.EXPIRED** = `'expired'`: Access token has expired. May be refreshable via refresh token.
- **McpTokenStatus.REFRESH_FAILED** = `'refresh_failed'`: Refresh token failed. User must re-authorize.
- **McpTokenStatus.VALID** = `'valid'`: Token is valid and can be used for requests.

### McpToolInfo

```python
class roboto.ai.mcp.record.McpToolInfo(/, **data: Any)
```

`from roboto.ai.mcp import McpToolInfo`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/record.py#L146-L159)

Bases: `pydantic.BaseModel`

Describes a tool discovered from a remote MCP server.

**Parameters**

- **data** (`Any`)

**Attributes**

- **McpToolInfo.description** (`str`): Human-readable description of the tool.
- **McpToolInfo.input_schema** (`dict[str, Any]`): JSON Schema describing the tool's input parameters.
- **McpToolInfo.name** (`str`): Tool name as reported by the MCP server.
- **McpToolInfo.server_id** (`str`): Server this tool belongs to.
