The args field on MCPStdioServerConfig in [nodejs/src/types.ts](https://github.com/github/copilot-sdk/blob/main/nodejs/src/types.ts) is currently required:
export interface MCPStdioServerConfig extends MCPServerConfigBase {
command: string;
args: string[]; // required
env?: Record<string, string>;
cwd?: string;
}
This is inconsistent with the MCP TypeScript SDK's own StdioServerParameters, which defines args as optional:
modelcontextprotocol/typescript-sdk — src/client/stdio.ts:
export type StdioServerParameters = {
command: string;
args?: string[]; // optional
// ...
};
A stdio MCP server invoked with no arguments is a valid configuration per the spec, and omitting args is explicitly supported by the reference implementation.
Observed behaviour: Omitting args from a stdio server config causes the SDK's schema validation to reject the entire config with an invalid_union error (Invalid MCP config … args: Required).
Expected behaviour: args defaults to [] when omitted, consistent with StdioServerParameters.
Suggested fix: Change args: string[] to args?: string[] in MCPStdioServerConfig, treating a missing value as [] at the spawn call site.
The
argsfield onMCPStdioServerConfigin[nodejs/src/types.ts](https://github.com/github/copilot-sdk/blob/main/nodejs/src/types.ts)is currently required:This is inconsistent with the MCP TypeScript SDK's own
StdioServerParameters, which definesargsas optional:A stdio MCP server invoked with no arguments is a valid configuration per the spec, and omitting
argsis explicitly supported by the reference implementation.Observed behaviour: Omitting
argsfrom a stdio server config causes the SDK's schema validation to reject the entire config with aninvalid_unionerror (Invalid MCP config … args: Required).Expected behaviour:
argsdefaults to[]when omitted, consistent withStdioServerParameters.Suggested fix: Change
args: string[]toargs?: string[]inMCPStdioServerConfig, treating a missing value as[]at the spawn call site.