roboto.ai.mcp.operations#

Module Contents#

class roboto.ai.mcp.operations.AdminRegisterMcpServerRequest(/, **data)#

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)

allowed_tools: dict[str, bool] | None = None#

map of tool name to enabled flag. None = configure later (auto-populates on first discovery).

Type:

Tool allowlist

authorization_endpoint: str | None = None#

OAuth2 authorization endpoint URL.

client_id: str | None = None#

OAuth2 client ID from the provider’s developer settings.

client_secret: str | None = None#

OAuth2 client secret from the provider’s developer settings.

display_name: str = None#

User-friendly display name (e.g., ‘GitHub’). Alphanumerics, hyphens, and underscores only.

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”}.

oauth_issuer_url: str | None = None#

//github.com’).

Type:

OAuth2 authorization server base URL (e.g., ‘https

org_ids: list[str] = None#

Org IDs this server is scoped to. Empty = global (visible to all orgs).

registration_mode: RegistrationMode#
revocation_endpoint: str | None = None#

OAuth2 token revocation endpoint URL, if supported.

scopes: list[str] = None#

OAuth2 scopes to request during authorization.

server_url: str#

MCP server Streamable HTTP endpoint URL.

token_endpoint: str | None = None#

OAuth2 token endpoint URL.

class roboto.ai.mcp.operations.CopyMcpServerAllowedToolsRequest(/, **data)#

Bases: pydantic.BaseModel

Admin request to copy the tool allowlist from another server.

Parameters:

data (Any)

source_server_id: str#

Server ID to copy the allowed_tools dict from.

class roboto.ai.mcp.operations.OAuthCallbackRequest(/, **data)#

Bases: pydantic.BaseModel

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

Parameters:

data (Any)

code: str#

Authorization code from the OAuth provider.

state: str#

CSRF state token from the original flow start.

class roboto.ai.mcp.operations.RegisterMcpServerRequest(/, **data)#

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)

allowed_tools: dict[str, bool] | None = None#

map of tool name to enabled flag. None = configure later (auto-populates on first discovery).

Type:

Tool allowlist

authorization_endpoint: str | None = None#

OAuth2 authorization endpoint URL.

client_id: str | None = None#

OAuth2 client ID from the provider’s developer settings.

client_secret: str | None = None#

OAuth2 client secret from the provider’s developer settings.

display_name: str = None#

User-friendly display name (e.g., ‘GitHub’). Alphanumerics, hyphens, and underscores only.

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”}.

oauth_issuer_url: str | None = None#

OAuth2 authorization server URL. Required for DCR if different from server_url. Required for Manual mode.

registration_mode: RegistrationMode#
revocation_endpoint: str | None = None#

OAuth2 token revocation endpoint URL, if supported.

scopes: list[str] = None#

OAuth2 scopes to request during authorization.

server_url: str#

MCP server Streamable HTTP endpoint URL.

token_endpoint: str | None = None#

OAuth2 token endpoint URL.

class roboto.ai.mcp.operations.RegistrationMode#

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’.

DCR = 'dcr'#
MANUAL = 'manual'#
class roboto.ai.mcp.operations.SetMcpServerOrgContextRequest(/, **data)#

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)

context: str = None#

Plaintext context (max 4000 chars). Empty string clears it.

class roboto.ai.mcp.operations.StartOAuthFlowResponse(/, **data)#

Bases: pydantic.BaseModel

Response from starting an OAuth flow.

Parameters:

data (Any)

authorization_url: str#

URL to redirect the user to for authorization.

state: str#

CSRF state token. Must be passed back in the callback.

class roboto.ai.mcp.operations.UpdateMcpServerAllowedToolsRequest(/, **data)#

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)

allowed_tools: dict[str, bool] | None = None#
class roboto.ai.mcp.operations.UpdateMcpServerOrgsRequest(/, **data)#

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)

org_ids: list[str] = None#

New set of org IDs. Empty = global (visible to all orgs).

class roboto.ai.mcp.operations.UpdateMcpServerRequest(/, **data)#

Bases: pydantic.BaseModel

Request to update an MCP server registration.

Parameters:

data (Any)

display_name: str | None = None#

Updated display name. Alphanumerics, hyphens, and underscores only.

scopes: list[str] | None = None#

Updated scopes.