
How to Use VSC‑MCP - Part Two
In Part One of this series, we covered how to install and configure VSC-MCP. Now, it's time to put it into action with a real-world example.
And what better way to demonstrate its power than by using VSC-MCP to enhance itself?
Following the roadmap I have in mind, the goal for this post is to implement a find_references
tool. This new tool should take a symbol (defined by its file path, name, and type) and return all files and locations where that symbol is referenced.
Preparing the Prompt
The core philosophy behind Model Context Protocol (MCP) servers revolves around two ideas:
- Peripheral access: Grant the AI access to the local environment—filesystem, hardware, and even the external world.
- Tool composition: Equip the AI client with all the necessary tools to complete tasks end-to-end.
With this in mind, I usually pair RepoMix with my VSC-MCP server. Why? Because RepoMix already offers some helpful tools for codebase interaction—like pack_codebase
, which helps the AI understand the structure of the project without additional instructions.
We can then craft a reusable, minimal prompt to guide the AI client (in this case, Claude Desktop) through the development workflow:
- before start to implement a new user request, use repomix MCP to pack and understand the codebase files, directories, and structure
- use the vcs-mcp tools to edit symbols, read and write files and implement the user request
- after implement the user request, use the get_errors tool to check for errors and, if any, fix it.
## user request
- codebase: /Users/pika/Coding/thomas/vsc-mcp
- add a new find_references tool (filePath, name, type)
- use textDocument/reference LSP api to find all symbol references and return it
- use typescript
Thanks to RepoMix, we just need to provide the root path of the codebase. From there, the AI can discover the files, infer how to call the necessary tools, and orchestrate the steps autonomously.
Results
The result? A one-shot feature implementation—without even opening an IDE.
By combining the power of AI agents with well-defined tools, we’re able to automate feature development. LSP integrations handle formatting and type-checking, while the AI manages the logic and structure.
The full AI session used in this demo is available here.
What’s Next?
One key improvement is making the get_errors
tool language-agnostic. Right now, it's tightly coupled with tsc
(TypeScript compiler), which limits its flexibility.
To make MCP tools more universal, decoupling from language-specific binaries is the next priority.
Stay tuned for Part Three, where we’ll explore how to generalize and extend error checking across languages—and potentially bring static analysis to more runtimes.
Want to chat about VSC-MCP or share your setup? Drop a comment or reach out on GitHub!
References
- Model Context Protocol (MCP) – Design philosophy and protocol overview.
- Language Server Protocol - References – Official LSP spec for finding references.
- RepoMix – MCP server providing filesystem-level context packing.
- Claude Desktop by Anthropic – The AI client used in this walkthrough.