You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parameters, validation, and semantic output checks.
19
+
The OpenBB app-builder instructions are maintained in the [Workspace MCP repository](https://github.com/OpenBB-finance/workspace-mcp). They help agents build custom OpenBB Workspace applications, including backend endpoints, `widgets.json`, `apps.json`, dashboard layouts, thumbnails, widget parameters, validation, and semantic output checks.
24
20
25
21
## Source of truth
26
22
27
-
When your agent is connected to Workspace MCP, ask it to read the live MCP
28
-
resource index:
23
+
When your agent is connected to Workspace MCP, ask it to read the live MCP resource index:
29
24
30
25
```text
31
26
openbb://workspace/app-builder/index
32
27
```
33
28
34
-
The index routes the agent to the right app-builder spec, guide, example, or
35
-
validation resource for the task.
29
+
The index routes the agent to the right app-builder spec, guide, example, or validation resource for the work.
36
30
37
31
## Installable skill package
38
32
39
-
For agents that support installable skills, but are not using Workspace MCP
40
-
resources directly, install the generated `openbb-app-builder` skill from the
41
-
Workspace MCP repository:
33
+
For agents that support installable skills, but are not using Workspace MCP resources directly, install the generated `openbb-app-builder` skill from the Workspace MCP repository:
The OpenBB Workspace MCP is a local companion server that exposes your active Workspace browser session as Model Context Protocol (MCP) tools. An external MCP-capable agent can use those tools to inspect dashboards, fetch widget data, create widgets, manage tabs, register backends, and instantiate Workspace apps.
19
+
The OpenBB Workspace MCP exposes your active Workspace browser session as Model Context Protocol (MCP) tools through a hosted backend endpoint. An external MCP-capable agent can use those tools to inspect dashboards, fetch widget data, create widgets, manage tabs, register backends, and instantiate Workspace apps.
20
20
21
21
Use it when an agent needs structured access to Workspace state. It avoids brittle browser automation because the agent calls Workspace commands directly instead of clicking through the UI.
22
22
@@ -41,14 +41,14 @@ This demo shows Codex using the Workspace MCP to interact with an active OpenBB
41
41
42
42
## Architecture
43
43
44
-
The Workspace MCP runs as a local sidecar process:
44
+
The Workspace MCP is served by the OpenBB backend:
45
45
46
46
```text
47
47
MCP client or agent
48
48
|
49
49
| streamable HTTP MCP
50
50
v
51
-
Workspace MCP sidecar
51
+
OpenBB backend `/mcp`
52
52
|
53
53
| WebSocket bridge
54
54
v
@@ -59,13 +59,13 @@ OpenBB Workspace browser tab
59
59
Dashboards, widgets, apps, data backends, and skills
60
60
```
61
61
62
-
The sidecar exposes a stateless MCP endpoint at `http://127.0.0.1:8787/mcp` by default. Workspace connects to the same sidecar through a browser bridge. Tool calls sent by the agent are forwarded to the connected browser tab, executed by Workspace, and returned as structured results.
62
+
OpenBB Workspace shows the hosted MCP endpoint in the Workspace MCP Companion. The endpoint path is `/mcp`on the same backend host used by Workspace. Workspace connects to the backend through a browser bridge. Tool calls sent by the agent are forwarded to the connected browser tab, executed by Workspace, and returned as structured results.
63
63
64
-
The browser must stay open and connected. If the Workspace tab disconnects, the sidecar remains running but tool calls return an unavailable error until the browser reconnects.
64
+
The browser must stay open and connected. If the Workspace tab disconnects, tool calls return an unavailable error until the browser reconnects. Each user has one active Workspace MCP bridge; connecting another browser bridge replaces the previous one.
65
65
66
66
## What agents can do
67
67
68
-
The current tool surface covers the main Workspace authoring and inspection workflows:
68
+
Workspace MCP covers the main Workspace authoring and inspection workflows:
69
69
70
70
| Area | Examples |
71
71
|------|----------|
@@ -77,7 +77,7 @@ The current tool surface covers the main Workspace authoring and inspection work
77
77
| Widget authoring | Create widgets from backend definitions, update widget parameters, resize or move widgets, read widget state, and delete individual widgets. |
78
78
| Generated artifacts | Add generated notes, tables, charts, and HTML widgets without a backend connection. |
79
79
| Backend and app workflows | Register data backends, refresh backends, list app templates, and instantiate apps into dashboards. |
80
-
| Agent and skill workflows | Delegate tasks to configured Workspace agents and load skills from the Workspace skill library. |
80
+
| Agent and skill workflows | Delegate work to configured Workspace agents and load skills from the Workspace skill library. |
81
81
82
82
The MCP server also publishes app-builder resources under `openbb://workspace/...`. Agents can read these resources when they are building or reviewing Workspace backends, `widgets.json`, or `apps.json` files.
83
83
@@ -114,21 +114,20 @@ This is useful for development workflows where the agent owns both the backend c
114
114
115
115
Treat any MCP client connected to the Workspace MCP as trusted. The tool server can read Workspace state and mutate dashboards in the connected browser session.
116
116
117
-
Keep the sidecar local:
117
+
Workspace MCP uses a Workspace MCP personal access token:
118
118
119
-
-Bind to `127.0.0.1`, which is the default.
120
-
-Do not expose it on `0.0.0.0`, a LAN address, a tunnel, or a public reverse proxy.
121
-
-Use local HTTP for `localhost` or `127.0.0.1`; HTTPS is not required for the local sidecar.
119
+
-Send the token as `Authorization: Bearer <token>`.
120
+
-Store the token in your MCP client configuration.
121
+
-Revoke the token from Workspace when it should stop working.
122
122
- Connect only MCP clients you trust to read and change your Workspace.
123
123
124
-
The Workspace MCP operates inside an existing authenticated browser session. It does not log in for you, manage authentication tokens, change billing, change organization settings, invite users, or share dashboards.
124
+
The Workspace MCP personal access token authenticates the `/mcp` endpoint only. It is not accepted by normal Workspace API routes, and it does not change billing, organization settings, user invites, or dashboard sharing.
125
125
126
126
## Requirements
127
127
128
128
- An OpenBB Workspace browser tab.
129
-
- The Workspace MCP sidecar running locally.
129
+
- The Workspace MCP Companion connected in Workspace.
130
130
- An MCP client that can connect to a streamable HTTP MCP server.
131
-
- Python 3.13 when installing or running the sidecar directly.
132
-
-`uv` for the recommended install path. The helper script installs `uv` if it is not already available.
131
+
- A Workspace MCP personal access token created in Workspace.
133
132
134
133
See [Workspace MCP Quickstart](/agents/workspace-mcp-quickstart) for setup steps and [Workspace MCP Tools](/agents/workspace-mcp-tools) for the tool reference.
This guide starts the Workspace MCP sidecar on your machine, connects it to an OpenBB Workspace browser tab, and configures an MCP client to call Workspace tools.
19
+
This guide connects an external MCP client to an active OpenBB Workspace browser session through the hosted Workspace MCP endpoint.
20
20
21
21
## Prerequisites
22
22
23
23
Before you start:
24
24
25
25
- OpenBB Workspace is available in your browser.
26
26
- Your MCP client supports HTTP MCP servers.
27
-
- Your machine can run Python 3.13.
28
-
- You can install or run tools with `uv`.
27
+
- You can edit your MCP client configuration.
29
28
30
-
The helper script installs `uv` when it is missing. If you manage Python environments manually, install `uv` first and use the direct command shown below.
29
+
The Workspace tab must stay open and connected while the external agent uses Workspace MCP tools.
31
30
32
-
## 1. Start the sidecar
31
+
## 1. Open Workspace MCP Companion
33
32
34
-
Install the sidecar from the [Workspace MCP repository](https://github.com/OpenBB-finance/workspace-mcp), or use one of the one-line installers below.
35
-
36
-
**macOS, Linux, WSL, and Git Bash:**
37
-
38
-
```bash
39
-
curl -LsSf https://raw.githubusercontent.com/OpenBB-finance/workspace-mcp/main/scripts/run.sh | sh
The script installs `uv` if needed, then runs `workspace-mcp` from the OpenBB Workspace MCP source archive.
70
-
71
-
### Passing options to the installer
72
-
73
-
The one-line installers forward any arguments after `--` straight to `workspace-mcp`, so you can set options like `--cors-allow`, `--host`, or `--port` without installing the binary separately.
74
-
75
-
**macOS, Linux, WSL, and Git Bash** — add `-s --` after `sh`, then the flags:
See the [configuration reference](#configuration-reference) for the full list of options you can pass this way. For other advanced options (forks, branches, or local checkouts), see the [Workspace MCP repository](https://github.com/OpenBB-finance/workspace-mcp).
89
-
90
-
## 2. Check sidecar health
91
-
92
-
In another terminal, call the health endpoint:
93
-
94
-
```bash
95
-
curl http://127.0.0.1:8787/health
96
-
```
97
-
98
-
Before Workspace connects, the response should show that the sidecar is running and no browser is attached:
99
-
100
-
```json
101
-
{
102
-
"ok": true,
103
-
"browser_connected": false,
104
-
"pending_commands": 0,
105
-
"session": null
106
-
}
107
-
```
108
-
109
-
After Workspace connects, `browser_connected` should be `true` and `session` should include the current browser session metadata.
110
-
111
-
112
-
## 3. Connect Workspace to the sidecar
113
-
114
-
Open OpenBB Workspace in your browser and connect the local companion:
33
+
Open OpenBB Workspace in your browser and open the hosted companion:
115
34
116
35
1. Open Workspace.
117
36
2. Click the hamburger icon in the top-left corner.
@@ -126,77 +45,71 @@ Open OpenBB Workspace in your browser and connect the local companion:
126
45
/>
127
46
</div>
128
47
129
-
4. Set the companion base URL to `http://127.0.0.1:8787`.
130
-
5. Click the connect action after the sidecar is running.
131
-
48
+
The companion shows the hosted MCP endpoint. The endpoint path is `/mcp` on the same backend host used by Workspace.
By default, the sidecar allows CORS requests from `https://pro.openbb.co` and loopback origins such as `http://localhost:1420` and `http://127.0.0.1:1420`.
52
+
In the companion modal:
143
53
144
-
For a different Workspace origin, pass `--cors-allow`. If you started the sidecar with the one-line installer, forward the flag through `sh -s --`:
| sh -s -- --cors-allow https://example.openbb.dev
149
-
```
58
+
The raw token is shown once. Existing tokens are listed by name and prefix, and can be revoked from the same modal.
150
59
151
-
If you run the binary directly, pass it the same way:
60
+
Workspace MCP tokens are personal access tokens for MCP. They are sent as bearer tokens to `/mcp`, remain valid until revoked, and do not authenticate normal Workspace API routes.
claude mcp add --transport http workspace_mcp http://127.0.0.1:8787/mcp
106
+
claude mcp add --transport http workspace_mcp \
107
+
https://pro.openbb.co/mcp \
108
+
--header "Authorization: Bearer obb_mcp_..."
198
109
```
199
110
111
+
If your client has an `mcp add` command or settings UI, choose the HTTP transport, use the hosted `/mcp` URL, and configure the same `Authorization` header.
112
+
200
113
## 5. Validate the connection
201
114
202
115
Ask the agent to call `get_workspace_snapshot`. A successful call should return the active Workspace state, including dashboard metadata and the current dashboard composition when available.
@@ -207,7 +120,7 @@ A practical validation prompt is:
207
120
Call get_workspace_snapshot and tell me the active dashboard id and the visible tabs.
208
121
```
209
122
210
-
If the agent can list the dashboard and tabs, the MCP client, sidecar, and browser bridge are connected.
123
+
If the agent can list the dashboard and tabs, the MCP client, hosted MCP endpoint, and browser bridge are connected.
211
124
212
125
## 6. Try common Workspace actions
213
126
@@ -243,25 +156,12 @@ Analyze my current portfolio exposure and add a markdown note widget with that a
243
156
/>
244
157
</div>
245
158
246
-
## Configuration reference
247
-
248
-
| Option | Default | Description |
249
-
|--------|---------|-------------|
250
-
|`--host`|`127.0.0.1`| Host interface for the sidecar HTTP server. Keep this on loopback for normal use. |
251
-
|`--port`|`8787`| Port for the sidecar HTTP server. |
252
-
|`--mcp-path`|`/mcp`| Path for the streamable HTTP MCP endpoint. |
253
-
|`--command-timeout-seconds`|`15.0`| Seconds to wait for one browser command result. |
254
-
|`--cors-allow`| production Workspace and loopback origins | Extra browser origins allowed to call the sidecar. |
255
-
|`--reload`| disabled | Restart the local development server when source files change. |
256
-
257
-
In reload mode, the CLI also maps options to `OPENBB_WORKSPACE_MCP_*` environment variables so Uvicorn can recreate the app.
258
-
259
159
## Troubleshooting
260
160
261
161
| Symptom | What to check |
262
162
|---------|---------------|
263
-
|`No Workspace browser is connected.`|Open Workspace, open Workspace MCP Companion, and connect it to the sidecar base URL. |
264
-
|`browser_connected` is `false` in `/health`|The sidecar is running, but the browser bridge has not connected or has disconnected. |
265
-
|Browser CORS error | Add the Workspace browser origin with `--cors-allow`. |
266
-
|Tool call times out|Keep the Workspace tab open and active enough to execute commands. Increase `--command-timeout-seconds` for slower operations. |
267
-
|MCP client cannot connect | Confirm the client supports HTTP MCP servers and uses `http://127.0.0.1:8787/mcp`, not the sidecar base URL. |
163
+
|`Could not validate Workspace MCP credentials`|Confirm the MCP client sends `Authorization: Bearer <token>` and that the token has not been revoked. |
164
+
|`No active Workspace browser connected`|Open Workspace, open Workspace MCP Companion, and click **Connect**. |
165
+
|Tool call times out | Keep the Workspace tab open and active enough to execute commands. |
166
+
|MCP client cannot connect|Confirm the client supports HTTP MCP servers and uses the hosted `/mcp` URL copied from Workspace MCP Companion. |
167
+
|Agent sees out-of-date dashboard state | Call `get_workspace_snapshot` again after navigation or reconnect the browser bridge. |
0 commit comments