Skip to content

Commit 07dd22e

Browse files
Add MCP documentation and images for enhanced guidance (#84)
* Add MCP documentation and images for enhanced guidance * Update docs/mcp/using-mcp-in-roo.md Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 52d77a7 commit 07dd22e

16 files changed

+577
-95
lines changed

docs/advanced-usage/mcp.md

Lines changed: 6 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,8 @@
1-
# Model Context Protocol (MCP)
1+
---
2+
title: Model Context Protocol (MCP)
3+
sidebar_label: MCP
4+
---
25

3-
The Model Context Protocol (MCP) is a standard for extending Roo Code's capabilities by connecting to external tools and services. MCP servers can provide additional tools and resources that Roo Code can use to accomplish tasks.
6+
import {Redirect} from '@docusaurus/router';
47

5-
## Why Use MCP?
6-
7-
* **Extend Functionality:** Add new capabilities to Roo Code without modifying the core extension.
8-
* **Access External Data:** Connect to databases, APIs, or other services.
9-
* **Custom Integrations:** Create custom tools tailored to your specific workflow.
10-
* **Community Contributions:** Share and use tools developed by the Roo Code community.
11-
12-
## MCP Server Status
13-
14-
You can view and manage your MCP server connections by clicking the <Codicon name="server" /> icon in the top navigation bar.
15-
16-
## Finding and Installing MCP Servers
17-
18-
Roo Code does not come with any pre-installed MCP servers. You'll need to find and install them separately.
19-
20-
* **Community Repositories:** Check for community-maintained lists of MCP servers. (Link to a hypothetical community repo/list here)
21-
* **GitHub Search:** Search GitHub for "MCP server" or "Model Context Protocol server."
22-
* **Ask Roo:** You can ask Roo Code to help you find or even create MCP servers.
23-
24-
Installation typically involves adding the server's configuration to the `cline_mcp_settings.json` file. See the [Configuration](#configuration) section for details.
25-
26-
## Using MCP Tools and Resources
27-
28-
Once an MCP server is connected, its tools and resources become available to Roo Code.
29-
30-
* **Tools:** MCP tools are invoked using the `use_mcp_tool` tool. You'll need to provide the server name and the tool name.
31-
* **Resources:** MCP resources can be accessed using the `access_mcp_resource` tool. You'll need to provide the server name and the resource URI.
32-
33-
Roo Code will prompt you for any required parameters when using these tools.
34-
35-
## Creating Your Own MCP Server
36-
37-
You can create your own MCP server to add custom functionality to Roo Code. This requires some programming knowledge. See the [MCP documentation](https://github.com/modelcontextprotocol) for details on how to create an MCP server.
38-
39-
## Configuration
40-
41-
MCP server configurations are stored in the `cline_mcp_settings.json` file. You can access it from Roo Code's settings by clicking on "Edit MCP Settings", or you can open it from the VS Code command palette with the `Roo Code: Open MCP Config` command.
42-
43-
The file uses a JSON format:
44-
45-
```json
46-
{
47-
"mcpServers": {
48-
"server1": {
49-
"command": "python",
50-
"args": ["/path/to/server.py"],
51-
"env": {
52-
"API_KEY": "your_api_key"
53-
},
54-
"alwaysAllow": ["tool1", "tool2"],
55-
"disabled": false
56-
},
57-
"server2": {
58-
"command": "node",
59-
"args": ["/path/to/server.js"],
60-
"timeout": 90
61-
},
62-
"server3": {
63-
"url": "https://url-of-a-sse-endpoint.com/",
64-
"alwaysAllow": ["tool3"],
65-
"disabled": false
66-
}
67-
}
68-
}
69-
```
70-
71-
## Disabling MCP Features
72-
73-
Roo Code provides two settings to control the use of MCP servers, to help you manage token usage and security:
74-
75-
### 1. Disable MCP Servers Entirely
76-
77-
If you don't want to use MCP servers at all, you can disable them completely:
78-
79-
1. Open the Roo Code Settings (<Codicon name="gear" />)
80-
2. Find the "Enable MCP Servers" setting
81-
3. Uncheck the box
82-
83-
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. This is the most secure option if you don't intend to use MCP.
84-
85-
### 2. Disable MCP Server Creation
86-
87-
Roo Code can be asked to assist in creating new MCP servers. This is a powerful feature, but it also consumes more tokens and could potentially introduce security risks if used improperly.
88-
89-
To disable MCP server creation:
90-
91-
1. Open the Roo Code Settings (<Codicon name="gear" />)
92-
2. Find the "Enable MCP Server Creation" setting
93-
3. Uncheck the box
94-
95-
With this option disabled, Roo Code will not attempt to create new MCP servers. You can still use existing, manually configured servers.
96-
97-
By default, both of these options are enabled.
8+
<Redirect to="/mcp/using-mcp-in-roo" />

docs/mcp/mcp-vs-api.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: MCP vs API
3+
sidebar_label: MCP vs API
4+
---
5+
6+
# MCP vs REST APIs: A Fundamental Distinction
7+
8+
Comparing REST APIs to the Model Context Protocol (MCP) is a category error. They operate at different layers of abstraction and serve fundamentally different purposes in AI systems.
9+
10+
## Architectural Differences
11+
12+
| Feature | MCP | REST APIs |
13+
|---------|-----|-----------|
14+
| State Management | **Stateful** - maintains context across interactions | **Stateless** - each request is independent |
15+
| Connection Type | Persistent, bidirectional connections | One-way request/response |
16+
| Communication Style | JSON-RPC based with ongoing sessions | HTTP-based with discrete requests |
17+
| Context Handling | Context is intrinsic to the protocol | Context must be manually managed |
18+
| Tool Discovery | Runtime discovery of available tools | Design-time integration requiring prior knowledge |
19+
| Integration Approach | Runtime integration with dynamic capabilities | Design-time integration requiring code changes |
20+
21+
## Different Layers, Different Purposes
22+
23+
REST APIs and MCP serve different tiers in the technology stack:
24+
25+
1. **REST**: Low-level web communication pattern that exposes operations on resources
26+
2. **MCP**: High-level AI protocol that orchestrates tool usage and maintains context
27+
28+
MCP often uses REST APIs internally, but abstracts them away for the AI. Think of MCP as middleware that turns discrete web services into a cohesive environment the AI can operate within.
29+
30+
## Context Preservation: Critical for AI Workflows
31+
32+
MCP's stateful design solves a key limitation of REST in AI applications:
33+
34+
- **REST Approach**: Each call is isolated, requiring manual context passing between steps
35+
- **MCP Approach**: One conversation context persists across multiple tool uses
36+
37+
For example, an AI debugging a codebase can open a file, run tests, and identify errors without losing context between steps. The MCP session maintains awareness of previous actions and results.
38+
39+
## Dynamic Tool Discovery
40+
41+
MCP enables an AI to discover and use tools at runtime:
42+
43+
```json
44+
// AI discovers available tools
45+
{
46+
"tools": [
47+
{
48+
"name": "readFile",
49+
"description": "Reads content from a file",
50+
"parameters": {
51+
"path": { "type": "string", "description": "File path" }
52+
}
53+
},
54+
{
55+
"name": "createTicket",
56+
"description": "Creates a ticket in issue tracker",
57+
"parameters": {
58+
"title": { "type": "string" },
59+
"description": { "type": "string" }
60+
}
61+
}
62+
]
63+
}
64+
```
65+
66+
This "plug-and-play" capability allows new tools to be added without redeploying or modifying the AI itself.
67+
68+
## Real-World Example: Multi-Tool Workflow
69+
70+
Consider a task requiring multiple services: "Check recent commits, create a JIRA ticket for the bug fix, and post to Slack."
71+
72+
**REST-based approach**:
73+
- Requires separate integrations for Git, JIRA, and Slack APIs
74+
- Needs custom code to manage context between calls
75+
- Breaks if any service changes its API
76+
77+
**MCP-based approach**:
78+
- One unified protocol for all tools
79+
- Maintains context across the entire workflow
80+
- New tools can be swapped in without code changes
81+
82+
## Why Roo Code Uses MCP
83+
84+
Roo Code leverages MCP to provide:
85+
86+
1. **Extensibility**: Add unlimited custom tools without waiting for official integration
87+
2. **Contextual awareness**: Tools can access conversation history and project context
88+
3. **Simplified integration**: One standard protocol rather than numerous API patterns
89+
4. **Runtime flexibility**: Discover and use new capabilities on-the-fly
90+
91+
MCP creates a universal connector between Roo Code and external services, with REST APIs often powering those services behind the scenes.
92+
93+
## Conclusion: Complementary, Not Competing Technologies
94+
95+
MCP doesn't replace REST APIs - it builds upon them. REST excels at providing discrete services, while MCP excels at orchestrating those services for AI agents.
96+
97+
The critical distinction is that MCP is AI-native: it treats the model as a first-class user, providing the contextual, stateful interaction layer that AI agents need to function effectively in complex environments.

docs/mcp/overview.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: MCP Overview
3+
sidebar_label: MCP Overview
4+
---
5+
6+
# Model Context Protocol (MCP)
7+
8+
The Model Context Protocol (MCP) is a standard for extending Roo Code's capabilities by connecting to external tools and services. MCP servers provide additional tools and resources that help Roo accomplish tasks beyond its built-in capabilities, such as accessing databases, custom APIs, and specialized functionality.
9+
10+
## MCP Documentation
11+
12+
This documentation is organized into several sections:
13+
14+
* [**Using MCP in Roo Code**](./using-mcp-in-roo) - Comprehensive guide to configuring, enabling, and managing MCP servers with Roo Code. Includes server settings, tool approval, and troubleshooting.
15+
16+
* [**What is MCP?**](./what-is-mcp) - Clear explanation of the Model Context Protocol, its client-server architecture, and how it enables AI systems to interact with external tools.
17+
18+
* [**STDIO & SSE Transports**](./server-transports) - Detailed comparison of local (STDIO) and remote (SSE) transport mechanisms with deployment considerations for each approach.
19+
20+
* [**MCP vs API**](./mcp-vs-api) - Analysis of the fundamental distinction between MCP and REST APIs, explaining how they operate at different layers of abstraction for AI systems.

0 commit comments

Comments
 (0)