@octavus/docs 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/02-server-sdk/03-tools.md +8 -7
- package/content/02-server-sdk/08-computer.md +92 -0
- package/content/02-server-sdk/09-inline-mcp.md +204 -0
- package/content/03-client-sdk/08-file-uploads.md +11 -5
- package/content/04-protocol/05-skills.md +83 -21
- package/content/04-protocol/09-skills-advanced.md +26 -8
- package/content/04-protocol/11-workers.md +3 -1
- package/content/04-protocol/13-mcp-servers.md +105 -13
- package/dist/{chunk-R4UMXGAC.js → chunk-5L4PRXYU.js} +45 -27
- package/dist/chunk-5L4PRXYU.js.map +1 -0
- package/dist/content.js +1 -1
- package/dist/docs.json +22 -13
- package/dist/index.js +1 -1
- package/dist/search-index.json +1 -1
- package/dist/search.js +1 -1
- package/dist/search.js.map +1 -1
- package/dist/sections.json +22 -13
- package/package.json +1 -1
- package/dist/chunk-R4UMXGAC.js.map +0 -1
|
@@ -7,12 +7,13 @@ description: Connecting agents to external tools via Model Context Protocol (MCP
|
|
|
7
7
|
|
|
8
8
|
MCP servers extend your agent with tools from external services. Define them in your protocol, and agents automatically discover and use their tools at runtime.
|
|
9
9
|
|
|
10
|
-
There are
|
|
10
|
+
There are three types of MCP servers:
|
|
11
11
|
|
|
12
|
-
| Source
|
|
13
|
-
|
|
|
14
|
-
| `remote`
|
|
15
|
-
| `device`
|
|
12
|
+
| Source | Description | Example |
|
|
13
|
+
| ---------- | ----------------------------------------------------------------------------------- | ------------------------------------- |
|
|
14
|
+
| `remote` | HTTP-based MCP servers, managed by the platform | Figma, Sentry, GitHub |
|
|
15
|
+
| `device` | Local MCP servers running on the agent's machine via `@octavus/computer` | Browser automation, filesystem |
|
|
16
|
+
| `consumer` | Inline MCP servers defined in your server-sdk process via `createInlineMcpServer()` | Custom integrations, third-party APIs |
|
|
16
17
|
|
|
17
18
|
## Defining MCP Servers
|
|
18
19
|
|
|
@@ -29,16 +30,22 @@ mcpServers:
|
|
|
29
30
|
description: Chrome DevTools browser automation
|
|
30
31
|
source: device
|
|
31
32
|
display: name
|
|
33
|
+
|
|
34
|
+
github:
|
|
35
|
+
description: Repository management - issues, pull requests, code
|
|
36
|
+
source: consumer
|
|
37
|
+
display: name
|
|
32
38
|
```
|
|
33
39
|
|
|
34
40
|
### Fields
|
|
35
41
|
|
|
36
|
-
| Field | Required | Description
|
|
37
|
-
| ------------- | -------- |
|
|
38
|
-
| `description` | Yes | What the MCP server provides
|
|
39
|
-
| `source` | Yes | `remote`
|
|
40
|
-
| `display` | No | How tool calls appear in UI: `hidden`, `name`, `description` (default: `description`)
|
|
41
|
-
| `connection` | No | When to connect: `eager` or `lazy` (default: `lazy`).
|
|
42
|
+
| Field | Required | Description |
|
|
43
|
+
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `description` | Yes | What the MCP server provides |
|
|
45
|
+
| `source` | Yes | `remote`, `device`, or `consumer` (see source types above) |
|
|
46
|
+
| `display` | No | How tool calls appear in UI: `hidden`, `name`, `description` (default: `description`) |
|
|
47
|
+
| `connection` | No | When to connect: `eager` or `lazy` (default: `lazy`). `remote` only. |
|
|
48
|
+
| `execution` | No | Where the MCP process runs: `sandbox` (default) or `device`. `remote` only. See [Device Execution](#device-execution). |
|
|
42
49
|
|
|
43
50
|
### Display Modes
|
|
44
51
|
|
|
@@ -121,9 +128,13 @@ Device MCP tools (auto-discovered):
|
|
|
121
128
|
filesystem__read_file
|
|
122
129
|
filesystem__write_file
|
|
123
130
|
filesystem__list_directory
|
|
131
|
+
|
|
132
|
+
Consumer MCP tools (provided by the server-sdk):
|
|
133
|
+
github__get-pr-overview
|
|
134
|
+
github__list-issues
|
|
124
135
|
```
|
|
125
136
|
|
|
126
|
-
You don't define individual MCP tool schemas in the protocol -
|
|
137
|
+
You don't define individual MCP tool schemas in the protocol - remote and device tools are auto-discovered from each MCP server at runtime, and consumer tools are supplied by the server-sdk.
|
|
127
138
|
|
|
128
139
|
## Remote MCP Servers
|
|
129
140
|
|
|
@@ -161,7 +172,7 @@ With **lazy connection** (the default), the agent receives two built-in tools -
|
|
|
161
172
|
|
|
162
173
|
With **eager connection**, the platform connects to the MCP server before the first LLM request, exactly like a declared tool. Use this when the agent needs the MCP's tools from the very first message.
|
|
163
174
|
|
|
164
|
-
The `connection` field is only valid on `source: remote` - device MCPs have their own connection mechanism through the server-sdk.
|
|
175
|
+
The `connection` field is only valid on `source: remote` - device MCPs (`source: device`) have their own connection mechanism through the server-sdk. The `connection` field is respected for remote MCPs with `execution: device` the same way as sandbox MCPs.
|
|
165
176
|
|
|
166
177
|
### Authentication
|
|
167
178
|
|
|
@@ -176,6 +187,35 @@ Remote MCP servers support multiple authentication methods:
|
|
|
176
187
|
|
|
177
188
|
Authentication is configured per-project - different projects can connect to the same MCP server with different credentials.
|
|
178
189
|
|
|
190
|
+
## Device Execution
|
|
191
|
+
|
|
192
|
+
The `execution` field controls where a remote MCP server's STDIO process runs. By default (`execution: sandbox`), the process runs in the platform's sandbox. When set to `execution: device`, the STDIO process runs on the agent's computer (VM or desktop) instead.
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
mcpServers:
|
|
196
|
+
code-tools:
|
|
197
|
+
description: Code analysis and refactoring tools
|
|
198
|
+
source: remote
|
|
199
|
+
execution: device # STDIO process runs on the agent's computer
|
|
200
|
+
display: name
|
|
201
|
+
|
|
202
|
+
sentry:
|
|
203
|
+
description: Error tracking
|
|
204
|
+
source: remote
|
|
205
|
+
# execution defaults to sandbox - runs in the platform
|
|
206
|
+
display: name
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### When to Use
|
|
210
|
+
|
|
211
|
+
Use `execution: device` when the MCP server needs access to the agent's local environment - for example, tools that read from the local filesystem, interact with running processes, or need CLIs installed on the device.
|
|
212
|
+
|
|
213
|
+
### Rules
|
|
214
|
+
|
|
215
|
+
- `execution` is only meaningful for `source: remote` MCPs that use STDIO transport. HTTP-transport remote MCPs always connect from the platform regardless of the `execution` setting.
|
|
216
|
+
- `execution` is **invalid** on `source: device` and `source: consumer` MCPs - they already run outside the platform. Using it produces a validation error.
|
|
217
|
+
- The `connection` field (`eager` or `lazy`) is respected for device-executed MCPs the same way as sandbox-executed MCPs.
|
|
218
|
+
|
|
179
219
|
## Device MCP Servers
|
|
180
220
|
|
|
181
221
|
Device MCP servers (`source: device`) run on the consumer's machine. The consumer provides the MCP tools via the `@octavus/computer` package (or any `ToolProvider` implementation) through the server-sdk.
|
|
@@ -213,6 +253,55 @@ const computer = new Computer({
|
|
|
213
253
|
|
|
214
254
|
If the consumer provides a namespace not declared in the protocol, the platform rejects it.
|
|
215
255
|
|
|
256
|
+
## Consumer MCP Servers
|
|
257
|
+
|
|
258
|
+
Consumer MCP servers (`source: consumer`) are defined inline in your server-sdk process. Tool schemas and handlers live in your code; the platform learns the namespace from the protocol and routes tool calls to your process via the same `dynamicToolSchemas` channel that device MCPs use.
|
|
259
|
+
|
|
260
|
+
```yaml
|
|
261
|
+
mcpServers:
|
|
262
|
+
github:
|
|
263
|
+
description: Repository management - issues, pull requests, code
|
|
264
|
+
source: consumer
|
|
265
|
+
display: name
|
|
266
|
+
|
|
267
|
+
agent:
|
|
268
|
+
mcpServers:
|
|
269
|
+
- github
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The protocol declaration is intentionally minimal - the SDK supplies tool names and JSON schemas at runtime, so adding or evolving tools doesn't require a protocol change.
|
|
273
|
+
|
|
274
|
+
Use consumer MCPs when:
|
|
275
|
+
|
|
276
|
+
- The integration's credentials should never reach the platform (OAuth tokens, customer API keys).
|
|
277
|
+
- You want to group an integration's tools (`github__list-prs`, `github__get-issue`) without enumerating each one in YAML.
|
|
278
|
+
- You want type-safe handler arguments via Zod schemas.
|
|
279
|
+
|
|
280
|
+
See [`createInlineMcpServer`](/docs/server-sdk/inline-mcp) in the server-sdk reference for the full implementation guide.
|
|
281
|
+
|
|
282
|
+
### Namespace Matching
|
|
283
|
+
|
|
284
|
+
The protocol namespace must match the namespace passed to `createInlineMcpServer()`:
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
# protocol.yaml
|
|
288
|
+
mcpServers:
|
|
289
|
+
github: # ← must match
|
|
290
|
+
source: consumer
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
```typescript
|
|
294
|
+
const github = createInlineMcpServer('github', {
|
|
295
|
+
/* tools... */
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
session = client.agentSessions.attach(sessionId, {
|
|
299
|
+
mcpServers: [github],
|
|
300
|
+
});
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
If the SDK provides a namespace not declared in the protocol, those tools are filtered out at the runtime boundary and the LLM never sees them.
|
|
304
|
+
|
|
216
305
|
## Thread-Level Scoping
|
|
217
306
|
|
|
218
307
|
Threads can scope which MCP servers are available, the same way they scope [tools](/docs/protocol/handlers#start-thread):
|
|
@@ -253,10 +342,13 @@ onDemandMcpServers:
|
|
|
253
342
|
remote:
|
|
254
343
|
description: Additional connected integrations
|
|
255
344
|
display: name
|
|
345
|
+
execution: device # on-demand MCPs run on the agent's computer
|
|
256
346
|
contextRetention:
|
|
257
347
|
toolResults: { retainLast: 5 }
|
|
258
348
|
```
|
|
259
349
|
|
|
350
|
+
On-demand MCP definitions also support the `execution` field. When set, all MCPs matched by that on-demand source inherit the execution mode.
|
|
351
|
+
|
|
260
352
|
### Scope-level opt-in
|
|
261
353
|
|
|
262
354
|
The agent and individual `start-thread` blocks each choose whether to pick up on-demand MCPs, by listing the sources they want:
|