๐ Microsoft Education MCP Server
February 26, 2026 ยท View on GitHub
โ ๏ธ This is a personal project. It is not affiliated with or maintained by Microsoft.
This project is a custom Model Context Protocol (MCP) server built to integrate with Microsoft Graph API for Education.
It enables VSCode, Copilot Studio, Claude, and Microsoft AI Foundry agents to manage:
- โ Microsoft Education Classes
- โ Assignments (create, update, target students)
- โ Rubrics (create, attach, list)
- โ Students and teachers (roster)
- โ Submissions and grading
Built for AI-driven tools, testing, and intelligent prompt integration.
๐ Features
- ๐ Microsoft delegated authentication (OAuth via MSAL)
- ๐งโ๐ซ Class & roster exploration
- ๐ Assignment creation, updating, and student targeting
- ๐ Rubric creation and re-use
- ๐ค View assignment submissions & outcomes
- ๐ง Designed for VSCode, Copilot Studio, Claude, and Microsoft AI Foundry
๐ Structure
๐ Key Components
-
start-mcp-server-streaming.js- Loads and registers all tools with OAuth 2.0 authentication layer.
- Implements OAuth 2.0 server with Windows account picker integration.
- Manages Microsoft Graph authentication via MSAL for backend API access.
- Starts the MCP server using the Model Context Protocol SDK with streaming transport.
-
tools/folder- Each file defines a set of related tools and registers them with the server.
- Tools follow the MCP standard (
server.tool(...)) with Zod schema validation and Microsoft Graph integration.
-
.env- Stores sensitive Microsoft app credentials and config.
- Required for Microsoft Graph API authentication.
-
Example.env- A safe template for sharing or onboarding collaborators.
This layout makes it easy to:
- Add or modify functionality (just add a file in
tools/) - Keep logic separated by domain (e.g., assignments vs rubrics)
- Support clean and scalable MCP integration
๐ How to Register the Application in Entra ID (Azure AD)
To use Microsoft Graph API with this project, you need to register an app in Entra ID:
1. Go to Microsoft Entra Admin Center
- Visit: https://entra.microsoft.com
- Sign in with an admin account.
2. Register a New Application
-
Navigate to "Applications" โ "App registrations"
-
Click "New registration"
-
Fill in:
- Name:
Microsoft Education MCP Server(or any name you prefer) - Supported account types: Choose based on your scenario (usually "Accounts in this organizational directory only")
- Redirect URI: Leave blank for now (will be added after Azure App Service is created)
- Name:
-
Click "Register"
3. Configure API Permissions
-
After registration, go to "API permissions"
-
Click "Add a permission" โ Microsoft Graph โ Delegated permissions
-
Add the following permissions (use the search/filter to find each one):
OpenID permissions:
offline_accessopenidprofile
EduAssignments:
EduAssignments.ReadWrite
EduRoster:
EduRoster.ReadWrite
User:
User.ReadWrite.All
-
Click "Add permissions"
-
Then, in "Configured permissions", click "Grant admin consent for [your tenant]" to approve them for all users in your tenant.
๐ก Tip: The "Grant admin consent" button only appears if you are signed in with an admin account. This step ensures all users (not just the admin) can use these permissions.
4. Generate a Client Secret
- Go to "Certificates & secrets"
- Under Client secrets, click "New client secret"
- Description: Type any label you like (e.g.,
mcp-server-secret) โ this is just a friendly name to help you identify it later. - Expires: Choose an expiration period (e.g., 6 months or 12 months)
- Click "Add"
- Copy the "Value" immediately โ this is your
CLIENT_SECRET. You won't be able to see it again after leaving this page!
โ ๏ธ Important: The "Value" column is your secret, not the "Secret ID". Save it somewhere safe (e.g., a password manager or a notepad) โ you'll need it later.
5. Save These Values
Go to your app registration's "Overview" page and copy these values. Save them in a notepad โ you'll need them during Azure deployment.
| Name | Where to find it |
|---|---|
CLIENT_ID | Application (client) ID on the Overview page |
CLIENT_SECRET | The Value you copied in Step 4 |
TENANT_ID | Directory (tenant) ID on the Overview page |
REDIRECT_URI | We'll create this in the Azure Deployment section below โ skip it for now |
๐ Azure Deployment Guide
Deploy your MCP server to Azure App Service for production use with OAuth 2.0 authentication.
1. ๐ Prerequisites
- โ Azure subscription
- โ Azure App registration (completed above)
- โ Code pushed to GitHub repository
2. ๐๏ธ Create Azure App Service
Azure Portal
- Go to Azure Portal
- Create a resource โ Web App
- Configure:
- Subscription: Your subscription
- Resource Group: Create new or use existing (e.g.,
edumcp-resource-group) - Name:
your-app-name(choose a name that makes sense for your organization. It has to be a name that is unique in the Azure stack.) - Publish:
Code - Runtime stack:
Node 22 LTS - Operating System:
Linux - Region: Choose closest to your users
- Linux Plan: Default
- Pricing Plan: Default
- Click "Review + create", then after validation click "Create". It should deploy in a minute or two.
3. ๐ Configure Environment Variables
In Azure Portal โ App Services โ [Your App] โ Settings โ Environment Variables โ click "+ Add":
Add the following four environment variables (Name โ Value):
| Name | Value |
|---|---|
CLIENT_ID | Your Application (client) ID from Entra |
TENANT_ID | Your Directory (tenant) ID from Entra |
CLIENT_SECRET | The client secret Value you saved earlier |
REDIRECT_URI | https://<YOUR_APP_NAME>.azurewebsites.net/oauth/callback |
Replace
<YOUR_APP_NAME>with the App Service name you chose in Step 2 (e.g.,edumcp-server-prod).
Once all four are added, click "Apply" and then "Confirm" to restart the app service.
4. ๏ฟฝ Add Redirect URI in Entra ID (Azure AD)
Now that your App Service is created and you have the URL, you must go back to your app registration and add the redirect URI.
โ ๏ธ Important: If you skipped adding the redirect URI during app registration, authentication will fail until you complete this step.
Steps to Add the Redirect URI:
- Go to Microsoft Entra Admin Center
- Navigate to "Entra ID" โ "App registrations"
- Select your registered application from the list
- In the left sidebar, click "Authentication"
- Under "Platform configurations", click "Add a platform"
- Select "Web"
- In the "Redirect URIs" field, enter:
Replacehttps://<YOUR_APP_NAME>.azurewebsites.net/oauth/callback<YOUR_APP_NAME>with your actual Azure App Service name (e.g.,edumcp-server-prod). - Click "Configure" to save
5. ๏ฟฝ๐ฆ Deploy Your Code
Option A: External Git (Recommended)
โ ๏ธ Note: Before deploying, Azure requires SCM Basic Authentication to be enabled.
Go to App Service โ Configuration โ General settings โ SCM Basic Auth Publishing Credentials โ On โ click "Apply"
Then proceed with the deployment:
- Azure Portal โ App Services โ [Your App] โ Deployment โ Deployment Center
- Source: Manual Deployment โ External Git
- Repository:
https://github.com/jesegher/EduMCPServer.git - Branch:
main - Repository Type: Public
- Click "Save"
Option B: VS Code Extension
- Install Azure App Service extension
- Right-click your project โ Deploy to Web App
- Select your subscription and app service
6. ๐ฏ Configure MCP Clients
Update your MCP client configurations for production:
VS Code MCP Client Config:
Add to your VS Code mcp.json (User settings):
{
"servers": {
"EDUMCP Server": {
"url": "https://your-app-name.azurewebsites.net/mcp",
"type": "http"
}
}
}
VS Code automatically discovers OAuth configuration via the /.well-known/oauth-authorization-server endpoint.
Claude (Anthropic):
In Claude's MCP server settings, add a remote MCP server with the URL:
https://your-app-name.azurewebsites.net/mcp
Claude will use dynamic client registration and OAuth 2.0 automatically.
Microsoft AI Foundry:
In your AI Foundry project, add a remote MCP tool with the endpoint:
https://your-app-name.azurewebsites.net/mcp
Foundry discovers OAuth configuration via the /.well-known/oauth-authorization-server endpoint.
7. โ Verify Deployment
-
Test Endpoints:
- Health check:
https://your-app-name.azurewebsites.net - OAuth discovery:
https://your-app-name.azurewebsites.net/.well-known/oauth-authorization-server
- Health check:
-
Check Logs in Azure Portal โ App Service โ Log stream
-
Test Authentication with your MCP client
8. ๐ก๏ธ Production Security
- โ Use Key Vault for sensitive secrets (optional)
- โ Enable HTTPS only in App Service โ TLS/SSL settings
- โ Configure custom domain (optional)
- โ Set up Application Insights for monitoring
๐ง Scenario: Remediation Flow for Underperforming Students
This is a structured walkthrough based on original prompts for data analysis and follow-up instruction.
๐ Original Prompts
-
Find my assignment 'lineair equation' in my algebra course. Give me the name, instructions and the due date.
-
I want an overview in table format of all underperforming students. I want their name, their feedback I provided, and the rubric if there is one associated. I want one line per student. Split up the rubric separate items.
-
Can you analyze the rubric feedback and find commonalities.
-
Based on this feedback, what are some ideas to remediate this.
-
I want them to practice variations.
-
Translate this into an assignment and rubric.
-
Create for those students a new draft assignment with this information ... Give them two weeks to complete it.
Each prompt serves as a step in a larger automated or AI-assisted education workflow:
- Retrieving targeted assignments
- Analyzing rubric-aligned feedback
- Identifying patterns in student work
- Recommending learning interventions
- Creating and assigning personalized remediation tasks
๐ฅ๏ธ Scenario: In Copilot Studio, prep for a Parent-Teacher Conference
Prompt: Can you give me a full performance overview of Al Frederickson in preparation of my parent-teacher conference with his parents?
Visualization in Copilot Studio