Skip to content

Commit 16ec433

Browse files
atscottclydin
authored andcommitted
refactor(@angular/cli): Fix capabilities registration
Capabilities are part of the ServerOptions, the second argument of the constructor. This change also adds logging as a supported capability.
1 parent 95e4f50 commit 16ec433

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,22 @@ export async function createMcpServer(
2222
},
2323
logger: { warn(text: string): void },
2424
): Promise<McpServer> {
25-
const server = new McpServer({
26-
name: 'angular-cli-server',
27-
version: VERSION.full,
28-
capabilities: {
29-
resources: {},
30-
tools: {},
25+
const server = new McpServer(
26+
{
27+
name: 'angular-cli-server',
28+
version: VERSION.full,
29+
},
30+
{
31+
capabilities: {
32+
resources: {},
33+
tools: {},
34+
logging: {},
35+
},
36+
instructions:
37+
'For Angular development, this server provides tools to adhere to best practices, search documentation, and find code examples. ' +
38+
'When writing or modifying Angular code, use the MCP server and its tools instead of direct shell commands where possible.',
3139
},
32-
instructions:
33-
'For Angular development, this server provides tools to adhere to best practices, search documentation, and find code examples. ' +
34-
'When writing or modifying Angular code, use the MCP server and its tools instead of direct shell commands where possible.',
35-
});
40+
);
3641

3742
server.registerResource(
3843
'instructions',

0 commit comments

Comments
 (0)