Skip to content

[mcp-server] Update the rush mcp server README document #5231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .cursor/rules/rush.mdc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: A comprehensive guide for managing dependencies in Rush monorepo
description:
globs:
alwaysApply: false
alwaysApply: true
---
You are a Rush monorepo development and management expert. Your role is to assist with Rush-related tasks while following these key principles and best practices:

Expand Down
2 changes: 2 additions & 0 deletions apps/rush-mcp-server/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/lib-*/**/test/
*.test.js

!*.mock.json

# NOTE: These don't need to be specified, because NPM includes them automatically.
#
# package.json
Expand Down
32 changes: 32 additions & 0 deletions apps/rush-mcp-server/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# @rushstack/mcp-server

With the rapid advancement of LLMs, AI applications like Trae, Cursor, Cline, Windsurf, and others have been thriving. However, due to the large scale of monorepos and the context limitations of LLMs, it’s difficult for these models to fully understand your monorepo. This is where @rushstack/mcp-server comes in — by providing a suite of MCP tools, it enables LLMs to better comprehend your monorepo and assist you more effectively with daily development tasks in a Rush-based monorepo environment.

## Usage

1. To get the best results, copy the [.cursor](https://github.com/microsoft/rushstack/tree/main/.cursor) directory into the root of your project.

2. Configure `@rushstack/mcp-server` in your AI application

```
{
"mcpServers": {
"rush": {
"command": "npx",
"args": ["-y", "@rushstack/mcp-server", "your-project-path"]
}
}
}
```

3. Congratulations 🎉 You’ve completed the setup — Rush MCP is now ready to use!

## Available Tools

- `rush_docs`: Retrieves relevant documentation sections based on your queries
- `rush_workspace_details`: Retrieve detailed workspace information
- `rush_project_details`: Get detailed information about a specific project
- `rush_command_validator`: Validate whether commands are compliant and follow best practices
- `rush_migrate_project`: Migrate a project from one directory to another or into a different subspace
- `rush_pnpm_lock_file_conflict_resolver`: Resolve pnpm-lock.yaml conflicts

## Links

- [CHANGELOG.md](
https://github.com/microsoft/rushstack/blob/main/apps/rush-mcp-server/CHANGELOG.md) - Find
out what's new in the latest version
7 changes: 7 additions & 0 deletions apps/rush-mcp-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "@rushstack/mcp-server",
"version": "0.1.7",
"description": "A Model Context Protocol server implementation for Rush",
"keywords": [
"rush",
"modelcontextprotocol",
"mcp",
"monorepo",
"server"
],
"repository": {
"type": "git",
"url": "https://github.com/microsoft/rushstack.git",
Expand Down
2 changes: 1 addition & 1 deletion apps/rush-mcp-server/src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ const main = async (): Promise<void> => {
};

main().catch((error) => {
log('Fatal error running server:', error);
log('Fatal error running server:', error instanceof Error ? error.message : error);
process.exit(1);
});
7 changes: 3 additions & 4 deletions apps/rush-mcp-server/src/utilities/log.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import { Terminal, ConsoleTerminalProvider } from '@rushstack/terminal';
import { Terminal, ConsoleTerminalProvider, type TerminalWriteParameters } from '@rushstack/terminal';

export const terminal: Terminal = new Terminal(new ConsoleTerminalProvider({ verboseEnabled: true }));

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function log(message?: any, ...optionalParams: any[]): void {
terminal.writeErrorLine(message, ...optionalParams);
export function log(...messageParts: TerminalWriteParameters): void {
terminal.writeErrorLine(...messageParts);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/mcp-server",
"comment": "Update the rush mcp server README.md document",
"type": "none"
}
],
"packageName": "@rushstack/mcp-server"
}