- Home
- MCP servers
- ForIT Microsoft Graph
ForIT Microsoft Graph
- javascript
6
GitHub Stars
javascript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"foritllc-forit-microsoft-graph": {
"command": "npx",
"args": [
"-y",
"@foritllc/microsoft-graph"
],
"env": {
"MS365_MCP_CLIENT_ID": "YOUR_CLIENT_ID",
"MS365_MCP_TENANT_ID": "common",
"MS365_MCP_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}ForIT Microsoft Graph MCP Server provides a lean, multi-tenant-capable gateway to the Microsoft Graph API. It exposes a single flexible tool that can call any Graph API endpoint, reducing context size and enabling direct access to multiple accounts without constantly switching tenants.
How to use
You interact with a single MCP tool to perform any Graph API operation. Use the graph tool to run requests like reading your mailbox, listing calendar events, or querying user data. When you have multiple Microsoft 365 accounts cached, specify which account to target by including an accountId with your request. This lets you work across tenants in the same conversation without switching context.
How to install
Install the MCP server globally using a package manager.
npm install -g @foritllc/microsoft-graph
Configuration and usage notes
The server provides a single tool to access the Graph API. It supports device code authentication and can cache multiple accounts for multi-tenant workflows.
To run the server from your MCP client, use the provided stdio configuration that invokes the tool via npx. The configuration below demonstrates how to expose the graph tool.
{
"mcpServers": {
"graph": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@foritllc/microsoft-graph"]
}
}
}
Environment and authentication
You can supply environment settings to guide authentication and tenant usage. The MCP supports environment variables for client credentials and tenant context.
Environment variables
Configure credentials and tenant context as needed for your deployment.
Examples of multi-tenant usage
Authenticate and cache multiple tenants, then target individual tenants by accountId in your Graph requests. This enables cross-tenant queries without account switching.
Available tools
login
Authenticate with Microsoft using device code flow and cache the account for subsequent requests.
logout
Log out from the currently cached Microsoft account.
verify-login
Check the current authentication status and cached accounts.
list-accounts
List all Microsoft accounts currently cached in the MCP client.
select-account
Switch the default cached account for subsequent requests.
remove-account
Remove a cached account from the MCP client.
graph-request
Execute any Graph API request by specifying endpoint, method, and optional parameters.