Skip to content

Commit 651daee

Browse files
committed
Update MCP documentation to clarify server configuration and precedence; add new images for better guidance
1 parent d6f62ee commit 651daee

File tree

4 files changed

+30
-9
lines changed

4 files changed

+30
-9
lines changed

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,31 @@ sidebar_label: Using MCP in Roo Code
77

88
Model Context Protocol (MCP) extends Roo Code's capabilities by connecting to external tools and services. This guide covers everything you need to know about using MCP with Roo Code.
99

10-
> **Note:** All MCP-related settings are global across all workspaces. Any changes you make to MCP configurations will affect all your Roo Code projects.
10+
## Configuring MCP Servers
1111

12-
## Installing/Editing Your MCP Servers
12+
MCP server configurations can be managed at two levels:
1313

14-
MCP server configurations are stored in the `cline_mcp_settings.json` file. You can access it by:
14+
1. **Global Configuration**: Stored in the `mcp_settings.json` file, accessible via VS Code settings (see below). These settings apply across all your workspaces unless overridden by a project-level configuration.
15+
2. **Project-level Configuration**: Defined in a `.roo/mcp.json` file within your project's root directory. This allows you to set up project-specific servers and share configurations with your team by committing the file to version control. Roo Code automatically detects and loads this file if it exists.
1516

16-
1. Click the <Codicon name="server" /> icon in the top navigation of the Roo Code pane
17+
**Precedence**: If a server name exists in both global and project configurations, the **project-level configuration takes precedence**.
18+
19+
### Editing MCP Settings Files
20+
21+
You can edit both global and project-level MCP configuration files directly from the Roo Code MCP settings view:
22+
23+
1. Click the <Codicon name="server" /> icon in the top navigation of the Roo Code pane.
24+
25+
<img src="/img/using-mcp-in-roo/using-mcp-in-roo-10.png" alt="MCP Servers interface in Roo Code" width="400" />
1726

18-
<img src="/img/using-mcp-in-roo/using-mcp-in-roo.png" alt="MCP Servers interface in Roo Code" width="400" />
19-
2. Click the `Edit MCP Settings` button. This will open `cline_mcp_settings.json`
27+
2. Scroll to the bottom of the MCP settings view.
28+
3. Click the appropriate button:
29+
* **`Edit Global MCP`**: Opens the global `mcp_settings.json` file.
30+
* **`Edit Project MCP`**: Opens the project-specific `.roo/mcp.json` file. If this file doesn't exist, Roo Code will create it for you.
2031

21-
<img src="/img/using-mcp-in-roo/using-mcp-in-roo-1.png" alt="Edit MCP Settings button" width="400" />
32+
<img src="/img/using-mcp-in-roo/using-mcp-in-roo-9.png" alt="Edit Global MCP and Edit Project MCP buttons" width="600" />
2233

23-
The file uses a JSON format with a `mcpServers` object containing named server configurations:
34+
Both files use a JSON format with a `mcpServers` object containing named server configurations:
2435

2536
```json
2637
{
@@ -189,6 +200,6 @@ Example: "Analyze the performance of my API" might use an MCP tool that tests AP
189200
Common issues and solutions:
190201

191202
* **Server Not Responding:** Check if the server process is running and verify network connectivity
192-
* **Permission Errors:** Ensure proper API keys and credentials are configured in your `cline_mcp_settings.json`
203+
* **Permission Errors:** Ensure proper API keys and credentials are configured in your `mcp_settings.json` (for global settings) or `.roo/mcp.json` (for project settings).
193204
* **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings
194205
* **Slow Performance:** Try adjusting the network timeout value for the specific MCP server

docs/features/tools/use-mcp-tool.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ This tool allows Roo to access specialized functionality provided by external MC
4444
- Requires user approval before execution (unless in the "always allow" list)
4545
- Cannot execute multiple MCP tool operations simultaneously
4646

47+
## Server Configuration
48+
49+
MCP servers can be configured globally or at the project level:
50+
51+
- **Global Configuration**: Managed through the Roo Code extension settings in VS Code. These apply across all projects unless overridden.
52+
- **Project-level Configuration**: Defined in a `.roo/mcp.json` file within your project's root directory.
53+
- This allows project-specific server setups.
54+
- Project-level servers take precedence over global servers if they share the same name.
55+
- Since `.roo/mcp.json` can be committed to version control, it simplifies sharing configurations with your team.
56+
4757
## How It Works
4858

4959
When the `use_mcp_tool` tool is invoked, it follows this process:
162 KB
Loading
14.8 KB
Loading

0 commit comments

Comments
 (0)