# ms-graph-mcp [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/nitin27may/ms-graph-mcp  
**GitHub Stars:** 4  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ms-graph-mcp

## Description
Microsoft Graph MCP server — 85 tools for mail, calendar, Teams, files, SharePoint, and Entra ID

## Tools
Capabilities this server exposes over MCP:

- **calendar_list_upcoming_events** — List the signed-in user's upcoming calendar events for the next N days, soonest first. Returns id, subject, start and end times, organiser and whether it is online. This is the tool for 'what's on my calendar'. Use calendar_list_events_in_range for a specific window, and calendar_get_event for full detail including the join URL. Requires Calendars.Read.
- **calendar_get_event** — Get one calendar event in full by its id: subject, times, organiser, location, agenda preview, the Teams join URL and the complete attendee list with each person's response status. Takes an event id from calendar_list_upcoming_events or calendar_list_events_in_range. Use calendar_get_event_attendees when only the attendee list is needed. Requires Calendars.Read.
- **calendar_get_event_attendees** — List who was invited to a calendar event and how each person replied — accepted, declined, tentative or no response. Returns email, display name and response status per attendee. Use this when the question is about who is coming; calendar_get_event returns the same list alongside the event's other detail. Requires Calendars.Read.
- **calendar_list_events_in_range** — List calendar events between two dates, in chronological order. Use for any window that is not simply 'the next few days' — last week's meetings, a specific month, or a range the user names. Dates are ISO 8601 (2026-01-15) and the whole of both end days is included. Returns id, subject, times and organiser. Requires Calendars.Read.
- **calendar_find_meeting_times** — Ask Microsoft Graph to suggest meeting times when the given attendees are free, ranked by how likely everyone is to attend. Returns candidate slots with a confidence percentage and per-attendee availability. This reads calendars and books nothing — pass a chosen slot to calendar_create_event to actually schedule it. Requires Calendars.Read.Shared.
- **calendar_get_free_busy** — Look up whether people are free or busy across a time window, without seeing what their meetings are. Returns per-person busy periods and a slot-by-slot free/tentative/busy/out of office breakdown. Use to answer 'when is X available'; calendar_find_meeting_times is better when the goal is a slot that suits a whole group. Requires Calendars.ReadBasic.
- **mail_list_attachments** — List the file attachments on one email — name, content type and size in bytes. Returns metadata only and never file contents, so it is safe to call on messages with very large attachments. Inline images such as signature logos are excluded. Requires Mail.Read.
- **mail_search** — Search the signed-in user's mailbox by keyword, subject or sender name. Returns id, subject, sender, date and a preview snippet, newest first. Searchable folders are inbox, sentitems, drafts, or all. Use mail_list_recent when the ask is time-based rather than keyword-based, and mail_get_thread to read a whole conversation. Requires Mail.Read.
- **mail_list_recent** — List the signed-in user's most recent emails from the last N days, newest first. Returns id, subject, sender, date and a preview snippet. Use for 'what came in today' or catching up after time away; mail_search is the tool when specific keywords or a sender are known. Requires Mail.Read.
- **mail_list_flagged** — List emails the signed-in user has flagged for follow-up, newest first. Returns id, subject, sender, date and preview. Flags are the user's own marker for 'come back to this', so use it for 'what do I still need to deal with' rather than mail_list_recent, which returns everything regardless of state. Requires Mail.Read.
- **mail_get_thread** — Read every message in one email conversation, oldest first, given a conversation id from any of the mail listing tools. Returns full message bodies rather than previews, so it is the tool for understanding what was actually discussed before replying or summarising. Requires Mail.Read.
- **files_search** — Search the signed-in user's OneDrive and the SharePoint sites they can reach, by filename or content keyword. Returns id, name, drive id, size, last-modified date and web URL. OneDrive and SharePoint document libraries are the same underlying resource, so one search covers both. Requires Files.Read.All.
- **files_list_trending** — List documents currently trending around the signed-in user — files their colleagues are actively working on, ranked by Microsoft 365 activity signals rather than by the user's own history. Use for 'what is the team working on'. files_list_recent is the tool for what this user personally touched. Requires Files.Read.All.
- **files_list_recent** — List files the signed-in user has recently opened or edited, most recent first. Returns id, name, drive id and web URL. Use for 'the document I was working on yesterday' — files_search is better when the name or a keyword is known, and files_list_trending covers what colleagues are working on. Requires Files.Read.
- **files_get_content** — Read the text content of a file in OneDrive or SharePoint, given a drive id and item id from files_search or files_list_recent. Works for text, Office documents and PDFs; binary files return a placeholder instead of bytes. Output is truncated to a caller-specified character limit. Requires Files.Read.All.
- **files_list_shared_with_me** — List files other people have shared directly with the signed-in user, with the owner and web URL for each. Covers items shared via OneDrive or SharePoint that do not live in the user's own drive, which is why files_list_recent and files_search may not surface them. Requires Files.Read.All.
- **search_query** — Search across Microsoft 365 in one call — email, calendar events, files, SharePoint sites and lists, and people. Best first move for a vague request, since it spans workloads no other single tool covers. Supports KQL such as 'budget filetype:xlsx'. Each entity type needs its own permission. Requires Mail.Read, Calendars.Read, Files.Read.All, Sites.Read.All and People.Read.
- **people_search** — Find colleagues the signed-in user actually works with, ranked by relevance from their own mail and meeting history — so it finds the right 'Priya' without exact spelling. Returns name, email, title and department. Use directory_search_users to search the whole tenant instead, or people_list_contacts for the saved address book. Requires People.Read.
- **people_list_contacts** — List the signed-in user's saved Outlook contacts, with names, email addresses and phone numbers. This is the user's personal address book and is the only place external contacts live — people with no account in the tenant, invisible to people_search and directory_search_users. Use it for phone numbers. Requires Contacts.Read.
- **people_search_contacts** — Search the signed-in user's saved Outlook contacts by name or company, returning emails and phone numbers. Searches the personal address book only — use people_search for colleagues the user works with, or directory_search_users to search the whole tenant. This is the one that finds external contacts. Requires Contacts.Read.
- **people_get** — Look up one person in the organisation by their exact email address and return their profile: display name, job title, department, office location and phone numbers. Use when the address is already known — people_search is the tool for finding someone by partial or approximate name. Fails if the address does not belong to a tenant account. Requires User.Read.All.
- **people_get_my_profile** — Get the signed-in user's own profile — their name, email address, job title, department and office. Call this first when a request says 'me', 'my' or 'I' and the user's own identity or email address is needed to answer it, for example before filtering a calendar or addressing a message. Takes no arguments. Requires User.Read.
- **files_get_group_drive** — Get the document library backing a Microsoft 365 group or Teams team, given a group id from directory_search_groups. Returns the drive id and web URL, which is what the other file tools need to read or write inside a team's shared files. Requires Files.Read.All and Group.Read.All.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "ms-graph-mcp": {
    "command": "uvx",
    "args": ["--from","ms-graph-mcp","ms-graph-mcp"],
    "env": {
      "GRAPH_MCP_CLIENT_ID": "",
      "GRAPH_MCP_TENANT_ID": ""
    }
  }
}
```

**Requires environment variables:** `GRAPH_MCP_CLIENT_ID`, `GRAPH_MCP_TENANT_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What ms-graph-mcp does

ms-graph-mcp gives MCP-compatible agents access to Microsoft Graph through a collection of 85 tools. Its coverage spans Outlook mail and calendars, meeting details and transcripts, Teams chat, OneDrive and SharePoint files, Microsoft 365 search, people and contacts, directory objects, tasks, and OneNote.

The tool set supports both focused requests and cross-workload discovery. For example, an agent can search messages by sender or keyword, retrieve a complete email thread, inspect upcoming meetings, find free time for attendees, locate files by content, and read text from Office documents or PDFs. The server also includes broader search across mail, events, files, SharePoint sites and lists, and people.

## How it works

The server communicates with MCP clients through standard input/output or Streamable HTTP. In the local sign-in flow, it uses an Entra ID public-client app and opens a browser for Microsoft 365 authentication, including MFA and conditional access. Tokens are cached in `~/.ms-graph-mcp/token_cache.json` with owner-only permissions.

Graph access is delegated to the signed-in user. Each tool requires the Microsoft Graph permission appropriate to its workload, such as `Mail.Read`, `Calendars.Read`, `Files.Read.All`, or `People.Read`. The server can receive an already-acquired Graph token through request context, and it can also perform an on-behalf-of exchange when configured as an OAuth resource server.

Read and write tools are separated. Write tools remain hidden and are rejected unless the caller explicitly enables write access.

## Setup and configuration

Python 3.12 or newer is required. The package can be run directly with `uvx`:

```bash
uvx --from ms-graph-mcp ms-graph-mcp
```

For HTTP transport, use:

```bash
uvx --from ms-graph-mcp ms-graph-mcp-http
```

An Entra app registration must use a public-client flow with `http://localhost` as the native redirect URI. Enable public client flows, add the delegated Microsoft Graph permissions needed by the tools, and provide the application client ID and directory tenant ID to the MCP client.

The required environment variables are:

```text
GRAPH_MCP_CLIENT_ID
GRAPH_MCP_TENANT_ID
```

The same stdio command and environment block can be configured in VS Code, Claude Desktop, Claude Code, Cursor, or Windsurf. Source installations use `uv sync` after cloning the repository.

## Tools and capabilities

- List upcoming events or events in a date range.
- Retrieve event details, Teams join links, attendees, and response states.
- Find meeting slots or inspect free, busy, tentative, and out-of-office periods.
- Search, browse, flag, and read Outlook messages and complete conversations.
- Find recent, trending, shared, or keyword-matched OneDrive and SharePoint files.
- Read text from supported Office files, PDFs, and other text content with a caller-set limit.
- Search colleagues, contacts, profiles, and Microsoft 365 content across workloads.
- Resolve a Microsoft 365 group or Teams team's backing document library.

## Limitations and notes

Graph permissions must be granted for the tools an agent uses, and some operations require broader permissions such as `Files.Read.All`, `Sites.Read.All`, or `User.Read.All`. File content output is truncated to a requested character limit, while binary files produce a placeholder rather than raw bytes. Attachment listing returns metadata only and excludes inline images.

The public packaging and API surface are described as early-stage, so configuration details may change before the first major release. A client secret is not needed for the local public-client sign-in flow.

_Full upstream README: https://allmcps.com/mcp/ms-graph-mcp/readme_

