@octavus/docs 2.15.0 → 2.17.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/01-getting-started/02-quickstart.md +1 -0
- package/content/02-server-sdk/01-overview.md +26 -0
- package/content/02-server-sdk/02-sessions.md +11 -0
- package/content/02-server-sdk/03-tools.md +4 -1
- package/content/02-server-sdk/04-streaming.md +9 -0
- package/content/02-server-sdk/08-computer.md +400 -0
- package/content/03-client-sdk/06-http-transport.md +2 -0
- package/content/04-protocol/01-overview.md +9 -0
- package/content/04-protocol/04-tools.md +5 -4
- package/content/04-protocol/05-skills.md +88 -8
- package/content/04-protocol/06-handlers.md +3 -1
- package/content/04-protocol/07-agent-config.md +65 -17
- package/content/04-protocol/09-skills-advanced.md +89 -8
- package/content/04-protocol/13-mcp-servers.md +289 -0
- package/content/06-examples/02-nextjs-chat.md +1 -0
- package/dist/chunk-4PNP4HF5.js +1549 -0
- package/dist/chunk-4PNP4HF5.js.map +1 -0
- package/dist/{chunk-2UFDUNPK.js → chunk-54ND2CTI.js} +25 -21
- package/dist/chunk-54ND2CTI.js.map +1 -0
- package/dist/chunk-B4A36GEV.js +1549 -0
- package/dist/chunk-B4A36GEV.js.map +1 -0
- package/dist/chunk-CFDET7QG.js +1549 -0
- package/dist/chunk-CFDET7QG.js.map +1 -0
- package/dist/chunk-DKVYIFV7.js +1549 -0
- package/dist/chunk-DKVYIFV7.js.map +1 -0
- package/dist/{chunk-JEOGYIRI.js → chunk-UZWGRPRR.js} +61 -21
- package/dist/chunk-UZWGRPRR.js.map +1 -0
- package/dist/content.js +1 -1
- package/dist/docs.json +34 -16
- 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 +34 -16
- package/package.json +1 -1
- package/dist/chunk-2UFDUNPK.js.map +0 -1
- package/dist/chunk-JEOGYIRI.js.map +0 -1
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MCP Servers
|
|
3
|
+
description: Connecting agents to external tools via Model Context Protocol (MCP).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MCP Servers
|
|
7
|
+
|
|
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
|
+
|
|
10
|
+
There are two types of MCP servers:
|
|
11
|
+
|
|
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 consumer's machine via server-sdk | Browser automation, filesystem |
|
|
16
|
+
|
|
17
|
+
## Defining MCP Servers
|
|
18
|
+
|
|
19
|
+
MCP servers are defined in the `mcpServers:` section. The key becomes the **namespace** for all tools from that server.
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
mcpServers:
|
|
23
|
+
figma:
|
|
24
|
+
description: Figma design tool integration
|
|
25
|
+
source: remote
|
|
26
|
+
display: description
|
|
27
|
+
|
|
28
|
+
browser:
|
|
29
|
+
description: Chrome DevTools browser automation
|
|
30
|
+
source: device
|
|
31
|
+
display: name
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Fields
|
|
35
|
+
|
|
36
|
+
| Field | Required | Description |
|
|
37
|
+
| ------------- | -------- | ------------------------------------------------------------------------------------- |
|
|
38
|
+
| `description` | Yes | What the MCP server provides |
|
|
39
|
+
| `source` | Yes | `remote` (platform-managed) or `device` (consumer-provided) |
|
|
40
|
+
| `display` | No | How tool calls appear in UI: `hidden`, `name`, `description` (default: `description`) |
|
|
41
|
+
|
|
42
|
+
### Display Modes
|
|
43
|
+
|
|
44
|
+
Display modes control visibility of all tool calls from the MCP server, using the same modes as [regular tools](/docs/protocol/tools#display-modes):
|
|
45
|
+
|
|
46
|
+
| Mode | Behavior |
|
|
47
|
+
| ------------- | -------------------------------------- |
|
|
48
|
+
| `hidden` | Tool calls run silently |
|
|
49
|
+
| `name` | Shows tool name while executing |
|
|
50
|
+
| `description` | Shows tool description while executing |
|
|
51
|
+
|
|
52
|
+
## Making MCP Servers Available
|
|
53
|
+
|
|
54
|
+
Like tools, MCP servers defined in `mcpServers:` must be referenced in `agent.mcpServers` to be available:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
mcpServers:
|
|
58
|
+
figma:
|
|
59
|
+
description: Figma design tool integration
|
|
60
|
+
source: remote
|
|
61
|
+
display: description
|
|
62
|
+
|
|
63
|
+
sentry:
|
|
64
|
+
description: Error tracking and debugging
|
|
65
|
+
source: remote
|
|
66
|
+
display: name
|
|
67
|
+
|
|
68
|
+
browser:
|
|
69
|
+
description: Chrome DevTools browser automation
|
|
70
|
+
source: device
|
|
71
|
+
display: name
|
|
72
|
+
|
|
73
|
+
filesystem:
|
|
74
|
+
description: Filesystem access for reading and writing files
|
|
75
|
+
source: device
|
|
76
|
+
display: hidden
|
|
77
|
+
|
|
78
|
+
agent:
|
|
79
|
+
model: anthropic/claude-sonnet-4-5
|
|
80
|
+
system: system
|
|
81
|
+
mcpServers: [figma, sentry, browser, filesystem]
|
|
82
|
+
tools: [set-chat-title]
|
|
83
|
+
agentic: true
|
|
84
|
+
maxSteps: 100
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Tool Namespacing
|
|
88
|
+
|
|
89
|
+
All MCP tools are automatically namespaced using `__` (double underscore) as a separator. The namespace comes from the `mcpServers` key.
|
|
90
|
+
|
|
91
|
+
For example, a server defined as `browser:` that exposes `navigate_page` and `click` produces:
|
|
92
|
+
|
|
93
|
+
- `browser__navigate_page`
|
|
94
|
+
- `browser__click`
|
|
95
|
+
|
|
96
|
+
A server defined as `figma:` that exposes `get_design_context` produces:
|
|
97
|
+
|
|
98
|
+
- `figma__get_design_context`
|
|
99
|
+
|
|
100
|
+
The namespace is stripped before calling the MCP server — the server receives the original tool name. This convention matches Anthropic's MCP integration in Claude Desktop and ensures tool names stay unique across servers.
|
|
101
|
+
|
|
102
|
+
### What the LLM Sees
|
|
103
|
+
|
|
104
|
+
When an agent has both regular tools and MCP servers configured, the LLM sees all tools combined:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Protocol tools:
|
|
108
|
+
set-chat-title
|
|
109
|
+
|
|
110
|
+
Remote MCP tools (auto-discovered):
|
|
111
|
+
figma__get_design_context
|
|
112
|
+
figma__get_screenshot
|
|
113
|
+
sentry__get_issues
|
|
114
|
+
sentry__get_issue_details
|
|
115
|
+
|
|
116
|
+
Device MCP tools (auto-discovered):
|
|
117
|
+
browser__navigate_page
|
|
118
|
+
browser__click
|
|
119
|
+
browser__take_snapshot
|
|
120
|
+
filesystem__read_file
|
|
121
|
+
filesystem__write_file
|
|
122
|
+
filesystem__list_directory
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
You don't define individual MCP tool schemas in the protocol — they're auto-discovered from each MCP server at runtime.
|
|
126
|
+
|
|
127
|
+
## Remote MCP Servers
|
|
128
|
+
|
|
129
|
+
Remote MCP servers (`source: remote`) connect to HTTP-based MCP endpoints. The platform manages the connection, authentication, and tool discovery.
|
|
130
|
+
|
|
131
|
+
Configuration happens in the Octavus platform UI:
|
|
132
|
+
|
|
133
|
+
1. Add an MCP server to your project (URL + authentication)
|
|
134
|
+
2. The server's slug must match the namespace in your protocol
|
|
135
|
+
3. The platform connects, discovers tools, and makes them available to the agent
|
|
136
|
+
|
|
137
|
+
### Authentication
|
|
138
|
+
|
|
139
|
+
Remote MCP servers support multiple authentication methods:
|
|
140
|
+
|
|
141
|
+
| Auth Type | Description |
|
|
142
|
+
| --------- | ------------------------------- |
|
|
143
|
+
| MCP OAuth | Standard MCP OAuth flow |
|
|
144
|
+
| API Key | Static API key sent as a header |
|
|
145
|
+
| Bearer | Bearer token authentication |
|
|
146
|
+
| None | No authentication required |
|
|
147
|
+
|
|
148
|
+
Authentication is configured per-project — different projects can connect to the same MCP server with different credentials.
|
|
149
|
+
|
|
150
|
+
## Device MCP Servers
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
154
|
+
When an agent has device MCP servers:
|
|
155
|
+
|
|
156
|
+
1. The consumer creates a `Computer` with matching namespaces
|
|
157
|
+
2. `@octavus/computer` discovers tools from each MCP server
|
|
158
|
+
3. Tool schemas are sent to the platform via the server-sdk
|
|
159
|
+
4. Tool calls flow back to the consumer for execution
|
|
160
|
+
|
|
161
|
+
See [`@octavus/computer`](/docs/server-sdk/computer) for the full integration guide.
|
|
162
|
+
|
|
163
|
+
### Namespace Matching
|
|
164
|
+
|
|
165
|
+
The `mcpServers` keys in the protocol must match the keys in the consumer's `Computer` configuration:
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
# protocol.yaml
|
|
169
|
+
mcpServers:
|
|
170
|
+
browser: # ← must match
|
|
171
|
+
source: device
|
|
172
|
+
filesystem: # ← must match
|
|
173
|
+
source: device
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
const computer = new Computer({
|
|
178
|
+
mcpServers: {
|
|
179
|
+
browser: Computer.stdio('chrome-devtools-mcp', ['--browser-url=...']),
|
|
180
|
+
filesystem: Computer.stdio('@modelcontextprotocol/server-filesystem', [dir]),
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
If the consumer provides a namespace not declared in the protocol, the platform rejects it.
|
|
186
|
+
|
|
187
|
+
## Thread-Level Scoping
|
|
188
|
+
|
|
189
|
+
Threads can scope which MCP servers are available, the same way they scope [tools](/docs/protocol/handlers#start-thread):
|
|
190
|
+
|
|
191
|
+
```yaml
|
|
192
|
+
handlers:
|
|
193
|
+
user-message:
|
|
194
|
+
Start research:
|
|
195
|
+
block: start-thread
|
|
196
|
+
thread: research
|
|
197
|
+
mcpServers: [figma, browser]
|
|
198
|
+
tools: [set-chat-title]
|
|
199
|
+
system: research-prompt
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
This thread can use Figma and browser tools, but not sentry or filesystem — even if those are available on the main agent.
|
|
203
|
+
|
|
204
|
+
## Full Example
|
|
205
|
+
|
|
206
|
+
```yaml
|
|
207
|
+
mcpServers:
|
|
208
|
+
figma:
|
|
209
|
+
description: Figma design tool integration
|
|
210
|
+
source: remote
|
|
211
|
+
display: description
|
|
212
|
+
sentry:
|
|
213
|
+
description: Error tracking and debugging
|
|
214
|
+
source: remote
|
|
215
|
+
display: name
|
|
216
|
+
browser:
|
|
217
|
+
description: Chrome DevTools browser automation
|
|
218
|
+
source: device
|
|
219
|
+
display: name
|
|
220
|
+
filesystem:
|
|
221
|
+
description: Filesystem access for reading and writing files
|
|
222
|
+
source: device
|
|
223
|
+
display: hidden
|
|
224
|
+
shell:
|
|
225
|
+
description: Shell command execution
|
|
226
|
+
source: device
|
|
227
|
+
display: name
|
|
228
|
+
|
|
229
|
+
tools:
|
|
230
|
+
set-chat-title:
|
|
231
|
+
description: Set the title of the current chat.
|
|
232
|
+
parameters:
|
|
233
|
+
title: { type: string, description: The title to set }
|
|
234
|
+
|
|
235
|
+
agent:
|
|
236
|
+
model: anthropic/claude-opus-4-6
|
|
237
|
+
system: system
|
|
238
|
+
mcpServers: [figma, sentry, browser, filesystem, shell]
|
|
239
|
+
tools: [set-chat-title]
|
|
240
|
+
thinking: medium
|
|
241
|
+
maxSteps: 300
|
|
242
|
+
agentic: true
|
|
243
|
+
|
|
244
|
+
triggers:
|
|
245
|
+
user-message:
|
|
246
|
+
input:
|
|
247
|
+
USER_MESSAGE: { type: string }
|
|
248
|
+
|
|
249
|
+
handlers:
|
|
250
|
+
user-message:
|
|
251
|
+
Add message:
|
|
252
|
+
block: add-message
|
|
253
|
+
role: user
|
|
254
|
+
prompt: user-message
|
|
255
|
+
input: [USER_MESSAGE]
|
|
256
|
+
display: hidden
|
|
257
|
+
|
|
258
|
+
Respond:
|
|
259
|
+
block: next-message
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Cloud-Only Agent
|
|
263
|
+
|
|
264
|
+
Agents that only use remote MCP servers don't need `@octavus/computer`:
|
|
265
|
+
|
|
266
|
+
```yaml
|
|
267
|
+
mcpServers:
|
|
268
|
+
figma:
|
|
269
|
+
description: Figma design tool integration
|
|
270
|
+
source: remote
|
|
271
|
+
display: description
|
|
272
|
+
sentry:
|
|
273
|
+
description: Error tracking and debugging
|
|
274
|
+
source: remote
|
|
275
|
+
display: name
|
|
276
|
+
|
|
277
|
+
tools:
|
|
278
|
+
submit-code:
|
|
279
|
+
description: Submit code to the user.
|
|
280
|
+
parameters:
|
|
281
|
+
code: { type: string }
|
|
282
|
+
|
|
283
|
+
agent:
|
|
284
|
+
model: anthropic/claude-sonnet-4-5
|
|
285
|
+
system: system
|
|
286
|
+
mcpServers: [figma, sentry]
|
|
287
|
+
tools: [submit-code]
|
|
288
|
+
agentic: true
|
|
289
|
+
```
|