m365-helping-agent
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@m365-helping-agentList my recent car repairs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HelpingAgent
A learning project demonstrating how to connect a Microsoft 365 Declarative Agent to a remote Model Context Protocol (MCP) server secured with Microsoft Entra ID OAuth authentication.
Overview
HelpingAgent is a Microsoft 365 Copilot Declarative Agent that helps users manage car repair records. Instead of calling a traditional REST API directly, the agent communicates with a remote MCP server over Streamable HTTP. Every tool invocation is protected using OAuth 2.0 with Microsoft Entra ID, ensuring that only authenticated users can access repair data.
The project uses Azure Table Storage (emulated locally using Azurite) as the backend datastore and demonstrates an end-to-end implementation of:
Microsoft 365 Declarative Agents
Model Context Protocol (MCP)
OAuth authentication with Microsoft Entra ID
Azure Table Storage
Microsoft 365 Agents Toolkit
Features
Declarative Agent
List repair records
View repair details
Create new repairs
Update existing repairs
Filter repairs by assigned technician
Remote MCP Server
Built using FastMCP
Uses Streamable HTTP transport
Exposes repair operations as MCP tools
Communicates securely with Microsoft 365 Copilot
OAuth Authentication
Microsoft Entra ID issued Bearer (JWT) tokens
JWKS-based signature verification
Validation of:
Issuer
Audience
Required scopes
Data Storage
Azure Table Storage
Local development using Azurite
Architecture
Microsoft 365 Copilot
(Declarative Agent)
│
│
OAuth Protected MCP Tool Calls
(Bearer JWT Access Token)
│
▼
MCP Server (FastMCP)
Streamable HTTP Transport
src/mcp_server.py
• JWT Signature Validation
• Issuer Validation
• Audience Validation
• Scope Validation
│
▼
Azure Table Storage
Repairs Table
(Azurite for Local Development)Repository Structure
Path | Description |
| MCP server implementation containing repair tools and OAuth token validation. |
| Seeds Azure Table Storage with sample repair records. |
| Sample repair data used during initialization. |
| Declarative Agent definition. |
| Plugin configuration connecting the agent to the remote MCP server. |
| System instructions for the Declarative Agent. |
| Adaptive Card templates used to display repair information. |
| Microsoft Teams/Microsoft 365 app manifest. |
| Azure infrastructure definition. |
| Microsoft 365 Agents Toolkit provisioning and deployment pipeline. |
| Local development pipeline. |
| Environment configuration files. |
| OAuth implementation checklist. |
| Project learning guide. |
OAuth Authentication Flow
The MCP server is secured using Microsoft Entra ID OAuth.
A Microsoft Entra ID application exposes the custom scope:
access_as_userThe MCP server is configured with:
OAUTH_ACCEPTED_ISSUERSOAUTH_ACCEPTED_AUDIENCESOAUTH_REQUIRED_SCOPESOAUTH_JWKS_URI
For every MCP tool call:
Extract the Bearer token
Verify the JWT signature using Microsoft's JWKS
Validate the issuer
Validate the audience
Validate the required scope
Reject unauthorized requests
The plugin (
ai-plugin.json) uses:"auth": { "type": "OAuthPluginVault" }Microsoft 365 Copilot handles user authentication, consent, token acquisition, and automatically includes the Bearer token with every MCP request.
During provisioning, the Microsoft 365 Agents Toolkit registers the OAuth configuration using the
oauth/registerstep and stores the generated reference ID in the environment configuration for use by the plugin.
Prerequisites
Python 3.13
Node.js
Microsoft 365 Agents Toolkit
Microsoft 365 Copilot enabled tenant
Microsoft Entra ID App Registration
Azure Table Storage (Azurite for local development)
Local Development
Install dependencies
pip install -r requirements.txt
npm installStart Azurite
npm run start:azuriteSeed sample data
npm run init-dataStart the MCP Server
npm run start:mcp-httpThe MCP server runs at:
http://127.0.0.1:3001Inspect available MCP tools
npm run inspectorRun the legacy HTTP Azure Function (optional)
npm run devRun the complete solution
Press F5 in Visual Studio Code using the Microsoft 365 Agents Toolkit.
The toolkit will:
Provision the application
Start the MCP server
Create a Development Tunnel
Configure OAuth
Sideload the Declarative Agent into Microsoft 365 Copilot
Environment Configuration
Environment variables are organized by deployment stage.
env/
├── .env.local
├── .env.local.user
├── .env.dev
└── .env.dev.user.env.*files contain non-secret configuration..env.*.userfiles contain secrets and are excluded from source control.
Important Variables
Variable | Description |
| Azure Table Storage connection string. |
| Accepted Microsoft Entra ID issuer(s). |
| Accepted App ID URI(s). |
| Required OAuth scope(s). |
| Microsoft Entra ID JWKS endpoint. |
| Public MCP server URL. |
Technologies Used
Microsoft 365 Copilot
Microsoft 365 Declarative Agents
Model Context Protocol (MCP)
FastMCP
Streamable HTTP
Microsoft Entra ID
OAuth 2.0
JSON Web Tokens (JWT)
JSON Web Key Sets (JWKS)
Azure Table Storage
Azurite
Microsoft 365 Agents Toolkit
Python 3.13
Project Status
✅ Microsoft 365 Declarative Agent implemented
✅ Remote MCP Server implemented
✅ Azure Table Storage integration completed
✅ OAuth authentication with Microsoft Entra ID implemented
✅ JWT validation using JWKS implemented
✅ Streamable HTTP transport configured
✅ End-to-end communication between Microsoft 365 Copilot and the MCP server verified
Learning Objectives
This project was built as a hands-on learning exercise to understand:
Building Microsoft 365 Declarative Agents
Developing MCP servers using FastMCP
Exposing functionality as MCP tools
Securing MCP servers with Microsoft Entra ID OAuth
Validating JWT access tokens using JWKS
Connecting Microsoft 365 Copilot to remote MCP servers
Using Azure Table Storage as the backend datastore
Provisioning and deploying applications with the Microsoft 365 Agents Toolkit
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vishnukarthikr/m365-helping-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server