Skip to content

Fix optional MCP stdio server args#1344

Closed
Will-thom wants to merge 1 commit into
github:mainfrom
Will-thom:issue-1231-mcp-stdio-args
Closed

Fix optional MCP stdio server args#1344
Will-thom wants to merge 1 commit into
github:mainfrom
Will-thom:issue-1231-mcp-stdio-args

Conversation

@Will-thom
Copy link
Copy Markdown

Summary

  • Make Node MCPStdioServerConfig.args optional in the public type
  • Normalize omitted stdio MCP args to [] before sending create/resume payloads in Node and Python
  • Serialize nil Go MCP stdio args as [] instead of null

Fixes #1231

Tests

  • npm test -- client.test.ts
  • npm run typecheck
  • node_modules.bin\prettier.CMD --check src\client.ts src\types.ts test\client.test.ts
  • uv run --extra dev pytest -q test_client.py
  • uv run --extra dev ruff check copilot\client.py test_client.py
  • uv run --extra dev ty check copilot
  • go test .
  • git diff --check

@Will-thom Will-thom requested a review from a team as a code owner May 20, 2026 13:39
@stephentoub
Copy link
Copy Markdown
Collaborator

Thanks for helping out, @Will-thom. We actually already made args optional on the runtime side, and were just waiting to pull in the new package, which we did this morning. With that, the fix is to make the properties in the SDK optional as well, rather than forcing an empty collection into existence. As such, I'm going to close this PR and let #1347 be the fix, but we appreciate your contribution, regardless.

@Will-thom
Copy link
Copy Markdown
Author

Thanks for the explanation, @stephentoub. That makes total sense.

I appreciate you taking the time to review the PR and clarify the intended SDK-side fix. Glad to hear the runtime-side change has landed, and closing this in favor of #1347 sounds good to me.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCPStdioServerConfig.args should be optional

2 participants