Skip to main content

FINOS Workspace bridge protocol

The bridge is the connection between the FINOS Workspace MCP server and a signed-in FINOS Workspace tab. This page specifies how a tab opens a session, the messages on the WebSocket, the commands that the tab runs and the limits of the bridge. MCP Companion explains how the bridge works.

SideCode
APIbackend-api/backend/routers/app/workspace_mcp/ and backend-api/backend/workspace_mcp/models.py
Web appfrontend/src/components/AI/WorkspaceBridgeConnectionManager.tsx and workspaceBridgeProtocol.ts

Opening a session​

A tab opens a bridge session in two steps. Before the steps, the user must sign in, and the MCP Companion must be on in the tab.

  1. The tab sends POST /app/workspace-mcp/bridge/session/start with its client_name. It can also send the current_dashboard_id and the current_tab_id that it shows.
    • The API answers with the new session, which contains a session_id.
    • The answer also contains a websocket_url in the form wss://<api host>/app/workspace-mcp/bridge/ws?session_id=<session id>.
    • The tab waits a maximum of 10 seconds for the answer.
  2. The tab opens that WebSocket.
    • The browser sends the cookie of the web session with the request.
    • The API also requires an allowed origin, as FINOS Workspace API describes.
    • The API closes the socket with code 1008 in these conditions:
      • The cookie is missing or not valid.
      • The session id is not a session of the signed-in user.

Each user has a maximum of one active bridge session. A new session replaces the old session:

  • The API closes the old socket.
  • The commands that wait for the old socket fail with the message "FINOS Workspace browser session replaced.".

The API keeps a started session for 300 seconds. A tab that does not connect in that time must start a new session.

When the API accepts the socket, it sends the first event, session_ready. The session is then live.

While the socket is open, the API checks every 10 seconds that the web session that opened the socket is still active. When the web session stops, the API does these two things:

  • It closes the socket with code 1008.
  • It fails the waiting commands with the message "The FINOS Workspace session that opened the browser bridge has ended.".

Messages over the WebSocket​

Each message is a JSON object with a type field. The API checks the messages that the browser sends. The API closes the socket with code 1008 when the web session stops.

From the API to the tab:

  • session_ready

    The bridge is connected. The session holds its id, the client name and the current dashboard and tab.

    • sessionobjectrequired

      The session that is now live.

      4 nested properties
      • client_namestringrequired

        The name of the client that opened the session.

      • current_dashboard_idstring or null

        The dashboard that the tab shows.

      • current_tab_idstring or null

        The inner tab that the tab shows.

      • session_idstringrequired

        The id of the session, which the WebSocket address carries.

  • command_request

    An MCP client wants the tab to do something. The command names it and carries a request id.

    • commandobjectrequired

      The command. Its command field names it and its request_id field identifies the call.

  • pongno fields

    The answer to a ping.

  • error

    The API refuses the connection or a message.

    • errorobjectrequired

      What the API refuses.

      4 nested properties
      • code"invalid_request" | "unauthorized" | "unavailable" | "timeout" | "command_failed" | "unknown"required

        What kind of failure it is.

      • detailsobject or null

        Further information, where there is any.

      • messagestringrequired

        A sentence that says what went wrong.

      • retryableboolean

        Whether the client can try again.

From the tab to the API:

  • command_result

    The tab finished a command.

    • resultobjectrequired

      The result of the command.

      7 nested properties
      • commandstringrequired

        The name of the command.

      • dataany or null

        The result, which depends on the command.

      • errorobject or null

        The failure. It is present when ok is false.

      • messagestringrequired

        A sentence that describes the outcome.

      • okbooleanrequired

        Whether the command succeeded.

      • request_idstring or null

        The id of the request that this result answers.

      • warningsarray of string

        Warnings about the result.

  • pingno fields

    A heartbeat.

  • session_context_changed

    The user moved to another dashboard or tab. The API keeps the new context for the MCP tools.

    • sessionobjectrequired

      Where the user is now.

      2 nested properties
      • current_dashboard_idstring or null

        The dashboard that the tab shows.

      • current_tab_idstring or null

        The inner tab that the tab shows.

A command result has these fields. When ok is false, error has a code. The code is one of invalid_request, unauthorized, unavailable, timeout, command_failed and unknown.

  • commandstringrequired

    The name of the command.

  • dataany or null

    The result, which depends on the command.

  • errorobject or null

    The failure. It is present when ok is false.

    4 nested properties
    • code"invalid_request" | "unauthorized" | "unavailable" | "timeout" | "command_failed" | "unknown"required

      What kind of failure it is.

    • detailsobject or null

      Further information, where there is any.

    • messagestringrequired

      A sentence that says what went wrong.

    • retryableboolean

      Whether the client can try again.

  • messagestringrequired

    A sentence that describes the outcome.

  • okbooleanrequired

    Whether the command succeeded.

  • request_idstring or null

    The id of the request that this result answers.

  • warningsarray of string

    Warnings about the result.

Commands​

The command_request message contains one of 19 commands. Each command has two fields:

  • command gives the name of the command.
  • request_id identifies the call.

The table below gives the other arguments of each command. The tab accepts 20 commands in total. Only the Agent sends the command execute_agent_tool. The tab runs it with the same handler, but it never goes over the WebSocket. FINOS Workspace MCP server lists each tool with its arguments and its description.

  • Fetches the data of one or more data sources.

    Sent by
    the tool get_widget_data
  • Lists the widgets that the session can use, optionally for one origin or backend.

    Sent by
    the tool list_available_widgets
  • Returns the closed schemas for the data arguments and the interface arguments of one widget.

    Sent by
    the tool get_widget_schema
  • Returns the composed widgets.json schema of the user's organization.

    Sent by
    the resource workspace://specs/widgets-json-schema
  • Looks up the valid values of widget parameters.

    Sent by
    the tool get_params_options
  • Reads one widget of a dashboard.

    Sent by
    the tool read_widget
  • Creates a widget on a dashboard. With dry_run it only validates.

    Sent by
    the tool create_widget
  • Changes a widget. With dry_run it only validates.

    Sent by
    the tool update_widget
  • Deletes a widget.

    Sent by
    the tool delete_widget
  • Creates, reads or updates a dashboard.

    Sent by
    the tool manage_dashboard
  • Moves or resizes a widget on the dashboard grid.

    Sent by
    the tool update_widget_layout
  • Moves the tab to a dashboard or to an inner tab.

    Sent by
    the tool navigate_workspace
  • Creates or changes the navigation tabs of a dashboard.

    Sent by
    the tool manage_navigation_bar
  • Adds a markdown note or an HTML widget from inline content.

    Sent by
    the tool add_generative_widget
  • Assigns tasks to configured external agents.

    Sent by
    the tool assign_tasks_to_agents
  • Loads one skill from the skill library.

    Sent by
    the tool get_skill_content
  • Returns a compact snapshot of the dashboards, the current context and the skills.

    Sent by
    the tool get_workspace_snapshot
  • Lists, adds, updates, refreshes or removes data backends.

    Sent by
    the tool manage_backends
  • Lists, reads or instantiates apps, which are dashboard templates.

    Sent by
    the tool manage_apps

Arguments of the commands​

get_widget_data​

Fetches the data of one or more data sources.

Fetches the data of one or more data sources.

Arguments

  • data_sourcesarray of object

    The data sources to fetch. Each has the origin, the widget id, the data arguments and optionally the widget UUID.

list_available_widgets​

Lists the widgets that the session can use, optionally for one origin or backend.

Lists the widgets that the session can use, optionally for one origin or backend.

Arguments

  • backend_idstring or null

    Lists only the widgets of this backend.

  • originstring or null

    Lists only the widgets of this origin.

get_widget_schema​

Returns the closed schemas for the data arguments and the interface arguments of one widget.

Returns the closed schemas for the data arguments and the interface arguments of one widget.

Arguments

  • originstring or null

    The origin of the widget.

  • widget_idstringrequired

    The widget type id.

get_widgets_schema​

Returns the composed widgets.json schema of the user's organization.

Returns the composed widgets.json schema of the user's organization.

Arguments

No fields.

get_params_options​

Looks up the valid values of widget parameters.

Looks up the valid values of widget parameters.

Arguments

  • param_options_queriesarray of object

    The lookups to make. Each has the origin, the widget id, the parameter name and the data arguments.

read_widget​

Reads one widget of a dashboard.

Reads one widget of a dashboard.

Arguments

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • widget_idstring or null

    The widget type id. It identifies the widget only when exactly one widget of that type is on the dashboard.

  • widget_uuidstring or null

    The widget instance to act on. It is preferred over widget_id.

create_widget​

Creates a widget on a dashboard.

Creates a widget on a dashboard. With dry_run it only validates.

Arguments

  • backend_namestringrequired

    The name of the backend that offers the widget, which is the origin of the widget.

  • configobject or null

    The data arguments and the interface arguments of the new widget.

    2 nested properties
    • data_argsobject or null

      The values of the widget's data parameters.

    • ui_argsobject or null

      The values of the widget's interface settings.

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • dry_runboolean or null

    Validates and previews the change without making it.

  • widget_idstringrequired

    The widget type id.

update_widget​

Changes a widget.

Changes a widget. With dry_run it only validates.

Arguments

  • configobjectrequired

    The new data arguments and interface arguments of the widget.

    2 nested properties
    • data_argsobject or null

      The values of the widget's data parameters.

    • ui_argsobject or null

      The values of the widget's interface settings.

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • dry_runboolean or null

    Validates and previews the change without making it.

  • widget_idstring or null

    The widget type id. It identifies the widget only when exactly one widget of that type is on the dashboard.

  • widget_uuidstring or null

    The widget instance to act on. It is preferred over widget_id.

delete_widget​

Deletes a widget.

Deletes a widget.

Arguments

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • widget_idstring or null

    The widget type id. It identifies the widget only when exactly one widget of that type is on the dashboard.

  • widget_uuidstring or null

    The widget instance to act on. It is preferred over widget_id.

manage_dashboard​

Creates, reads or updates a dashboard.

Creates, reads or updates a dashboard.

Arguments

  • activateboolean or null

    Whether the tab shows the new dashboard. It does by default.

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • namestring or null

    The dashboard's name. Create and update need it.

  • operation"create" | "read" | "update"required

    What to do with the dashboard.

update_dashboard_layout​

Moves or resizes a widget on the dashboard grid.

Moves or resizes a widget on the dashboard grid.

Arguments

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • hnumberrequired

    The widget's height in grid rows.

  • max_hnumber or null

    The largest height that the user may give the widget.

  • max_wnumber or null

    The largest width that the user may give the widget.

  • min_hnumber or null

    The smallest height that the user may give the widget.

  • min_wnumber or null

    The smallest width that the user may give the widget.

  • tab_idstring or null

    The inner tab that the widget moves to.

  • wnumberrequired

    The widget's width in grid columns.

  • widget_idstring or null

    The widget type id. It identifies the widget only when exactly one widget of that type is on the dashboard.

  • widget_uuidstring or null

    The widget instance to act on. It is preferred over widget_id.

  • xnumberrequired

    The column of the widget's left edge on the dashboard grid.

  • ynumberrequired

    The row of the widget's top edge on the dashboard grid.

navigate_workspace​

Moves the tab to a dashboard or to an inner tab.

Moves the tab to a dashboard or to an inner tab.

Arguments

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • operation"dashboard" | "tab"required

    Whether to move to a dashboard or to an inner tab.

  • tab_idstring or null

    The inner tab to move to. The operation tab needs it.

manage_navigation_bar​

Creates or changes the navigation tabs of a dashboard.

Creates or changes the navigation tabs of a dashboard.

Arguments

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • operation"create" | "add_tabs" | "remove_tabs" | "rename_tabs"required

    What to do with the navigation tabs.

  • rename_mapobject

    The new name of each tab to rename, by the id of the tab.

  • tabsarray of object

    The tabs to create, add or remove, each an object with a name.

add_generative_widget​

Adds a markdown note or an HTML widget from inline content.

Adds a markdown note or an HTML widget from inline content.

Arguments

  • dashboard_idstring or null

    The dashboard to act on. When it is missing, the dashboard that the tab shows.

  • datastring or null

    The content of the widget, as text or HTML.

  • descriptionstring or null

    A short description of the new widget.

  • inner_tabstring or null

    An existing inner tab to place the widget on.

  • namestring or null

    The name of the new widget.

  • widget_type"note" | "html"required

    Whether the widget is a note, which is markdown, or HTML.

assign_tasks_to_agents​

Assigns tasks to configured external agents.

Assigns tasks to configured external agents.

Arguments

  • task_requestsarray of object

    The tasks to assign. Each has an id, a description, the URL of the agent's holder and the id of the agent.

get_skill_content​

Loads one skill from the skill library.

Loads one skill from the skill library.

Arguments

  • reasonstring or null

    Why the skill is loaded.

  • slugstringrequired

    The slug of the skill.

get_workspace_snapshot​

Returns a compact snapshot of the dashboards, the current context and the skills.

Returns a compact snapshot of the dashboards, the current context and the skills.

Arguments

No fields.

manage_backends​

Lists, adds, updates, refreshes or removes data backends.

Lists, adds, updates, refreshes or removes data backends.

Arguments

  • backend_idstring or null

    The backend to update, refresh or remove.

  • endpoint_headersarray of object or null

    Headers or query parameters that the backend's endpoints receive.

    3 nested properties
    • keystringrequired

      The name of the header or of the query parameter.

    • location"headers" | "query"

      Whether it goes in the headers or in the query.

    • valuestringrequired

      The value that the backend's endpoints receive.

  • namestring or null

    The name of the backend.

  • operation"list" | "add" | "update" | "refresh" | "remove"required

    What to do with the backends.

  • urlstring or null

    The base URL of the backend.

  • validate_widgetsboolean or null

    For add: whether to check that the backend's widgets load. It does by default.

manage_apps​

Lists, reads or instantiates apps, which are dashboard templates.

Lists, reads or instantiates apps, which are dashboard templates.

Arguments

  • activateboolean or null

    Whether the tab shows the new dashboard. It does by default.

  • app_namestring or null

    The app to read or instantiate. The template id can name it instead.

  • backend_idstring or null

    For list: only the apps of this backend.

  • dashboard_namestring or null

    For instantiate: the name of the new dashboard.

  • operation"list" | "read" | "instantiate"required

    What to do with the apps.

  • template_idstring or null

    The template of the app, as an alternative to its name.

Limits and failures​

LimitValue
Time that the API waits for a command result30 seconds. After this time, the result is ok: false with the error code timeout and retryable: true.
LivenessThe tab sends a ping every 15 seconds. Each ping keeps the session present for 45 seconds. The tab closes a connection that gives no answer for 32 seconds.
No connected tabWhen no tab is connected, the tool call fails with the message "No active FINOS Workspace browser connected". A command can wait when the tab disconnects, or when a new session replaces the tab. That command fails with the error code unavailable and retryable: true. The message is "FINOS Workspace browser disconnected.", or the message for a replaced session.
ReconnectsWhen the tab loses the connection, it tries again a maximum of 3 times. The first wait is 1 second. Each subsequent wait is two times longer. After the last attempt, the tab reports that the connection failed.
Repeated requestsThe API keeps the results of the last 2,048 requests. When a command comes again with the same request_id, it gets the stored result. The command does not run a second time.

The API runs more than one worker process. The socket of the tab is open on only one of them. When a tool call comes to a different worker, that worker sends the call to the worker with the socket. The workers use the shared Redis-compatible store for this. The result comes back in the same way. The AI tool does not need to know which worker holds the tab.