Skip to content

Commit 2ecb1db

Browse files
authored
Add configuration examples for mise and asdf version managers in MCP documentation (#111)
* Add configuration examples for mise and asdf version managers in MCP documentation * Add macOS and Linux configuration example for MCP in documentation
1 parent 795d937 commit 2ecb1db

File tree

1 file changed

+75
-3
lines changed

1 file changed

+75
-3
lines changed

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

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ This Windows-specific configuration:
233233
- The `-y` flag automatically answers "yes" to any prompts during installation
234234
- Runs the `@modelcontextprotocol/server-puppeteer` package which provides browser automation capabilities
235235

236-
:::note
237-
For macOS or Linux, you would use a different configuration:
236+
### macOS and Linux Configuration Example
237+
238+
When setting up MCP servers on macOS or Linux, you can use a simpler configuration since you don't need the Windows Command Prompt. Here's an example of configuring a Puppeteer MCP server on macOS or Linux:
239+
238240
```json
239241
{
240242
"mcpServers": {
@@ -248,6 +250,76 @@ For macOS or Linux, you would use a different configuration:
248250
}
249251
}
250252
```
251-
:::
253+
254+
This configuration:
255+
- Directly uses `npx` without needing a shell wrapper
256+
- Uses the `-y` flag to automatically answer "yes" to any prompts during installation
257+
- Runs the `@modelcontextprotocol/server-puppeteer` package which provides browser automation capabilities
252258

253259
The same approach can be used for other MCP servers on Windows, adjusting the package name as needed for different server types.
260+
261+
## Runtime Version Manager Configuration
262+
263+
When working with multiple versions of programming languages or runtimes, you may use version managers like [asdf](https://asdf-vm.com/) or [mise](https://mise.jdx.dev/) (formerly rtx). These tools help manage multiple runtime versions on a single system. Here's how to configure MCP servers to work with these version managers:
264+
265+
### mise Configuration Example
266+
267+
[mise](https://mise.jdx.dev/) is a fast, modern runtime version manager that can be used to specify which version of Node.js, Python, or other runtimes to use for your MCP server:
268+
269+
```json
270+
{
271+
"mcpServers": {
272+
"mcp-batchit": {
273+
"command": "mise",
274+
"args": [
275+
"x",
276+
"--",
277+
"node",
278+
"/Users/myself/workspace/mcp-batchit/build/index.js"
279+
],
280+
"disabled": false,
281+
"alwaysAllow": [
282+
"search",
283+
"batch_execute"
284+
]
285+
}
286+
}
287+
}
288+
```
289+
290+
This configuration:
291+
- Uses the `mise` command to manage runtime versions
292+
- The `x` subcommand executes a command with the configured runtime version
293+
- The `--` separates mise arguments from the command to run
294+
- Runs `node` with the specific version configured in your mise settings
295+
- Points to the MCP server JavaScript file
296+
- Automatically allows the "search" and "batch_execute" tools
297+
298+
### asdf Configuration Example
299+
300+
[asdf](https://asdf-vm.com/) is a popular tool for managing multiple runtime versions. Here's how to configure an MCP server to use a specific Node.js version managed by asdf:
301+
302+
```json
303+
{
304+
"mcpServers": {
305+
"appsignal": {
306+
"command": "/Users/myself/.asdf/installs/nodejs/22.2.0/bin/node",
307+
"args": [
308+
"/Users/myself/Code/Personal/my-mcp/build/index.js"
309+
],
310+
"env": {
311+
"ASDF_NODE_VERSION": "22.2.0"
312+
},
313+
"disabled": false,
314+
"alwaysAllow": []
315+
}
316+
}
317+
}
318+
```
319+
320+
This configuration:
321+
- Directly references the Node.js executable from the asdf installations directory
322+
- Sets the `ASDF_NODE_VERSION` environment variable to ensure consistent version use
323+
- Points to the MCP server JavaScript file
324+
325+
Using version managers ensures that your MCP servers run with the correct runtime version, regardless of the system's default version, providing consistency across different environments and preventing version conflicts.

0 commit comments

Comments
 (0)