Now, earlier in this section, I already pointed you at this
tools configuration option here, which allows you to control which
tools your agents have available.
Now, there are many built-in tools that come with Visual Studio Code,
but there also are some extra tools that can be added.
For one, certain Visual Studio Code extensions add
Python extension. It adds some Python-specific tools,
like a tool to set up a Python virtual environment.
And depending on which extensions you have installed
you're working, you will have more tools from these
But then there also are MCP servers.
Now, MCP stands for Model Context Protocol
open protocol for exposing tools and resources
to AI agents so that those agents can use
them. So it's a standardized way for adding
say. It's not GitHub Copilot exclusive, but GitHub Copilot
also supports it. Inside Visual Studio Code,
into your command panel here, you can list MCP servers
you a- got installed and you can add a new server.
If you chose Add new server, you can also browse MCP
servers and you can do that from inside Visual Studio Code.
And you'll find various MCP servers you can install, and again, these
are really just packages of tools and resources that are then
made available to your agents. For example, context7 is a pretty
good one. Context7 is an MCP server that allows the
AI to browse the documentation of many libraries and
packages, not just limited to Python, you might be interested
in. So by installing this MCP server, you make it
easier for your AI agents to discover and use
documentation pages off third-party libraries and
packages. So that's one server I have installed.
You could use the Playwright server to make it easy for your AI
agents to access your browser and test a website
they might be working on, and so on.
You can browse these servers and add whatever you find useful.
You just shouldn't enable too many, because all
these instructions about which tools are available
are loaded into the context window and therefore take up tokens.
So the more MCP servers you enable and use, the
more your results may suffer. That's at least something I
experienced. So here, I only got two MCP
servers enabled for my agent, and if I had more installed but I
didn't want to use them all, I could simply disable them so
not be loaded into context. All those tool instructions would not be
loaded into context for the tools exposed by that server.
You can also do this on a per-tool basis, which is pretty
useful.