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/advanced-usage/available-tools/tool-use-overview.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,21 @@ These tools help manage the conversation and task flow:
70
70
71
71
## Tool Calling Mechanism
72
72
73
+
### Handling Complex Tasks
74
+
75
+
For certain complex operations that require multiple steps, Roo doesn't just figure them out on the fly. Instead, it follows predefined, internal plans to ensure consistency and accuracy.
76
+
77
+
A prime example is creating a new MCP server, identified internally by `create_mcp_server`. **This identifier does not represent a tool you will see being called.** Rather, when you ask Roo to create a server, it triggers this known, multi-step workflow.
78
+
79
+
This specific workflow is initiated by Roo using its internal `fetch_instructions` tool (with the task `create_mcp_server`) to retrieve a detailed plan. This plan then guides Roo to make calls to several standard, documented tools in sequence, such as:
80
+
81
+
*[`execute_command`](/advanced-usage/available-tools/execute-command) for running setup scripts (e.g., `npx @modelcontextprotocol/create-server`).
82
+
*[`write_to_file`](/advanced-usage/available-tools/write-to-file) or [`apply_diff`](/advanced-usage/available-tools/apply-diff) for creating or modifying server code and configuration files.
83
+
*[`ask_followup_question`](/advanced-usage/available-tools/ask-followup-question) to gather necessary information like API keys from you.
84
+
* Other standard tools as needed for steps like determining file locations or updating configuration entries.
85
+
86
+
So, while the overall task (like `create_mcp_server`) is complex, it's ultimately accomplished by intelligently orchestrating the standard tools available in your environment. This approach allows Roo to reliably perform complex operations by leveraging the tools documented here.
Copy file name to clipboardExpand all lines: docs/features/mcp/using-mcp-in-roo.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,13 @@ sidebar_label: Using MCP in Roo Code
5
5
6
6
# Using MCP in Roo Code
7
7
8
+
:::info Confused about MCP Servers?
9
+
10
+
An MCP (Model Context Protocol) server acts as a bridge, giving Roo Code access to a wider range of **tools** and external services like databases, APIs, or custom scripts. It uses a standard communication method, allowing Roo to leverage these external capabilities.
11
+
12
+
For a deeper dive, check out [What is MCP?](/features/mcp/what-is-mcp).
13
+
:::
14
+
8
15
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.
9
16
10
17
## Configuring MCP Servers
@@ -146,6 +153,31 @@ Disabling your MCP Server Creation here will just remove the instructions from y
146
153
147
154
<imgsrc="/img/using-mcp-in-roo/using-mcp-in-roo-3.png"alt="Enable MCP Server Creation toggle"width="400" />
148
155
156
+
## How to Use Roo to Create an MCP Server
157
+
158
+
If you need a specific tool or capability that isn't available through existing MCP servers, you can ask Roo Code to build a new one for you.
159
+
160
+
**Prerequisite:** Ensure the **[Enable MCP Server Creation](#enabling-or-disabling-mcp-server-creation)** setting is checked ON in the MCP settings panel. If this is disabled, Roo will not have the necessary instructions to build a server.
161
+
162
+
**How to Initiate:**
163
+
164
+
1.**Make a Request:** Clearly ask Roo for the new tool or capability. For example:
165
+
* "Create an MCP tool that gets the current price of Bitcoin."
166
+
* "I need a tool that connects to my company's internal user database via its API."
167
+
* "Build an MCP server to interact with the GitHub Gist API."
168
+
169
+
2.**Roo's Process (Simplified):** Once you make the request (and the setting is enabled), Roo will:
170
+
* Fetch internal instructions for server creation.
171
+
* Scaffold a basic server project (usually TypeScript) in the default MCP directory (e.g., `~/Documents/Cline/MCP` on macOS) unless you specify otherwise.
172
+
* Write the code to implement the requested tool, including handling necessary API calls.
173
+
***Handle Secrets:** If the tool requires API keys or other credentials, Roo will ask you for them using the [`ask_followup_question`](/advanced-usage/available-tools/ask-followup-question) tool to ensure they are configured securely as environment variables for the server.
174
+
***Configure:** Automatically add the new server's configuration to your global `mcp_settings.json` or project `.roo/mcp.json` file.
175
+
***Activate:** Attempt to connect to the newly configured server so its tools are immediately available.
176
+
177
+
3.**Outcome:** If successful, Roo will confirm the creation, and the new server and its tools will appear in your MCP server list, ready for use.
178
+
179
+
This feature allows you to tailor Roo's capabilities by having it build the specific integrations you need directly from your requests. For a deeper look into the internal mechanics, see the [Tool Calling Mechanism](/advanced-usage/available-tools/tool-use-overview#tool-calling-mechanism).
180
+
149
181
## Managing Individual MCP Servers
150
182
151
183
<imgsrc="/img/using-mcp-in-roo/using-mcp-in-roo-8.png"alt="Example of a configuration pane for a MCP Server"width="400" />
0 commit comments