Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.ai.mcp

Submodules

Package Contents

AdminRegisterMcpServerRequest

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

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

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

authorization_endpoint str | None = None #

OAuth2 authorization endpoint URL.

AdminRegisterMcpServerRequest.client_id

client_id str | None = None #

OAuth2 client ID from the provider’s developer settings.

AdminRegisterMcpServerRequest.client_secret

client_secret str | None = None #

OAuth2 client secret from the provider’s developer settings.

AdminRegisterMcpServerRequest.display_name

display_name str = None #

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

AdminRegisterMcpServerRequest.extra_auth_params

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

oauth_issuer_url str | None = None #

OAuth2 authorization server base URL (e.g., ‘https://github.com’).

AdminRegisterMcpServerRequest.org_ids

org_ids list[str] = None #

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

AdminRegisterMcpServerRequest.registration_mode

registration_mode RegistrationMode #

AdminRegisterMcpServerRequest.revocation_endpoint

revocation_endpoint str | None = None #

OAuth2 token revocation endpoint URL, if supported.

AdminRegisterMcpServerRequest.scopes

scopes list[str] = None #

OAuth2 scopes to request during authorization.

AdminRegisterMcpServerRequest.server_url

server_url str #

MCP server Streamable HTTP endpoint URL.

AdminRegisterMcpServerRequest.token_endpoint

token_endpoint str | None = None #

OAuth2 token endpoint URL.

CopyMcpServerAllowedToolsRequest

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

Bases: pydantic.BaseModel

Admin request to copy the tool allowlist from another server.

Parameters

data Any

Attributes

CopyMcpServerAllowedToolsRequest.source_server_id

source_server_id str #

Server ID to copy the allowed_tools dict from.

McpServerOrgContextRecord

class roboto.ai.mcp.McpServerOrgContextRecord(/, **data)#View Source

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

context str #

Plaintext context injected into the AI system prompt.

McpServerOrgContextRecord.created

created datetime.datetime #

McpServerOrgContextRecord.created_by

created_by str #

McpServerOrgContextRecord.modified

modified datetime.datetime #

McpServerOrgContextRecord.modified_by

modified_by str #

McpServerOrgContextRecord.org_id

org_id str #

Org that owns this context.

McpServerOrgContextRecord.server_id

server_id str #

Server this context applies to.

McpServerOrgCredentialRecord

class roboto.ai.mcp.McpServerOrgCredentialRecord(/, **data)#View Source

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

created datetime.datetime #

Timestamp when an org admin first set an org token for this server.

McpServerOrgCredentialRecord.created_by

created_by str #

User who first set an org token for this server.

McpServerOrgCredentialRecord.modified

modified datetime.datetime #

Timestamp when an org admin last chose the secret. Changing the secret’s value does not update it.

McpServerOrgCredentialRecord.modified_by

modified_by str #

User who last chose the secret.

McpServerOrgCredentialRecord.org_id

org_id str #

Org that owns this token.

McpServerOrgCredentialRecord.secret_name

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

server_id str #

Server this token authenticates against.

McpServerRecord

class roboto.ai.mcp.McpServerRecord(/, **data)#View Source

Bases: pydantic.BaseModel

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

Parameters

data Any

Attributes

McpServerRecord.allowed_tools

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

client_id str #

OAuth2 client ID.

McpServerRecord.created

created datetime.datetime #

Timestamp when this server was registered.

McpServerRecord.created_by

created_by str #

User who first registered this server.

McpServerRecord.display_name

display_name str #

User-friendly display name (e.g., ‘GitHub’, ‘GitLab’).

McpServerRecord.extra_auth_params

extra_auth_params dict[str, str] = None #

Extra query parameters appended to the OAuth authorization URL (e.g. audience for Atlassian).

McpServerRecord.modified

modified datetime.datetime #

Timestamp when this server record was last modified.

McpServerRecord.modified_by

modified_by str #

User who last modified this server record.

McpServerRecord.oauth_issuer_url

oauth_issuer_url str #

OAuth2 authorization server URL for this MCP server.

McpServerRecord.org_ids

org_ids list[str] = None #

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

McpServerRecord.registration_mode

registration_mode str = 'dcr' #

How this server was registered: ‘dcr’ or ‘manual’.

McpServerRecord.scopes

scopes list[str] = None #

OAuth2 scopes requested during authorization.

McpServerRecord.server_id

server_id str #

Unique identifier for this server registration.

McpServerRecord.server_url

server_url str #

MCP server Streamable HTTP endpoint URL.

McpServerRecord.status

Current status of the server registration.

McpServerStatus

class roboto.ai.mcp.McpServerStatus#View Source

Bases: roboto.compat.StrEnum

Status of a registered MCP server.

Attributes

McpServerStatus.ACTIVE

ACTIVE = 'active' #

Server is registered and ready for use.

McpServerStatus.ERROR

ERROR = 'error' #

Server registration encountered an error.

McpServerStatus.PENDING_SETUP

PENDING_SETUP = 'pending_setup' #

Server registration is in progress (e.g., awaiting Dynamic Client Registration).

McpTokenRecord

class roboto.ai.mcp.McpTokenRecord(/, **data)#View Source

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

created datetime.datetime #

Timestamp when this token was first created.

McpTokenRecord.expires_at

expires_at datetime.datetime | None = None #

When the access token expires, if known.

McpTokenRecord.modified

modified datetime.datetime #

Timestamp when this token was last refreshed or modified.

McpTokenRecord.org_id

org_id str #

Org context this token is scoped to.

McpTokenRecord.scopes

scopes list[str] = None #

Scopes granted by this token.

McpTokenRecord.server_id

server_id str #

Server this token is for.

McpTokenRecord.token_status

token_status McpTokenStatus #

Current status of the token.

McpTokenRecord.user_id

user_id str #

User who authorized this token.

McpTokenStatus

class roboto.ai.mcp.McpTokenStatus#View Source

Bases: roboto.compat.StrEnum

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

Attributes

McpTokenStatus.EXPIRED

EXPIRED = 'expired' #

Access token has expired. May be refreshable via refresh token.

McpTokenStatus.REFRESH_FAILED

REFRESH_FAILED = 'refresh_failed' #

Refresh token failed. User must re-authorize.

McpTokenStatus.VALID

VALID = 'valid' #

Token is valid and can be used for requests.

McpToolInfo

class roboto.ai.mcp.McpToolInfo(/, **data)#View Source

Bases: pydantic.BaseModel

Describes a tool discovered from a remote MCP server.

Parameters

data Any

Attributes

McpToolInfo.description

description str #

Human-readable description of the tool.

McpToolInfo.input_schema

input_schema dict[str, Any] #

JSON Schema describing the tool’s input parameters.

McpToolInfo.name

name str #

Tool name as reported by the MCP server.

McpToolInfo.server_id

server_id str #

Server this tool belongs to.

OAuthCallbackRequest

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

Bases: pydantic.BaseModel

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

Parameters

data Any

Attributes

OAuthCallbackRequest.code

code str #

Authorization code from the OAuth provider.

OAuthCallbackRequest.state

state str #

CSRF state token from the original flow start.

RegisterMcpServerRequest

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

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

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

authorization_endpoint str | None = None #

OAuth2 authorization endpoint URL.

RegisterMcpServerRequest.client_id

client_id str | None = None #

OAuth2 client ID from the provider’s developer settings.

RegisterMcpServerRequest.client_secret

client_secret str | None = None #

OAuth2 client secret from the provider’s developer settings.

RegisterMcpServerRequest.display_name

display_name str = None #

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

RegisterMcpServerRequest.extra_auth_params

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

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

registration_mode RegistrationMode #

RegisterMcpServerRequest.revocation_endpoint

revocation_endpoint str | None = None #

OAuth2 token revocation endpoint URL, if supported.

RegisterMcpServerRequest.scopes

scopes list[str] = None #

OAuth2 scopes to request during authorization.

RegisterMcpServerRequest.server_url

server_url str #

MCP server Streamable HTTP endpoint URL.

RegisterMcpServerRequest.token_endpoint

token_endpoint str | None = None #

OAuth2 token endpoint URL.

RegistrationMode

class roboto.ai.mcp.RegistrationMode#View Source

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 = 'dcr' #

RegistrationMode.MANUAL

MANUAL = 'manual' #

SetMcpServerOrgContextRequest

class roboto.ai.mcp.SetMcpServerOrgContextRequest(/, **data)#View Source

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

context str = None #

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

SetMcpServerOrgCredentialRequest

class roboto.ai.mcp.SetMcpServerOrgCredentialRequest(/, **data)#View Source

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

secret_name str = None #

Name of an existing Secret in the caller’s org. Its value is the token the server accepts as a bearer token.

StartOAuthFlowResponse

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

Bases: pydantic.BaseModel

Response from starting an OAuth flow.

Parameters

data Any

Attributes

StartOAuthFlowResponse.authorization_url

authorization_url str #

URL to redirect the user to for authorization.

StartOAuthFlowResponse.state

state str #

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

UpdateMcpServerAllowedToolsRequest

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

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

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

UpdateMcpServerOrgsRequest

class roboto.ai.mcp.UpdateMcpServerOrgsRequest(/, **data)#View Source

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

org_ids list[str] = None #

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

UpdateMcpServerRequest

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

Bases: pydantic.BaseModel

Request to update an MCP server registration.

Parameters

data Any

Attributes

UpdateMcpServerRequest.display_name

display_name str | None = None #

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

UpdateMcpServerRequest.scopes

scopes list[str] | None = None #

Updated scopes.

Was this page helpful?