Introduction
How many tabs do you have open in your browser right now? If you're a developer, probably more than 10, right? Azure documentation, PostgreSQL setup guides, connection string formats, security best practices... The list keeps growing.
What if I told you that you can close all those tabs and have instant access to Microsoft documentation directly in VS Code? That's what the Microsoft Learn MCP Server provides!
πΊ Based on the video by Chris Noring (Senior A.I Developer Advocate for JavaScript): Add a database in minutes using the Microsoft Learn MCP server and GitHub Copilot - Watch the complete demonstration in action!
π― The Problem Every Developer Knows
Imagine this scenario: you're building an application and need to add database support. Suddenly, you have:
- 5, 10, or even 20 tabs open
- Multiple monitors with scattered documentation
- Constant context switching between code and documentation
- Doubts about whether the information is up to date
- Neck pain from looking sideways so much π
π‘ The Solution: Microsoft Learn MCP Server
The Microsoft Learn MCP Server solves all these problems by bringing Microsoft documentation directly into your development environment. No more tab switching, no outdated information, just instant and accurate answers right where you code.
π Setup and Configuration
The configuration is surprisingly simple! You can install an MCP server directly through its own registry:
- Select the MCP server from the list
- Click the Install button
- VS Code automatically adds the Microsoft Learn MCP Server to your configuration in the
mcp.jsonfile
Done! Now just open GitHub Copilot Chat, make sure you're in agent mode, and start using it.
π¬ Real-World Scenario: Connecting NodeJS to PostgreSQL on Azure
Let's look at a practical example. Imagine you have a basic NodeJS application that needs database connectivity. In the past, you would open multiple tabs to research:
- Connection patterns
- Security configurations
- How to integrate with Azure
Now, Just Ask Copilot:
"How do I connect a NodeJS application to PostgreSQL on Azure with proper security practices?"
And watch the magic happen! πͺ
What GitHub Copilot Agent Does:
GitHub Copilot in agent mode:
- β Identifies exactly which files need to be changed
- β Adds seed data to the database
- β
Updates
package.jsonwith necessary libraries - β Creates database management scripts
- β Suggests commands for execution
- β
Generates
.envfile with appropriate environment variables
Generated Files:
- README.md - Project documentation
- Setup and seed tasks - To initialize and populate the database
- Management scripts - To administer the database
- .env file - With user, ports, development mode, and more
Testing the Application:
npm run setup # Creates the database
npm run seed # Inserts initial data
npm start # Starts the service
Done! Your application is now reading correctly from PostgreSQL. π
βοΈ Deploying to Azure with Bicep and Azure Developer CLI
But it doesn't stop there! You can also ask Copilot to prepare the Azure deployment:
"Create Bicep files and use Azure Developer CLI (azd) to deploy to Azure"
The Azure MCP Server Comes into Action:
Copilot uses another powerful MCP server - the Azure MCP Server - to:
- π Get deployment best practices
- ποΈ Create Bicep files for infrastructure as code
- π³ Generate Dockerfiles
- π¦ Configure Azure Developer CLI (azd)
Created Resources:
Copilot generates all the necessary infrastructure:
- Container Apps - For your application
- PostgreSQL Database - Managed database
- Container Registry - For your Docker images
- Key Vault - For secrets management
- Managed Identity - For secure authentication
Security and Best Practices:
- β Everything stored in Key Vault
- β Encryption at rest
- β RBAC (Role-Based Access Control)
- β Production-ready
- β Auto-scaling configured
- β Monitoring included
- β Cost-optimized
Generated Commands:
Copilot even shows you the necessary commands and in what order to run them!
π― Conclusion
The Microsoft Learn MCP Server combined with GitHub Copilot revolutionizes the developer workflow:
- β No more 20 open tabs
- β Up-to-date documentation right in VS Code
- β Database configuration in minutes
- β Azure deployment with best practices
- β Production-ready and secure by design code
This entire process that would take hours of research and manual configuration can now be done in minutes, with the confidence that you're following industry best practices.
πΊ See It in Action!
Want to see all this working in practice? Check out the complete video where this entire process is demonstrated step by step:
π Watch the video: Add a database in minutes using the Microsoft Learn MCP server and GitHub Copilot!
π Additional Resources
- π MCP for Beginners: aka.ms/mcp-for-beginners
- ποΈ Presented by: Chris Noring - Senior A.I Developer Advocate
π² Follow VS Code
- X (Twitter): @code
- Bluesky: vscode.dev
- YouTube: VS Code Channel
- LinkedIn: Microsoft Visual Studio Code
- GitHub: microsoft/vscode
Credits: This article was based on the demonstration presented by Chris Noring, Senior A.I Developer Advocate for JavaScript at Microsoft.
Have you already tried MCP servers in your workflow? Share your experience in the comments! π
Top comments (0)