Configure VS Code natively to query mcp-injector and compress local context.
VS Code now natively supports the Model Context Protocol (MCP). Running mcp-injector alongside VS Code ensures your large codebase references are automatically compressed using AST folding, avoiding context bloat and maximizing response accuracy for your AI extensions.
Download and run the setup script inside your project workspace:
If you run the installer from within a git repository, it will automatically configure .vscode/mcp.json for you.
If you didn't run the installer in your project directory, you can configure VS Code manually by creating a .vscode/mcp.json file in your workspace:
{
"servers": {
"mcp-injector": {
"command": "mcp-injector",
"env": {
"MCP_WORKSPACE": "${workspaceFolder}"
}
}
}
}
Open your workspace folder in VS Code. Start a chat with your AI assistant and ensure the get_project_map and injector_retrieve tools are available and working.