Microsoft Graph Agent MCP Server
Project description
Microsoft Agent - A2A | AG-UI | MCP
Version: 0.2.43
Overview
Microsoft Graph MCP Server + A2A Supervisor Agent
It includes a Model Context Protocol (MCP) server that wraps the Microsoft Graph API and an out-of-the-box Agent2Agent (A2A) Supervisor Agent.
Manage your Microsoft 365 tenant (Users, Groups, Calendars, Drive, etc.) through natural language!
This repository is actively maintained - Contributions are welcome!
Capabilities:
- Comprehensive Graph API Coverage: Access thousands of Microsoft Graph endpoints via MCP tools.
- Supervisor-Worker Agent Architecture: A smart supervisor delegates tasks to specialized agents (e.g., Calendar Agent, User Agent).
- Secure Authentication: Supports OAuth, OIDC, and other authentication methods.
MCP
MCP Tools
This server provides tools for a vast array of Microsoft Graph resources. Due to the large number of tools, they are organized by resource type.
Supported Resources (Partial List):
- Users:
get_user,update_user,list_user, etc. - Groups:
get_group,post_groups_group,list_members_group, etc. - Calendar:
get_calendar,post_events,list_calendarview, etc. - Drive/DriveItems:
get_drive,search_driveitem,upload_driveitem, etc. - Mail:
send_mail,list_messages, etc. - Directory Objects:
get_directoryobject,check_member_objects, etc. - Planner, OneNote, Teams, and more.
All tools generally follow the naming convention: action_resource (e.g., list_user, delete_group).
Using as an MCP Server
The MCP Server can be run in two modes: stdio (for local testing) or http (for networked access).
Run in stdio mode (default):
microsoft-agent --transport "stdio"
Run in HTTP mode:
microsoft-agent --transport "http" --host "0.0.0.0" --port "8000"
AI Prompt:
Find who manages the 'Engineering' group and list its members.
AI Response:
I've found the 'Engineering' group.
Owners:
- Jane Doe (Head of Engineering)
Members:
- John Smith
- Alice Johnson
- Bob Williams
...
A2A Agent
This package includes a powerful A2A Supervisor Agent that orchestrates interaction with the Microsoft MCP tools.
Architecture
The system uses a Supervisor Agent that analyzes user requests and delegates them to domain-specific Child Agents.
---
config:
layout: dagre
---
flowchart TB
subgraph subGraph0["Agent System"]
S["Supervisor Agent"]
subGraph1["Specialized Agents"]
CA["Calendar Agent"]
GA["Group Agent"]
UA["User Agent"]
DA["Drive Agent"]
OA["...Other Agents"]
end
B["A2A Server"]
M["MCP Tools"]
end
U["User Query"] --> B
B --> S
S --Delegates--> CA & GA & UA & DA & OA
CA & GA & UA & DA & OA --> M
M --> api["Microsoft Graph API"]
S:::agent
B:::server
U:::server
CA:::worker
GA:::worker
UA:::worker
DA:::worker
OA:::worker
classDef server fill:#f9f,stroke:#333
classDef agent fill:#bbf,stroke:#333,stroke-width:2px
classDef worker fill:#dcedc8,stroke:#333
style B stroke:#000000,fill:#FFD600
style M stroke:#000000,fill:#BBDEFB
style U fill:#C8E6C9
style subGraph0 fill:#FFF9C4
Component Interaction
- User sends a request (e.g., "Schedule a meeting with the Engineering team").
- Supervisor Agent identifies this as a calendar and group task.
- Supervisor delegates finding the group members to the Group Agent.
- Group Agent calls
list_members_grouptool and returns emails. - Supervisor delegates scheduling to the Calendar Agent with the retrieved emails.
- Calendar Agent calls
post_eventstool. - Supervisor confirms completion to the User.
Usage
MCP CLI
| Short Flag | Long Flag | Description |
|---|---|---|
| -h | --help | Display help information |
| -t | --transport | Transport method: 'stdio', 'http', or 'sse' [legacy] (default: stdio) |
| -s | --host | Host address for HTTP transport (default: 0.0.0.0) |
| -p | --port | Port number for HTTP transport (default: 8000) |
| --auth-type | Auth type: 'none', 'static', 'jwt', 'oauth-proxy', 'oidc-proxy' (default: none) | |
| ... | (See standard FastMCP auth flags) |
A2A CLI
Endpoints
- Web UI:
http://localhost:9000/(if enabled) - A2A:
http://localhost:9000/a2a(Discovery:/a2a/.well-known/agent.json) - AG-UI:
http://localhost:9000/ag-ui(POST)
| Argument | Description | Default |
|---|---|---|
--host |
Host to bind the server to | 0.0.0.0 |
--port |
Port to bind the server to | 9000 |
--provider |
LLM Provider (openai, anthropic, google, huggingface) | openai |
--model-id |
LLM Model ID | nvidia/nemotron-3-super |
--mcp-url |
MCP Server URL | http://microsoft-agent:8000/mcp |
Examples
Run A2A Server
microsoft-agent-server --provider openai --model-id gpt-4o --api-key sk-... --mcp-url http://localhost:8000/mcp
Docker
Build
docker build -t microsoft-agent .
Run MCP Server
docker run -p 8000:8000 microsoft-agent
Run Agent Server
docker run -e CMD=agent-server -p 9000:9000 microsoft-agent
Deploy as a Service
docker pull knucklessg1/microsoft-agent:latest
docker run -d \
--name microsoft-agent \
-p 8000:8000 \
-e HOST=0.0.0.0 \
-e PORT=8000 \
-e TRANSPORT=http \
knucklessg1/microsoft-agent:latest
Install Python Package
python -m pip install microsoft-agent
uv pip install microsoft-agent
Repository Owners
Documentation:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microsoft_agent-0.2.43.tar.gz.
File metadata
- Download URL: microsoft_agent-0.2.43.tar.gz
- Upload date:
- Size: 60.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c16639737852c9674e4ca9bc6988f9c1fd408f0bb1be158facc7629fc1917daf
|
|
| MD5 |
e5b01d49d5137cab80521a756a2ec488
|
|
| BLAKE2b-256 |
9d237cebf39a630f37fb9dd4a1e534fe343e127656e90459eb0d9bf28cc4c98f
|
File details
Details for the file microsoft_agent-0.2.43-py3-none-any.whl.
File metadata
- Download URL: microsoft_agent-0.2.43-py3-none-any.whl
- Upload date:
- Size: 63.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99e09fee30b3b736060be301134adee83a6d7930f23f59207fa3b6481acccd1d
|
|
| MD5 |
0fe7bd5794b23d95b9d7c60cb47783bf
|
|
| BLAKE2b-256 |
a54fd4bba251af9c9a9afe356dfad52eb92a7cebcbcf5ffa603baf5acd4cf6f9
|