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
Copy file name to clipboardExpand all lines: docs/features/mcp/using-mcp-in-roo.mdx
+66-27Lines changed: 66 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,23 +73,23 @@ Both files use a JSON format with a `mcpServers` object containing named server
73
73
}
74
74
```
75
75
*Example of MCP Server config in Roo Code (STDIO Transport)*
76
-
76
+
77
77
### 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
+
81
81
#### STDIO Transport
82
-
82
+
83
83
Used for local servers running on your machine:
84
-
84
+
85
85
* Communicates via standard input/output streams
86
86
* Lower latency (no network overhead)
87
87
* Better security (no network exposure)
88
88
* Simpler setup (no HTTP server needed)
89
89
* Runs as a child process on your machine
90
-
90
+
91
91
For more in-depth information about how STDIO transport works, see [STDIO Transport](/features/mcp/server-transports#stdio-transport).
92
-
92
+
93
93
STDIO configuration parameters:
94
94
95
95
*`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
116
116
}
117
117
}
118
118
```
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.
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)
125
162
* Can be hosted on a different machine
126
163
* Supports multiple client connections
127
164
* Requires network access
128
165
* 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:
133
166
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.
135
173
*`headers` (optional): An object containing custom HTTP headers to send with requests (e.g., for authentication tokens).
136
174
*`alwaysAllow` (optional): An array of tool names from this server to automatically approve.
137
175
*`disabled` (optional): Set to `true` to disable this server configuration.
138
176
139
-
SSE configuration example:
177
+
SSE (Legacy) configuration example:
140
178
```json
141
179
{
142
180
"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
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.
158
197
159
198
1. Click the <Codiconname="server" /> icon in the top navigation of the Roo Code pane
@@ -166,7 +205,7 @@ Disabling your MCP Servers here will remove all MCP related logic and definition
166
205
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.
167
206
168
207
1. Click the <Codiconname="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`
170
209
171
210
<imgsrc="/img/using-mcp-in-roo/using-mcp-in-roo-3.png"alt="Enable MCP Server Creation toggle"width="400" />
0 commit comments