Skip to content

Commit 01fb129

Browse files
committed
update using guide
1 parent e2a5b5e commit 01fb129

File tree

1 file changed

+66
-27
lines changed

1 file changed

+66
-27
lines changed

docs/features/mcp/using-mcp-in-roo.mdx

Lines changed: 66 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,23 @@ Both files use a JSON format with a `mcpServers` object containing named server
7373
}
7474
```
7575
*Example of MCP Server config in Roo Code (STDIO Transport)*
76-
76+
7777
### Understanding Transport Types
78-
79-
MCP supports two transport types for server communication:
80-
78+
79+
MCP supports three transport types for server communication: STDIO for local servers, Streamable HTTP (recommended for new remote servers), and SSE (for legacy remote servers).
80+
8181
#### STDIO Transport
82-
82+
8383
Used for local servers running on your machine:
84-
84+
8585
* Communicates via standard input/output streams
8686
* Lower latency (no network overhead)
8787
* Better security (no network exposure)
8888
* Simpler setup (no HTTP server needed)
8989
* Runs as a child process on your machine
90-
90+
9191
For more in-depth information about how STDIO transport works, see [STDIO Transport](/features/mcp/server-transports#stdio-transport).
92-
92+
9393
STDIO configuration parameters:
9494

9595
* `command` (required): The executable to run (e.g., `node`, `python`, `npx`, or an absolute path).
@@ -116,48 +116,87 @@ Both files use a JSON format with a `mcpServers` object containing named server
116116
}
117117
}
118118
```
119-
120-
#### SSE Transport
121-
122-
Used for remote servers accessed over HTTP/HTTPS:
123-
124-
* Communicates via Server-Sent Events protocol
119+
#### Streamable HTTP Transport
120+
121+
This is the **modern standard** for remote servers accessed over HTTP/HTTPS, offering more flexibility and replacing the legacy SSE transport for new implementations.
122+
123+
* Communicates via HTTP POST/GET to a single MCP endpoint
124+
* Optionally uses Server-Sent Events (SSE) for streaming
125+
* Can be hosted on a different machine
126+
* Supports multiple client connections
127+
* Requires network access
128+
* Allows centralized deployment and management
129+
130+
For more in-depth information about how Streamable HTTP transport works, see [Streamable HTTP Transport](/features/mcp/server-transports#streamable-http-transport).
131+
132+
Streamable HTTP configuration parameters:
133+
134+
* `type` (required): Must be set to `"streamable-http"`.
135+
* `url` (required): The full URL of the remote MCP server's single endpoint (e.g., `https://your-server.com/mcp`).
136+
* `headers` (optional): An object containing custom HTTP headers to send with requests (e.g., for authentication tokens).
137+
* `alwaysAllow` (optional): An array of tool names from this server to automatically approve.
138+
* `disabled` (optional): Set to `true` to disable this server configuration.
139+
140+
Streamable HTTP configuration example:
141+
```json
142+
{
143+
"mcpServers": {
144+
"modern-remote-server": {
145+
"type": "streamable-http",
146+
"url": "https://your-modern-server.com/api/mcp-endpoint",
147+
"headers": {
148+
"X-API-Key": "your-secure-api-key"
149+
},
150+
"alwaysAllow": ["newToolA", "newToolB"],
151+
"disabled": false
152+
}
153+
}
154+
}
155+
```
156+
157+
#### SSE Transport (Legacy)
158+
159+
Used for older remote servers accessed over HTTP/HTTPS. **For new remote server implementations, [Streamable HTTP Transport](#streamable-http-transport) is recommended.**
160+
161+
* Communicates via Server-Sent Events protocol (typically requires separate endpoints for client-to-server and server-to-client communication)
125162
* Can be hosted on a different machine
126163
* Supports multiple client connections
127164
* Requires network access
128165
* Allows centralized deployment and management
129-
130-
For more in-depth information about how SSE transport works, see [SSE Transport](/features/mcp/server-transports#sse-transport).
131-
132-
SSE configuration parameters:
133166

134-
* `url` (required): The full URL endpoint of the remote MCP server (e.g., `https://your-server.com/mcp`).
167+
For more in-depth information about how legacy SSE transport works, see [SSE Transport (Legacy)](/features/mcp/server-transports#sse-transport-legacy).
168+
169+
SSE (Legacy) configuration parameters:
170+
171+
* `type` (optional, but recommended for clarity): Should be set to `"sse"` if providing a `url` for an SSE server, to distinguish from Streamable HTTP. If `url` is present and `type` is omitted, Roo Code might try to infer, but explicit declaration is safer.
172+
* `url` (required): The base URL for the remote MCP server. For legacy SSE, this usually implies separate paths like `/events` (for SSE stream) and `/message` (for POST requests) will be derived or expected by the server.
135173
* `headers` (optional): An object containing custom HTTP headers to send with requests (e.g., for authentication tokens).
136174
* `alwaysAllow` (optional): An array of tool names from this server to automatically approve.
137175
* `disabled` (optional): Set to `true` to disable this server configuration.
138176

139-
SSE configuration example:
177+
SSE (Legacy) configuration example:
140178
```json
141179
{
142180
"mcpServers": {
143-
"remote-server": {
144-
"url": "https://your-server-url.com/mcp",
181+
"legacy-remote-server": {
182+
"type": "sse", // Explicitly define as SSE
183+
"url": "https://your-legacy-server-url.com/mcp-base", // Base URL
145184
"headers": {
146-
"Authorization": "Bearer your-token" // Example: Authentication header
185+
"Authorization": "Bearer your-legacy-token"
147186
},
148-
"alwaysAllow": ["tool3"],
187+
"alwaysAllow": ["oldToolX"],
149188
"disabled": false
150189
}
151190
}
152191
}
153192
```
154-
193+
155194
## Enabling or Disabling MCP Servers
156195

157196
Disabling your MCP Servers here will remove all MCP related logic and definitions from your system prompt, reducing your token usage. This will prevent Roo Code from connecting to any MCP servers, and the `use_mcp_tool` and `access_mcp_resource` tools will not be available. Check this off if you don't intend to use MCP Servers. This is on by default.
158197

159198
1. Click the <Codicon name="server" /> icon in the top navigation of the Roo Code pane
160-
2. Check/Uncheck `Enable MCP Servers`
199+
2. Check/Uncheck `Enable MCP Servers`
161200

162201
<img src="/img/using-mcp-in-roo/using-mcp-in-roo-2.png" alt="Enable MCP Servers toggle" width="400" />
163202

@@ -166,7 +205,7 @@ Disabling your MCP Servers here will remove all MCP related logic and definition
166205
Disabling your MCP Server Creation here will just remove the instructions from your system prompt that Roo Code uses to write MCP servers while not removing the context related to operating them. This reduces token usage. This is on by default.
167206

168207
1. Click the <Codicon name="server" /> icon in the top navigation of the Roo Code pane
169-
2. Check/Uncheck `Enable MCP Server Creation`
208+
2. Check/Uncheck `Enable MCP Server Creation`
170209

171210
<img src="/img/using-mcp-in-roo/using-mcp-in-roo-3.png" alt="Enable MCP Server Creation toggle" width="400" />
172211

0 commit comments

Comments
 (0)