Skip to content

fix: construct McpStdioServerDefinition positionally and pass env - #250

Merged
SebTardif merged 1 commit into
mainfrom
fix/mcp-stdio-positional-ctor
Aug 28, 2026
Merged

fix: construct McpStdioServerDefinition positionally and pass env#250
SebTardif merged 1 commit into
mainfrom
fix/mcp-stdio-positional-ctor

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #249. VS Code's McpStdioServerDefinition is a positional
constructor (label, command, args, env). The first implementation
passed an options object. That does not throw, so label became the
object and command was undefined. Native MCP never started.

Construct positionally and forward filtered PATCHLOOM_* env from
patchloom.env (including PATCHLOOM_MCP_SURFACE).

Verification

  • Fake positional ctor: command is the binary, env is the 4th argument
  • npm run check

Checklist

  • All commits in this pull request are signed off with git commit -s
  • I ran npm run check and it passes
  • I updated docs if user-facing behavior changed
  • I am contributing this work under the repository license (MIT)

The VS Code class assigns the first argument to label and does not
throw on an options object, so native MCP spawned with no command.
Use the positional constructor and forward PATCHLOOM_* env.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif marked this pull request as ready for review August 28, 2026 14:52
@SebTardif
SebTardif enabled auto-merge (squash) August 28, 2026 14:52
@SebTardif
SebTardif merged commit 7cf2d7b into main Aug 28, 2026
21 checks passed
@SebTardif
SebTardif deleted the fix/mcp-stdio-positional-ctor branch August 28, 2026 14:57
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.

1 participant