Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2a94e21

Browse files
cexbrayatjkrems
authored andcommitted
refactor(@angular/cli): improve discoverability of mcp server options
1 parent b3dfc91 commit 2a94e21

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎packages/angular/cli/src/commands/mcp/cli.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
1010
import { Argv } from 'yargs';
1111
import { CommandModule, CommandModuleImplementation } from '../../command-builder/command-module';
1212
import { isTTY } from '../../utilities/tty';
13-
import { createMcpServer } from './mcp-server';
13+
import { EXPERIMENTAL_TOOLS,createMcpServer } from './mcp-server';
1414

1515
const INTERACTIVE_MESSAGE = `
1616
To start using the Angular CLI MCP Server, add this configuration to your host:
@@ -25,6 +25,8 @@ To start using the Angular CLI MCP Server, add this configuration to your host:
2525
}
2626
2727
Exact configuration may differ depending on the host.
28+
29+
For more information and documentation, visit: https://angular.dev/ai/mcp
2830
`;
2931

3032
export default class McpCommandModule extends CommandModule implements CommandModuleImplementation {
@@ -49,6 +51,8 @@ export default class McpCommandModule extends CommandModule implements CommandMo
4951
alias: 'E',
5052
array: true,
5153
describe: 'Enable an experimental tool.',
54+
choices: EXPERIMENTAL_TOOLS.map(({ name }) => name),
55+
hidden: true,
5256
});
5357
}
5458

‎packages/angular/cli/src/commands/mcp/mcp-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const STABLE_TOOLS = [BEST_PRACTICES_TOOL, DOC_SEARCH_TOOL, LIST_PROJECTS_TOOL]
2828
* The set of tools that are available but not enabled by default.
2929
* These tools are considered experimental and may have limitations.
3030
*/
31-
const EXPERIMENTAL_TOOLS = [FIND_EXAMPLE_TOOL, MODERNIZE_TOOL] as const;
31+
exportconst EXPERIMENTAL_TOOLS = [FIND_EXAMPLE_TOOL, MODERNIZE_TOOL] as const;
3232

3333
export async function createMcpServer(
3434
options: {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /