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

### AdminRegisterMcpServerRequest

```python
class roboto.ai.mcp.operations.AdminRegisterMcpServerRequest(/, **data: Any)
```

`from roboto.ai.mcp import AdminRegisterMcpServerRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L94-L138)

Bases: `pydantic.BaseModel`

Admin request to register an MCP server. Supports both DCR and manual modes.

Admins can scope the server to specific orgs via org_ids, or leave it empty for global visibility.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AdminRegisterMcpServerRequest.allowed_tools** (`dict[str, bool] | None`) = `None`: Tool allowlist: map of tool name to enabled flag. None = configure later (auto-populates on first discovery).
- **AdminRegisterMcpServerRequest.authorization_endpoint** (`str | None`) = `None`: OAuth2 authorization endpoint URL.
- **AdminRegisterMcpServerRequest.client_id** (`str | None`) = `None`: OAuth2 client ID from the provider's developer settings.
- **AdminRegisterMcpServerRequest.client_secret** (`str | None`) = `None`: OAuth2 client secret from the provider's developer settings.
- **AdminRegisterMcpServerRequest.display_name** (`str`) = `None`: User-friendly display name (e.g., 'GitHub'). Alphanumerics, hyphens, and underscores only.
- **AdminRegisterMcpServerRequest.extra_auth_params** (`dict[str, str]`) = `None`: Extra query parameters appended to the OAuth authorization URL. For example, Atlassian requires {"audience": "api.atlassian.com", "prompt": "consent"}.
- **AdminRegisterMcpServerRequest.oauth_issuer_url** (`str | None`) = `None`: OAuth2 authorization server base URL (e.g., 'https://github.com').
- **AdminRegisterMcpServerRequest.org_ids** (`list[str]`) = `None`: Org IDs this server is scoped to. Empty = global (visible to all orgs).
- **AdminRegisterMcpServerRequest.registration_mode** (`RegistrationMode`)
- **AdminRegisterMcpServerRequest.revocation_endpoint** (`str | None`) = `None`: OAuth2 token revocation endpoint URL, if supported.
- **AdminRegisterMcpServerRequest.scopes** (`list[str]`) = `None`: OAuth2 scopes to request during authorization.
- **AdminRegisterMcpServerRequest.server_url** (`str`): MCP server Streamable HTTP endpoint URL.
- **AdminRegisterMcpServerRequest.token_endpoint** (`str | None`) = `None`: OAuth2 token endpoint URL.

### CopyMcpServerAllowedToolsRequest

```python
class roboto.ai.mcp.operations.CopyMcpServerAllowedToolsRequest(/, **data: Any)
```

`from roboto.ai.mcp import CopyMcpServerAllowedToolsRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L175-L179)

Bases: `pydantic.BaseModel`

Admin request to copy the tool allowlist from another server.

**Parameters**

- **data** (`Any`)

**Attributes**

- **CopyMcpServerAllowedToolsRequest.source_server_id** (`str`): Server ID to copy the allowed_tools dict from.

### OAuthCallbackRequest

```python
class roboto.ai.mcp.operations.OAuthCallbackRequest(/, **data: Any)
```

`from roboto.ai.mcp import OAuthCallbackRequest`

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

Bases: `pydantic.BaseModel`

Request to complete an OAuth flow after the user has authorized.

**Parameters**

- **data** (`Any`)

**Attributes**

- **OAuthCallbackRequest.code** (`str`): Authorization code from the OAuth provider.
- **OAuthCallbackRequest.state** (`str`): CSRF state token from the original flow start.

### RegisterMcpServerRequest

```python
class roboto.ai.mcp.operations.RegisterMcpServerRequest(/, **data: Any)
```

`from roboto.ai.mcp import RegisterMcpServerRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L26-L71)

Bases: `pydantic.BaseModel`

Request to register an MCP server. Used by org admins.

In DCR mode, OAuth metadata is auto-discovered and client credentials are obtained via Dynamic Client Registration.

In Manual mode, the caller provides all OAuth credentials upfront.

**Parameters**

- **data** (`Any`)

**Attributes**

- **RegisterMcpServerRequest.allowed_tools** (`dict[str, bool] | None`) = `None`: Tool allowlist: map of tool name to enabled flag. None = configure later (auto-populates on first discovery).
- **RegisterMcpServerRequest.authorization_endpoint** (`str | None`) = `None`: OAuth2 authorization endpoint URL.
- **RegisterMcpServerRequest.client_id** (`str | None`) = `None`: OAuth2 client ID from the provider's developer settings.
- **RegisterMcpServerRequest.client_secret** (`str | None`) = `None`: OAuth2 client secret from the provider's developer settings.
- **RegisterMcpServerRequest.display_name** (`str`) = `None`: User-friendly display name (e.g., 'GitHub'). Alphanumerics, hyphens, and underscores only.
- **RegisterMcpServerRequest.extra_auth_params** (`dict[str, str]`) = `None`: Extra query parameters appended to the OAuth authorization URL. For example, Atlassian requires {"audience": "api.atlassian.com", "prompt": "consent"}.
- **RegisterMcpServerRequest.oauth_issuer_url** (`str | None`) = `None`: OAuth2 authorization server URL. Required for DCR if different from server_url. Required for Manual mode.
- **RegisterMcpServerRequest.registration_mode** (`RegistrationMode`)
- **RegisterMcpServerRequest.revocation_endpoint** (`str | None`) = `None`: OAuth2 token revocation endpoint URL, if supported.
- **RegisterMcpServerRequest.scopes** (`list[str]`) = `None`: OAuth2 scopes to request during authorization.
- **RegisterMcpServerRequest.server_url** (`str`): MCP server Streamable HTTP endpoint URL.
- **RegisterMcpServerRequest.token_endpoint** (`str | None`) = `None`: OAuth2 token endpoint URL.

### RegistrationMode

```python
class roboto.ai.mcp.operations.RegistrationMode
```

`from roboto.ai.mcp import RegistrationMode`

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

Bases: `str`, `enum.Enum`

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.\_\_str\_\_() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

**Attributes**

- **RegistrationMode.DCR** = `'dcr'`
- **RegistrationMode.MANUAL** = `'manual'`

### SetMcpServerOrgContextRequest

```python
class roboto.ai.mcp.operations.SetMcpServerOrgContextRequest(/, **data: Any)
```

`from roboto.ai.mcp import SetMcpServerOrgContextRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L185-L196)

Bases: `pydantic.BaseModel`

Request to set per-org context for an MCP server.

The context is plaintext that gets injected into the AI system prompt so the AI knows how the org uses this server. Bounded to keep prompt size predictable and to limit the blast radius of injection from org-controlled text. Set to empty string to clear.

**Parameters**

- **data** (`Any`)

**Attributes**

- **SetMcpServerOrgContextRequest.context** (`str`) = `None`: Plaintext context (max 4000 chars). Empty string clears it.

### SetMcpServerOrgCredentialRequest

```python
class roboto.ai.mcp.operations.SetMcpServerOrgCredentialRequest(/, **data: Any)
```

`from roboto.ai.mcp import SetMcpServerOrgCredentialRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L199-L207)

Bases: `pydantic.BaseModel`

Request body for `PUT /v1/mcp/servers/{server_id}/org-credential`.

Sets the org-wide token the caller's org uses for the server, replacing any already set. Org admins only.

**Parameters**

- **data** (`Any`)

**Attributes**

- **SetMcpServerOrgCredentialRequest.secret_name** (`str`) = `None`: Name of an existing [`Secret`](/reference/python-sdk/roboto/domain/secrets/secret#roboto.domain.secrets.secret.Secret) in the caller's org. Its value is the token the server accepts as a bearer token.

### StartOAuthFlowResponse

```python
class roboto.ai.mcp.operations.StartOAuthFlowResponse(/, **data: Any)
```

`from roboto.ai.mcp import StartOAuthFlowResponse`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L74-L81)

Bases: `pydantic.BaseModel`

Response from starting an OAuth flow.

**Parameters**

- **data** (`Any`)

**Attributes**

- **StartOAuthFlowResponse.authorization_url** (`str`): URL to redirect the user to for authorization.
- **StartOAuthFlowResponse.state** (`str`): CSRF state token. Must be passed back in the callback.

### UpdateMcpServerAllowedToolsRequest

```python
class roboto.ai.mcp.operations.UpdateMcpServerAllowedToolsRequest(/, **data: Any)
```

`from roboto.ai.mcp import UpdateMcpServerAllowedToolsRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L165-L172)

Bases: `pydantic.BaseModel`

Admin request to set the tool allowlist for an MCP server.

Keys are tool names, values indicate whether the tool is enabled (True) or blocked (False). Set to None to clear the allowlist (reverts to auto-populate on first discovery).

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateMcpServerAllowedToolsRequest.allowed_tools** (`dict[str, bool] | None`) = `None`

### UpdateMcpServerOrgsRequest

```python
class roboto.ai.mcp.operations.UpdateMcpServerOrgsRequest(/, **data: Any)
```

`from roboto.ai.mcp import UpdateMcpServerOrgsRequest`

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

Bases: `pydantic.BaseModel`

Admin request to update the org scoping for an MCP server.

The provided org_ids fully replace the current set. An empty list makes the server global (visible to all orgs). Tokens for removed orgs are cascade-deleted.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateMcpServerOrgsRequest.org_ids** (`list[str]`) = `None`: New set of org IDs. Empty = global (visible to all orgs).

### UpdateMcpServerRequest

```python
class roboto.ai.mcp.operations.UpdateMcpServerRequest(/, **data: Any)
```

`from roboto.ai.mcp import UpdateMcpServerRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/mcp/operations.py#L141-L150)

Bases: `pydantic.BaseModel`

Request to update an MCP server registration.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateMcpServerRequest.display_name** (`str | None`) = `None`: Updated display name. Alphanumerics, hyphens, and underscores only.
- **UpdateMcpServerRequest.scopes** (`list[str] | None`) = `None`: Updated scopes.
