fix(mcp): Resolve server activation issues in packaged extension#2363
Merged
shatakshiiii merged 15 commits intoansible:mainfrom Dec 11, 2025
Merged
fix(mcp): Resolve server activation issues in packaged extension#2363shatakshiiii merged 15 commits intoansible:mainfrom
shatakshiiii merged 15 commits intoansible:mainfrom
Conversation
a4fb3d8 to
0478d10
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves MCP (Model Context Protocol) server activation issues in packaged VS Code extensions by implementing dual path resolution and ensuring production dependencies are bundled correctly.
- Updates the build process to copy
package.jsonand install production dependencies in the packaged extension directory - Implements fallback logic to detect the CLI path in both packaged extensions and development environments
- Passes the extension path to the MCP provider to enable proper path resolution
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/helper | Enhances packaging process to copy package.json and install production dependencies into out/mcp/ for proper ESM module resolution in packaged extensions |
| src/utils/mcpProvider.ts | Adds constructor to receive extension path, implements findCliPath() method with fallback logic for packaged vs development paths, and updates working directory to use CLI directory |
| src/extension.ts | Updates MCP provider instantiation to pass context.extensionPath to constructor |
| .config/dictionary.txt | Adds "loglevel" to the dictionary for spell-checking |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e52e92b to
ac967af
Compare
ac967af to
a0a6370
Compare
alisonlhart
approved these changes
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary -
ERR_MODULE_NOT_FOUNDerror that occurred because the MCP server was compiled with tsc but dependencies weren't bundled, so the runtime couldn't find modules.JIRA: AAP-59320