Fix Copilot Chat startup error: add MCP server, fix plugin name mismatch, unblock .vscode/mcp.json#12
Merged
Merged
Conversation
…te gitignore Agent-Logs-Url: https://github.com/yang-central/yang-compiler/sessions/f033e3f7-d4f2-4bac-bcdd-ea0780334d2d Co-authored-by: lllyfeng <7489637+lllyfeng@users.noreply.github.com>
…ove docstring Agent-Logs-Url: https://github.com/yang-central/yang-compiler/sessions/f033e3f7-d4f2-4bac-bcdd-ea0780334d2d Co-authored-by: lllyfeng <7489637+lllyfeng@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error on startup for Copilot Chat
Fix Copilot Chat startup error: add MCP server, fix plugin name mismatch, unblock .vscode/mcp.json
Apr 9, 2026
lllyfeng
approved these changes
Apr 10, 2026
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.
Copilot Chat errored on every VS Code startup because
.vscode/was fully gitignored (no shared MCP config) and the built-in validator plugin was registered under the wrong name, causing silent compilation failures.Changes
.vscode/mcp.json— Added workspace MCP server config using the correct VS Code key ("servers", not"mcpServers"). Usespython -m yang_compiler.mcp_serverwithPYTHONPATHso no package install is required beyondmcp>=1.23.0..gitignore— Changed.vscode/blanket-ignore to.vscode/*+!.vscode/mcp.jsonso shared tooling config is tracked while user-specific files remain ignored.python/src/yang_compiler/mcp_server.py— New MCP server exposing three tools to Copilot Chat:validate_yang,generate_tree,compile_yang. Starts cleanly without a built JAR; tools return a helpful message instead of crashing.python/pyproject.toml— Addedmcpoptional extra (mcp>=1.23.0) andyang-compiler-mcpCLI entry point.src/main/resources/plugins.json— Renamed pluginschema_validator→validator_pluginto match every script, doc, and Python caller. Previously caused./yangc compileto silently skip validation with a "Cannot find a plugin" warning.Original prompt