Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 75 additions & 3 deletions docs/features/mcp/using-mcp-in-roo.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ This Windows-specific configuration:
- The `-y` flag automatically answers "yes" to any prompts during installation
- Runs the `@modelcontextprotocol/server-puppeteer` package which provides browser automation capabilities

:::note
For macOS or Linux, you would use a different configuration:
### macOS and Linux Configuration Example

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:

```json
{
"mcpServers": {
Expand All @@ -248,6 +250,76 @@ For macOS or Linux, you would use a different configuration:
}
}
```
:::

This configuration:
- Directly uses `npx` without needing a shell wrapper
- Uses the `-y` flag to automatically answer "yes" to any prompts during installation
- Runs the `@modelcontextprotocol/server-puppeteer` package which provides browser automation capabilities

The same approach can be used for other MCP servers on Windows, adjusting the package name as needed for different server types.

## Runtime Version Manager Configuration

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:

### mise Configuration Example

[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:

```json
{
"mcpServers": {
"mcp-batchit": {
"command": "mise",
"args": [
"x",
"--",
"node",
"/Users/myself/workspace/mcp-batchit/build/index.js"
],
"disabled": false,
"alwaysAllow": [
"search",
"batch_execute"
]
}
}
}
```

This configuration:
- Uses the `mise` command to manage runtime versions
- The `x` subcommand executes a command with the configured runtime version
- The `--` separates mise arguments from the command to run
- Runs `node` with the specific version configured in your mise settings
- Points to the MCP server JavaScript file
- Automatically allows the "search" and "batch_execute" tools

### asdf Configuration Example

[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:

```json
{
"mcpServers": {
"appsignal": {
"command": "/Users/myself/.asdf/installs/nodejs/22.2.0/bin/node",
"args": [
"/Users/myself/Code/Personal/my-mcp/build/index.js"
],
"env": {
"ASDF_NODE_VERSION": "22.2.0"
},
"disabled": false,
"alwaysAllow": []
}
}
}
```

This configuration:
- Directly references the Node.js executable from the asdf installations directory
- Sets the `ASDF_NODE_VERSION` environment variable to ensure consistent version use
- Points to the MCP server JavaScript file

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.