From the course: AI-Powered Development: GitHub Copilot in Visual Studio Code
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Query a database with an MCP server
From the course: AI-Powered Development: GitHub Copilot in Visual Studio Code
Query a database with an MCP server
There are hundreds of MCP servers available but let's start with a practical one, a server that lets CoPilot query a SQLite database. I'm in this MCP branch and I have a folder called databases and inside that folder are three SQLite databases. The one I'm using in this chapter is tours.sqlite. We'll start simple to see how to do a simple CoPilot prompt. Later we'll step back and talk about where to find MCP servers, how to configure them, and how Visual Studio Code hosts and runs them. For now, assume the MCP server is already installed and is ready to use. The first step is to enable the server in the tools area. So make sure you're in the agent mode and then click here on the tools icon and then up here you'll see a list of the different tools that are available. They're called tools in this area even though we know it's an MCP server. The one I'm using for this demo is dbhub. It is an MCP server that acts as a database gateway that can expose data from PostgreSQL, MySQL, SQLite…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
MCP overview6m 35s
-
(Locked)
Query a database with an MCP server4m 9s
-
(Locked)
Generate TypeScript DB access code1m 23s
-
(Locked)
Understand mcp.json setting2m 13s
-
(Locked)
Enable catalog browsing in the Extensions panel1m
-
(Locked)
Install other MCP servers with the Extension panel3m 12s
-
(Locked)
Find MCP servers on GitHub2m 53s
-
(Locked)
-