angular/angular-cli · warning
Skipping Angular MCP server configuration for '${toolName}'.
Error message
Skipping Angular MCP server configuration for '${toolName}'.
Configuration already exists in '${path}'.
What it means
This is a warning logged by the Angular AI-config schematic's addTomlMcpConfig in packages/schematics/angular/ai-config/file_utils.ts when generating MCP server configuration for an AI tool (e.g. Codex/Claude). The library checks the existing TOML file for the TOML_MCP_SERVERS_PROP property and refuses to write a duplicate MCP servers block. It emits this warning and returns null (no changes) instead of appending, to avoid overwriting existing MCP configuration.
Source
Thrown at packages/schematics/angular/ai-config/file_utils.ts:98
filter((path) => path.includes('__tomlConfigName__')),
applyTemplates({
...strings,
tomlConfigName: name,
}),
move(directory),
forEach((file) => {
if (!tree.exists(file.path)) {
return file;
}
const existingFileBuffer = tree.read(file.path);
if (existingFileBuffer) {
let existing = existingFileBuffer.toString();
if (existing.includes(TOML_MCP_SERVERS_PROP)) {
const path = `${directory}/${name}`;
const toolName = strings.classify(tool);
context.logger.warn(
`Skipping Angular MCP server configuration for '${toolName}'.\n` +
`Configuration already exists in '${path}'.\n`,
);
return null;
}
// Add the configuration at the end of the file.
const template = file.content.toString();
existing = existing.length ? existing + '\n\n' + template : template;
tree.overwrite(file.path, existing);
return null;
}
return file;
}),View on GitHub (pinned to bb72145f9a)
Solutions
- No action required — the existing MCP configuration is kept; verify it contains the expected Angular MCP server entry.
- Delete or empty the MCP servers section in the existing TOML file and re-run the ai-config schematic if you want a fresh generated block.
- Regenerate the file entirely (rename the existing file) and re-run the schematic.
- Use npx @angular/cli@latest to ensure you are generating the latest recommended configuration.
Example fix
# before # ~/.codex/config.toml already contains [mcp_servers.angular] $ ng g config ai-config --tool codex # -> skipped warning # after (manual edit to regenerate) # remove the [mcp_servers.angular] table, then: $ ng g config ai-config --tool codex
Defensive patterns
Strategy: validation
Validate before calling
const existing = tree.exists(tomlPath) ? tree.read(tomlPath)!.toString('utf8') : '';
const hasMcpBlock = existing.includes('mcp_servers');
if (!hasMcpBlock) { /* safe to run ai-config schematic */ } Type guard
function isTomlMcpConfigured(content: string): boolean {
return /\[?mcp_servers\b/.test(content);
} Prevention
- Check the tool's TOML config for an existing mcp_servers section before re-running ai-config.
- Keep generated AI config files out of template repos, or commit them deliberately to avoid re-runs.
- Re-run the schematic only after intentionally deleting the MCP block you want regenerated.
When it happens
Trigger: Running `ng generate config ai-config` (or equivalent schematic) with a TOML-based AI tool whose config file already contains the MCP servers property (TOML_MCP_SERVERS_PROP); existingFileBuffer exists and includes TOML_MCP_SERVERS_PROP, so the handler short-circuits with a warning and returns null.
Common situations: Re-running the ai-config schematic after a previous successful run; migrating a project that already has Angular MCP server config added manually; switching tools and re-running while an old TOML config remains in the workspace.
Related errors
- Skipping configuration file for '${toolName}' at '${path}' b
- Project '${projectName}' not found in workspace path ${works
- No project name provided and no default project found in wor
- Option "project" is required.
- Project is not defined in this workspace.
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/3626df58ec0b5093.
Report an issue: GitHub.