Rush MCP server
Agent context files provide a simple way to improve artificial intelligence (AI) coding assistants by publishing additional information about your Rush repository. The Model Context Protocol (MCP) takes this to the next level, providing a live service that can answer queries and perform actions in your monorepo.
How does it work?
An MCP host is typically a coding assistant such as GitHub Copilot (usable directly in VS Code), Trae, or Cursor. But any kind of software tool could act as a client by implementing the MCP client protocol.
An MCP server advertises a menu of capabilities to the client, which the client invokes using the protocol while performing its tasks. According to the specification, the server can run locally or as a remote cloud service. Its capabilities include:
- resources: for example reading file contents, querying databases, reading log files, capturing screenshots
- tools: for example running shell commands, modifying files, performing calculations
- prompts: exposing specific input forms to be shown to the end user
Rush provides a ready-made MCP server @rushstack/mcp-server that you can install in your monorepo. Its design goals were specifically tailored for large teams:
- Easy for everyone to install, minimizing the learning curve for casual contributors.
- Centrally managed, so the monorepo maintainers can control its configuration and installed version, ensuring everyone gets a consistent experience. Deterministic behavior is important when providing on-call support for engineers.
- Extensible via Rush MCP plugins, so you can integrate company-specific capabilities without having to build your own MCP server.
Setting up the MCP server
The @rushstack/mcp-server
server is designed to run as a local process on the developer's computer, not as a cloud service. The Rush MCP server gets launched automatically by an MCP host such as VS Code, Cursor, or Trae. The MCP host is responsible for starting and terminating this process. The inter-process communication uses thestdio
transport, which means you can easily test Rush's MCP server by invoking its CLI manually from your shell.
Generally there are two ways to configure launching of an MCP server: user-level for your entire machine (e.g. ~/.cursor/mcp.json
) or workspace-level for a specific Git repository (e.g. <your-repo>/.cursor/mcp.json
). For the @rushstack/mcp-server
service, we recommend a workspace-level configuration file that gets committed to Git. This simplifies setup for users, and it ensures that everyone gets the same version of @rushstack/mcp-server
for a given branch, which avoids compatibility problems when loading custom plugins.
After you get it working, consider implementing a Rush MCP plugin to expose specific capabilities for your company's systems.
If your coding assistant isn't mentioned below: please create a pull request to add a setup recipe!
Cursor
For Cursor, add this file to your monorepo:
<your-repo>/.cursor/mcp.json
{
"mcpServers": {
"rush-mcp-server": {
"command": "node",
"args": [
"./common/scripts/install-run.js",
"@rushstack/mcp-server@0.2.1",
"mcp-server",
"."
]
}
}
}
Replace @rushstack/mcp-server@0.2.1
with the latest version from CHANGELOG.md.
Cursor Caveats
- In the above file, Cursor will magically replace
"."
with the absolute path of the workspace folder.- Cursor lacks support for
//
comments in JSON files.
Trae
For Trae, configure manually as follows:
- At the top right of the side chat box, click the Settings icon > MCP.
- Click the + Add MCP Servers button.
- Click "Configure Manually." Enter the following configuration:
{
"mcpServers": {
"rush-mcp-server": {
"command": "npx",
"args": [
"-y",
"@rushstack/mcp-server@0.2.1",
"<workspace-root>"
]
}
}
}
Replace @rushstack/mcp-server@0.2.1
with the latest version from CHANGELOG.md.
Replace <workspace-root>
with the absolute path to your Rush monorepo root directory (the folder containing rush.json
).
GitHub Copilot
For GitHub Copilot, add this file to your monorepo:
<your-repo>/.vscode/mcp.json
{
"servers": {
"rush-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rushstack/mcp-server@0.2.1",
"<workspace-root>"
]
}
}
}
Replace @rushstack/mcp-server@0.2.1
with the latest version from CHANGELOG.md.
Replace <workspace-root>
with the absolute path to your Rush monorepo root directory (the folder containing rush.json
).
Cline
For Cline, configure manually as follows:
- Click the MCP Servers button.
- Click the Installed button.
- Click the Configure MCP Servers button, and enter the following configuration in the newly opened
cline_mcp_settings.json
file:
cline_mcp_settings.json
{
"mcpServers": {
"rush-mcp-server": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rushstack/mcp-server@0.2.1",
"<workspace-root>"
]
}
}
}
Replace @rushstack/mcp-server@0.2.1
with the latest version from CHANGELOG.md.
Replace <workspace-root>
with the absolute path to your Rush monorepo root directory (the folder containing rush.json
).
Windsurf
For Windsurf, configure manually as follows:
- Click Settings > Windsurf Settings in the top left corner.
- In the opened page, click Cascade > Manage plugins > View raw config.
- Enter the following in the opened
mcp_config.json
file:
mcp_config.json
{
"mcpServers": {
"rush-mcp-server": {
"command": "npx",
"args": [
"-y",
"@rushstack/mcp-server@0.2.1",
"<workspace-root>"
]
}
}
}
Replace @rushstack/mcp-server@0.2.1
with the latest version from CHANGELOG.md.
Replace <workspace-root>
with the absolute path to your Rush monorepo root directory (the folder containing rush.json
).