Skip to main content
Glama
J7suite

Microsoft 365 MCP Server

by J7suite

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SILENTNotrue|1 disables console output.
LOG_LEVELNoSet logging level. Default: info.
READ_ONLYNotrue|1 starts the server in read-only mode, disabling write operations.
ENABLED_TOOLSNoFilter tools using a regex pattern.
MS365_MCP_MAX_TOPNoHard cap for Graph $top/top on list requests. Passed values are clamped to this positive integer.
ENABLED_TOOLS_FILENoPath to a file with one regex per line for tool filtering.
MS365_MCP_APP_MODENotrue|1 enables app mode using application permissions and no signed-in user.
MS365_MCP_ORG_MODENotrue|1 enables organization/work mode from start.
MS365_MCP_CLIENT_IDNoCustom Azure app client ID. Defaults to the built-in app.
MS365_MCP_MAX_ITEMSNoMaximum number of items accumulated when fetchAllPages is true. Default: 10000.
MS365_MCP_MAX_PAGESNoMaximum number of pages followed when fetchAllPages is true. Default: 100.
MS365_MCP_TENANT_IDNoCustom tenant ID. Defaults to 'common'. Personal Microsoft accounts should set this to 'consumers'.
MS365_MCP_CLOUD_TYPENoMicrosoft cloud environment: global, china, or gcc-high.
MS365_MCP_REDACT_PIINoSet to false|0 to disable scrubbing of JWTs, Bearer headers, OAuth token fields, and email addresses from logs.
MS365_MCP_USE_KEYTARNoSet to 0, false, no, or off to skip the OS credential store and use a local .cache-key file.
MS365_MCP_BLOB_OUTPUTNotrue|1 makes file download tools return an MCP EmbeddedResource with BlobResourceContents instead of base64 JSON in text.
MS365_MCP_BODY_FORMATNoSet to html to return email bodies as HTML instead of plain text.
MS365_MCP_DISABLE_DCRNotrue|1 disables OAuth Dynamic Client Registration in HTTP mode.
MS365_MCP_EAGER_TOOLSNoComma-separated exact tool names to expose directly when using --discovery.
MS365_MCP_OAUTH_TOKENNoPre-existing OAuth token for Microsoft Graph API, enabling Bring Your Own Token authentication.
MS365_MCP_UPLOAD_DIRSNoAbsolute directories upload-attachment-from-file may read from, separated like PATH.
MS365_MCP_USER_FIELDSNoComma-separated user profile field filter for covered /users reads and matching batch subrequests.
MS365_MCP_EXTRA_SCOPESNoAppend additional Graph scopes to the token request, for use with your own app registration and graph-batch.
MS365_MCP_KEYVAULT_URLNoAzure Key Vault URL for secrets management.
MS365_MCP_CLIENT_SECRETNoCustom Azure app client secret. Optional for public apps and used with custom app registrations or app mode.
MS365_MCP_OUTPUT_FORMATNoSet to toon to enable experimental TOON output format for token reduction.
MS365_MCP_ALLOWED_SCOPESNoLimit exposed tools to Graph scopes covered by this allowlist.
MS365_MCP_BLOB_MAX_BYTESNoLargest file a download tool reads with blob output enabled. Default: 5242880.
MS365_MCP_GRAPH_BASE_URLNoSend Graph API requests to this base URL instead of the cloud's graph.microsoft.com endpoint.
MS365_MCP_ATTACHMENT_HOSTNoInterface the attachment listener binds. Requires --attachment-port.
MS365_MCP_ATTACHMENT_PORTNoServe the attachment route on its own listener on this port. Requires --enable-attachment-urls.
MS365_MCP_ALLOW_PAGINATIONNoSet to 0, false, or no to disable multi-page following entirely.
MS365_MCP_MANAGED_IDENTITYNoUse the host's managed identity in app mode: 'system' or a user-assigned identity client ID.
MS365_MCP_TOKEN_CACHE_PATHNoCustom file path for the MSAL token cache.
MS365_MCP_TRUST_PROXY_HOPSNoNumber of trusted reverse-proxy hops in HTTP mode. Default: 1.
MS365_MCP_EXPECTED_USERNAMENoRequire local MSAL auth to use this Microsoft account username. Comparison is case-insensitive.
MS365_MCP_FORCE_WORK_SCOPESNoBackwards compatibility option for MS365_MCP_ORG_MODE.
MS365_MCP_OBO_ALLOWED_USERSNoWith --obo, only callers whose token user object id is listed may use the server. Comma or space separated.
MS365_MCP_ATTACHMENT_URL_KEYNoOptional signing key for server-minted attachment URLs.
MS365_MCP_AUTH_CACHE_COMMANDNoExternal executable wrapper for provider-neutral auth-cache storage.
MS365_MCP_ATTACHMENT_URL_BASENoRequired base URL used to mint server-served attachment URLs when --enable-attachment-urls is active.
MS365_MCP_OBO_ALLOWED_TENANTSNoWith --obo, only callers whose token tenant id is listed may use the server. Comma or space separated.
MS365_MCP_RATE_LIMIT_DISABLEDNotrue|1 disables per-IP rate limiting in HTTP mode.
MS365_MCP_ATTACHMENT_URL_TTL_SNoLifetime of attachment URL tickets in seconds. Default: 120, maximum: 300.
MS365_MCP_FEDERATED_TOKEN_FILENoFederated token file for workload identity federation, used instead of a secret or certificate in app mode.
MS365_MCP_ATTACHMENT_URL_KEY_IDNoOptional key ID for attachment URL signatures. Default: 1.
MS365_MCP_HTTP_LOCAL_FILE_TOOLSNotrue|1 registers local file tools over HTTP, subject to loopback and safety restrictions.
MS365_MCP_SELECTED_ACCOUNT_PATHNoCustom file path for selected account metadata.
MS365_MCP_MESSAGE_SIGNOFF_PREFIXNoSignoff text prepended to outgoing messages.
MS365_MCP_MESSAGE_SIGNOFF_SUFFIXNoSignoff text appended to outgoing messages.
MS365_MCP_ATTACHMENT_URL_KEY_FILENoOptional path to a signing key file for server-minted attachment URLs.
MS365_MCP_CLIENT_CERTIFICATE_PATHNoPEM file with a certificate and its unencrypted private key, used instead of MS365_MCP_CLIENT_SECRET in app mode.
MS365_MCP_EXPECTED_HOME_ACCOUNT_IDNoRequire local MSAL auth to use this exact MSAL homeAccountId.
MS365_MCP_READ_MAIL_TEXT_MAX_CHARSNoLargest result read-mail-text returns in characters. Default: 80000.
MS365_MCP_AUTH_CACHE_COMMAND_TIMEOUT_MSNoPer-invocation timeout for MS365_MCP_AUTH_CACHE_COMMAND in milliseconds. Default: 10000.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources