roboto.ai.mcp.record#

Module Contents#

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

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)

context: str#

Plaintext context injected into the AI system prompt.

created: datetime.datetime#
created_by: str#
modified: datetime.datetime#
modified_by: str#
org_id: str#

Org that owns this context.

server_id: str#

Server this context applies to.

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

Bases: pydantic.BaseModel

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

Parameters:

data (Any)

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.

client_id: str#

OAuth2 client ID.

created: datetime.datetime#

Timestamp when this server was registered.

created_by: str#

User who first registered this server.

display_name: str#

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

extra_auth_params: dict[str, str] = None#

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

modified: datetime.datetime#

Timestamp when this server record was last modified.

modified_by: str#

User who last modified this server record.

oauth_issuer_url: str#

OAuth2 authorization server URL for this MCP server.

org_ids: list[str] = None#

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

registration_mode: str = 'dcr'#

‘dcr’ or ‘manual’.

Type:

How this server was registered

scopes: list[str] = None#

OAuth2 scopes requested during authorization.

server_id: str#

Unique identifier for this server registration.

server_url: str#

MCP server Streamable HTTP endpoint URL.

status: McpServerStatus#

Current status of the server registration.

class roboto.ai.mcp.record.McpServerStatus#

Bases: roboto.compat.StrEnum

Status of a registered MCP server.

ACTIVE = 'active'#

Server is registered and ready for use.

ERROR = 'error'#

Server registration encountered an error.

PENDING_SETUP = 'pending_setup'#

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

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

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)

created: datetime.datetime#

Timestamp when this token was first created.

expires_at: datetime.datetime | None = None#

When the access token expires, if known.

modified: datetime.datetime#

Timestamp when this token was last refreshed or modified.

org_id: str#

Org context this token is scoped to.

scopes: list[str] = None#

Scopes granted by this token.

server_id: str#

Server this token is for.

token_status: McpTokenStatus#

Current status of the token.

user_id: str#

User who authorized this token.

class roboto.ai.mcp.record.McpTokenStatus#

Bases: roboto.compat.StrEnum

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

EXPIRED = 'expired'#

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

REFRESH_FAILED = 'refresh_failed'#

Refresh token failed. User must re-authorize.

VALID = 'valid'#

Token is valid and can be used for requests.

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

Bases: pydantic.BaseModel

Describes a tool discovered from a remote MCP server.

Parameters:

data (Any)

description: str#

Human-readable description of the tool.

input_schema: dict[str, Any]#

JSON Schema describing the tool’s input parameters.

name: str#

Tool name as reported by the MCP server.

server_id: str#

Server this tool belongs to.