Anthropic recently came out with this:
https://www.anthropic.com/engineering/code-execution-with-mcp
might be helpful for you.
Also, you got this context usage in Claude right? Is there a way to get the same thing in github copilot / vsc? or do you have a separate script for it?