Skip to main content
Glama
marlonluo2018

Microsoft Graph MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
authA

Manage authentication with Microsoft Graph. Four simple actions:

• 'start' - Start login flow, returns verification URL and code to enter in browser • 'complete' - Complete login after browser authentication (auto-loads device code) • 'check_status' - Check auth status: returns authenticated or need login • 'logout' - Clear all authentication tokens

WHEN AUTHENTICATION NEEDED: Always try 'check_status' FIRST. If it fails (no token or expired), then call 'start'.

WORKFLOW:

  1. Call auth action='start' → get URL and code

  2. Open URL in browser, enter the code, complete Microsoft login

  3. Call auth action='complete' → authentication finished

AUTO-REFRESH: Access tokens auto-refresh when expired (no user action needed). Refresh tokens are valid for ~90 days.

Returns:

  • check_status: {status: string, authenticated: boolean, message: string}

  • start: {status: string, verification_uri: string, user_code: string, message: string}

  • complete: {status: string, authenticated: boolean, message: string}

  • logout: {status: string, authenticated: false, message: string}

user_settingsA

Manage user settings with two actions: 'init' to initialize settings when configuration is missing or corrupted (requires multimodal_supported parameter to indicate if LLM supports image processing), 'update' to update one or more settings (supports partial updates). Note: 'init' action attempts to get user timezone from Graph API if authenticated, but works without login. 'update' action is purely local and requires no authentication. MULTIMODAL DETECTION: If you are a multimodal LLM that can process images, please set multimodal_supported=true when calling init or update.

search_contactsA

FIND PEOPLE/CONTACTS ONLY. Search for people by name or email address in organization directory. Returns contact information (name, email, etc.). DO NOT use this to search email messages - use search_emails for that. Use this when you need to find information about a person, such as 'who is John Smith' or 'find contact with email john@company.com'. Default limit: 10. Note: If you encounter a rate limit error (429), the response will include a 'retry_after' field indicating how many seconds to wait before retrying. Returns: {success: boolean, contacts: array, count: integer, limit_reached: boolean, message: string, retry_after: integer (if rate limited)}.

manage_mail_folderB

Manage mail folders. Supports list, create, delete, rename, get_details, and move operations. Returns: {success: boolean, message: string, path: string, displayName: string, totalItemCount: integer, unreadItemCount: integer, childFolderCount: integer}. Note: Invalid folder paths return appropriate error messages.

manage_emailsA

Manage emails with multiple actions. Supports moving, deleting, archiving, flagging, and categorizing emails. Actions include: move_single, move_all, delete_single, delete_multiple, delete_all, archive_single, archive_multiple, flag_single, flag_multiple, categorize_single, categorize_multiple. Returns: {success: boolean, message: string, moved_count: integer, failed_count: integer, errors: array}. Note: Invalid cache_number returns appropriate error message.

browse_email_cacheA

Browse emails in the cache with pagination. Returns summary information with number column indicating position in cache. Use page_number to navigate. Automatically manages browsing state with disk cache for persistence. WORKFLOW: Use search_emails to load emails into the cache first. ATTACHMENT INFO: Each email now includes attachment details (id, name, size, contentType) so you can see what attachments are available before downloading. IMAGE ATTACHMENTS: When you see image attachments (contentType starts with 'image/'), use get_email_content to retrieve them. Image content will be included automatically for multimodal analysis (requires MULTIMODAL_SUPPORTED=true). You MUST then analyze the images - they often contain critical information not mentioned in text. Returns: {current_page: integer, total_pages: integer, count: integer, total_count: integer, emails: array (with attachments array), date_range: string, filter_date_range: string, timezone: string}.

search_emailsA

SEARCH EMAIL MESSAGES ONLY. Search or list email messages by keywords, sender, subject, or body. Returns matching email messages with summary information. DO NOT use this to find people/contacts - use search_contacts for that. If no search_type and query are provided, lists emails within the specified time range. All time parameters use your local timezone. PARAMETER PRECEDENCE (highest to lowest): 1) time_range (overrides all other time parameters), 2) start_date/end_date (overrides days), 3) days (used only if no other time parameters provided). IMPORTANT FOR OLD EMAILS: The 'days' parameter has a maximum limit (default 90 days). To search emails older than this limit, use start_date/end_date parameters instead - they have NO date range restriction and can search any historical emails. Example: start_date='2023-01-01', end_date='2023-12-31'. FOCUSED INBOX: By default, searches only 'focused' emails (Outlook's Focused Inbox). Use inference_classification='other' to search 'other' emails, or inference_classification='all' to search both. Returns: {success: boolean, emails: array, count: integer, date_range: string, filter_date_range: string, timezone: string}. Note: Rate limit errors (HTTP 429) return retry_after field with seconds to wait. Invalid folder paths return appropriate error messages.

get_email_contentA

Get full email content by cache number. Use the cache number from browse_email_cache (e.g., 1, 2, 3) to retrieve complete email with body, attachments, and all details. Returns: {success: boolean, subject: string, from: string, to: array, cc: array, bcc: array, body: string, attachments: array, sent_date: string, received_date: string}. Note: Invalid cache_number returns appropriate error message. ATTACHMENT DOWNLOAD: Set download_attachments=true to download attachments to the workspace/attachments folder. Attachments are saved with their original names. Use attachment_names to download only specific attachments. IMAGE ATTACHMENTS: When an email has image attachments (contentType starts with 'image/'), image content will be included automatically for multimodal analysis (requires MULTIMODAL_SUPPORTED=true in config). IMPORTANT: If images appear in the response, you MUST analyze them immediately - they often contain critical information (screenshots, photos, diagrams, charts, instructions) not mentioned in the text body. Do NOT skip image analysis.

send_emailA

Send emails directly without creating drafts. Supports three actions: 'send_new' to send a new email, 'reply' to reply to an existing email, and 'forward' to forward an existing email. All actions send emails immediately - no drafts are created. Supports multiple recipients, CC, and BCC. The htmlbody parameter accepts HTML format for rich email content. RECOMMENDED FOR BCC: Use bcc_csv_file parameter to provide BCC recipients from a CSV file - this is the preferred method for handling large BCC lists with automatic batching support (up to 500 recipients per batch by default). NOTE: For forward action, 'to' is optional when using 'bcc_csv_file' or 'bcc' - you can forward emails using only BCC recipients. Returns: {success: boolean, message: string, sent_count: integer, failed_count: integer, recipients: array}.

browse_eventsA

Browse calendar events in the cache with pagination. Returns summary information with number column indicating position in cache. Use page_number to navigate. Automatically manages browsing state with disk cache for persistence. WORKFLOW: Use search_events to load events into the cache first. Returns: {current_page: integer, total_pages: integer, count: integer, total_count: integer, events: array, date_range: string, timezone: string}.

get_event_detailA

Get detailed information for a specific calendar event by its cache number. WORKFLOW: First call browse_events or search_events to get event list, then use this tool with cache number from results. Returns: Event object with id, subject, start, end, location, attendees, body, recurrence, and online meeting details. Note: Invalid cache_number returns appropriate error message.

search_eventsA

Search or list calendar events by keywords. Returns matching events with summary information. If no query is provided, lists events within the specified time range. All time parameters use your local timezone. When using time_range, the response includes a user-friendly display string (e.g., 'Today', 'This Week', 'This Month'). Returns: {success: boolean, events: array, count: integer, date_range: string, timezone: string}. Note: Subject search uses exact substring matching, organizer search uses fuzzy matching.

check_attendee_availabilityA

Check availability of attendees for a given date. WORKFLOW: Typically use before calling manage_my_event with create action to find optimal meeting times. Automatically includes the organizer (you) in the availability check to ensure overlap-free time slots. Automatically calculates time range based on all attendees' working hours. Returns: {success: boolean, message: string, availability_view: string, schedule_items: array, top_slots: array}. Availability view string uses single-character codes for each time interval: 0=Free, 1=Tentative, 2=Busy, 3=Out of office (OOF), 4=Working elsewhere, ?=Unknown. Note: Supports up to 20 attendees total (mandatory + optional).

manage_event_as_organizerA

Manage calendar events where you are the organizer (events you created). Actions: create, update, cancel, forward, email_attendees. WORKFLOW: For update, cancel, forward, and email_attendees actions, use cache number from browse_events or returned when creating an event. Returns: Event object with id, subject, start, end, location, attendees, body, recurrence, and online meeting details. Note: Conflict errors may occur when updating event times that overlap with existing events.

manage_event_as_attendeeA

Manage calendar events where you are an attendee (events organized by others). Actions: accept, decline, tentatively_accept, propose_new_time, delete_cancelled, email_attendees. WORKFLOW: Use cache_number from browse_events or search_events results. Returns: Response confirmation message with action status and updated event information. Note: If event is already responded to, returns appropriate error message. IMPORTANT: accept/decline/tentatively_accept/propose_new_time actions will automatically handle events where the organizer didn't request responses. For accept: updates the event to showAs='busy' and enables reminders. For tentatively_accept: updates the event to showAs='tentative' and enables reminders. For decline: deletes the event from your calendar. For propose_new_time: deletes the event from your calendar and instructs you to contact organizer directly (since proposals require responses). This matches Outlook's behavior. The delete_cancelled action is specifically for removing a CANCELLED event from your calendar (ONLY use when organizer has cancelled the event - do NOT use to decline invitations). The email_attendees action sends email to event attendees (to=required attendees, cc=optional attendees, organizer excluded from recipients).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/marlonluo2018/microsoft_graph_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server