Skip to content

Commit 3b3a9d8

Browse files
committed
feat: init rush mcp server
1 parent e35f9d4 commit 3b3a9d8

12 files changed

Lines changed: 154 additions & 0 deletions

File tree

apps/rush-mcp-server/.eslintrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require('local-node-rig/profiles/default/includes/eslint/patch/modern-module-resolution');
3+
// This is a workaround for https://github.com/microsoft/rushstack/issues/3021
4+
require('local-node-rig/profiles/default/includes/eslint/patch/custom-config-package-names');
5+
6+
module.exports = {
7+
extends: [
8+
'local-node-rig/profiles/default/includes/eslint/profile/node-trusted-tool',
9+
'local-node-rig/profiles/default/includes/eslint/mixins/friendly-locals'
10+
],
11+
parserOptions: { tsconfigRootDir: __dirname },
12+
13+
overrides: [
14+
{
15+
files: ['*.ts', '*.tsx'],
16+
rules: {
17+
'no-console': 'off'
18+
}
19+
}
20+
]
21+
};

apps/rush-mcp-server/.npmignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# THIS IS A STANDARD TEMPLATE FOR .npmignore FILES IN THIS REPO.
2+
3+
# Ignore all files by default, to avoid accidentally publishing unintended files.
4+
*
5+
6+
# Use negative patterns to bring back the specific things we want to publish.
7+
!/bin/**
8+
!/lib/**
9+
!/lib-*/**
10+
!/dist/**
11+
12+
!CHANGELOG.md
13+
!CHANGELOG.json
14+
!heft-plugin.json
15+
!rush-plugin-manifest.json
16+
!ThirdPartyNotice.txt
17+
18+
# Ignore certain patterns that should not get published.
19+
/dist/*.stats.*
20+
/lib/**/test/
21+
/lib-*/**/test/
22+
*.test.js
23+
24+
# NOTE: These don't need to be specified, because NPM includes them automatically.
25+
#
26+
# package.json
27+
# README.md
28+
# LICENSE
29+
30+
# ---------------------------------------------------------------------------
31+
# DO NOT MODIFY ABOVE THIS LINE! Add any project-specific overrides below.
32+
# ---------------------------------------------------------------------------

apps/rush-mcp-server/LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@rushstack/mcp-server
2+
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
MIT License
6+
7+
Permission is hereby granted, free of charge, to any person obtaining
8+
a copy of this software and associated documentation files (the
9+
"Software"), to deal in the Software without restriction, including
10+
without limitation the rights to use, copy, modify, merge, publish,
11+
distribute, sublicense, and/or sell copies of the Software, and to
12+
permit persons to whom the Software is furnished to do so, subject to
13+
the following conditions:
14+
15+
The above copyright notice and this permission notice shall be
16+
included in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

apps/rush-mcp-server/README.md

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
require('../lib/start.js');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "local-node-rig/profiles/default/config/jest.config.json"
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// The "rig.json" file directs tools to look for their config files in an external package.
3+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5+
6+
"rigPackageName": "local-node-rig"
7+
}

apps/rush-mcp-server/package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "@rushstack/mcp-server",
3+
"version": "0.0.1",
4+
"description": "A Model Context Protocol server implementation for Rush",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/microsoft/rushstack.git",
8+
"directory": "apps/rush-mcp-server"
9+
},
10+
"engines": {
11+
"node": ">=10.0.0"
12+
},
13+
"engineStrict": true,
14+
"homepage": "https://rushstack.io",
15+
"scripts": {
16+
"build": "heft build --clean",
17+
"_phase:build": "heft run --only build -- --clean"
18+
},
19+
"bin": {
20+
"mcp-server": "./bin/mcp-server"
21+
},
22+
"license": "MIT",
23+
"dependencies": {
24+
"@rushstack/node-core-library": "workspace:*",
25+
"@rushstack/terminal": "workspace:*",
26+
"@rushstack/ts-command-line": "workspace:*"
27+
},
28+
"devDependencies": {
29+
"@rushstack/heft": "workspace:*",
30+
"local-node-rig": "workspace:*",
31+
"typescript": "~5.8.2"
32+
}
33+
}

apps/rush-mcp-server/src/start.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('hello world');

apps/rush-mcp-server/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/local-node-rig/profiles/default/tsconfig-base.json"
3+
}

0 commit comments

Comments
 (0)