{"record":{"id":"8a4e9530e362fd84","repo":"vercel/ai","slug":"acp-mcp-server-name-ai-sdk-harness-tools-is-rese","errorCode":null,"errorMessage":"ACP MCP server name \"ai-sdk-harness-tools\" is reserved for HarnessAgent tools.","messagePattern":"ACP MCP server name \"ai-sdk-harness-tools\" is reserved for HarnessAgent tools\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/harness-acp/src/acp-harness.ts","lineNumber":136,"sourceCode":"export function createACP<TBuiltinTools extends ToolSet = {}>(\n  settings: ACPHarnessSettings<TBuiltinTools>,\n): HarnessV1<TBuiltinTools> {\n  if (\n    (settings.credentialEnv == null) !==\n    (settings.credentialBrokering == null)\n  ) {\n    throw new Error(\n      'ACP credentialEnv and credentialBrokering must be configured together.',\n    );\n  }\n  if (\n    settings.mcpServers != null &&\n    Object.prototype.hasOwnProperty.call(\n      settings.mcpServers,\n      'ai-sdk-harness-tools',\n    )\n  ) {\n    throw new Error(\n      'ACP MCP server name \"ai-sdk-harness-tools\" is reserved for HarnessAgent tools.',\n    );\n  }\n  const version = (settings as { readonly version?: string }).version ?? 'v1';\n  switch (version) {\n    case 'v1': {\n      const clientApp = settings.clientApp ?? ACP_CLIENT_APP;\n      return createACPV1({\n        settings,\n        builtinTools:\n          settings.builtinTools ?? (ACP_BUILTIN_TOOLS as TBuiltinTools),\n        port: settings.port,\n        portEndpoint: settings.portEndpoint,\n        startupTimeoutMs: settings.startupTimeoutMs,\n        clientApp,\n        lifecycleStateSchema: acpResumeStateSchema,\n      });\n    }","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/harness-acp/src/acp-harness.ts#L118-L154","documentation":"createACP rejects an MCP server entry named \"ai-sdk-harness-tools\" because that key is reserved: the harness itself exposes HarnessAgent built-in tools to the agent under this MCP server name. A user-defined server with the same name would collide with the internal tool channel, so it is rejected at construction time.","triggerScenarios":"Passing settings.mcpServers whose object contains the key 'ai-sdk-harness-tools', e.g. createACP({ mcpServers: { 'ai-sdk-harness-tools': { ... } } }) or any wrapper factory forwarding such mcpServers.","commonSituations":"Generating MCP server config programmatically and colliding with the reserved name; copying an internal example that uses the harness tool server; merging config maps where the reserved key was already present.","solutions":["Rename your MCP server entry to a different key (e.g. 'my-tools').","Remove the entry if the tools it defines are already provided as HarnessAgent builtinTools.","Search your config-building code for hardcoded 'ai-sdk-harness-tools' and change it."],"exampleFix":"// before\ncreateACP({ mcpServers: { 'ai-sdk-harness-tools': { command: 'npx', args: ['my-mcp'] } } }); // throws\n// after\ncreateACP({ mcpServers: { 'my-tools': { command: 'npx', args: ['my-mcp'] } } });","handlingStrategy":"validation","validationCode":"const RESERVED_MCP_SERVER_NAMES = ['ai-sdk-harness-tools'];\nfunction validateMcpServerNames(mcpServers?: Record<string, unknown>): void {\n  if (mcpServers == null) return;\n  for (const name of Object.keys(mcpServers)) {\n    if (RESERVED_MCP_SERVER_NAMES.includes(name)) {\n      throw new Error(`MCP server name \"${name}\" is reserved.`);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefix user MCP server keys with your app name (e.g. 'app-my-tools').","Keep a shared constant of reserved names in config-generation code.","Never copy internal harness tool-server names into user config."],"tags":["configuration","mcp","naming-conflict"],"backgroundTag":"reserved-identifier-conflict","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}