Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Microsoft 365 Files

by mindstoneversion 0.2.1i★ 14 (Stars for the whole repo)iRuns on your computer
Registry nameio.github.mindstone/mcp-server-microsoft-files

How to install

What it does

Microsoft 365 OneDrive files via Graph: list, search, get, upload, download, share, read text.

  • Connects Runs on your computer
  • Account or key No key needed · 2 settings to fill in (MS_CLIENT_ID, MS_CONFIG_DIR)
  • Category Docs, sheets & office work

Install

Pick the AI app you use, then copy the settings.

Passed 2/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Microsoft 365 Files for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "microsoft-files": { "command": "npx", "args": [ "-y", "@mindstone/mcp-server-microsoft-files" ], "env": { "MS_CLIENT_ID": "your-value", "MS_CONFIG_DIR": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MS_CLIENT_ID, MS_CONFIG_DIR, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Microsoft 365 Files tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MS_CLIENT_ID Microsoft Entra (Azure AD) application client ID
    • MS_CONFIG_DIR Path to the per-user Microsoft config directory (credentials/, accounts.json)

    Descriptions are as written by the maker.

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "microsoft-files": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-microsoft-files"
          ],
          "env": {
            "MS_CLIENT_ID": "your-value",
            "MS_CONFIG_DIR": "your-value"
          }
        }
      }
    }
  5. Quit Claude and open it again

  6. Try it

    Use Microsoft 365 Files and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Microsoft 365 Files or shows a Microsoft 365 Files tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MS_ACCOUNT_EMAIL Account email when running in multi-account per-instance mode (falls back to the first account in accounts.json)
  • MS_MCP_PACKAGE_ID Logical package ID surfaced in error responses · default Microsoft365Files
  • MICROSOFT_REQUEST_TIMEOUT_MS Override the upstream Microsoft Graph request timeout in milliseconds (max 300000 = 5 min) · default 60000

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Microsoft 365 Files yet

Microsoft 365 Files runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Microsoft 365 Files

  • 2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • 2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time)
  • 2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time)
  • 2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time)

B · Others in Docs, sheets & office work that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Microsoft 365 Files for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user microsoft-files --env MS_CLIENT_ID=your-value --env MS_CONFIG_DIR=your-value -- npx -y @mindstone/mcp-server-microsoft-files 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MS_CLIENT_ID, MS_CONFIG_DIR, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Microsoft 365 Files tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MS_CLIENT_ID Microsoft Entra (Azure AD) application client ID
    • MS_CONFIG_DIR Path to the per-user Microsoft config directory (credentials/, accounts.json)

    Descriptions are as written by the maker.

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user microsoft-files --env MS_CLIENT_ID=your-value --env MS_CONFIG_DIR=your-value -- npx -y @mindstone/mcp-server-microsoft-files
  5. Type /mcp in Claude Code

    You should see Microsoft 365 Files listed as connected

  6. Try it

    Use Microsoft 365 Files and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Microsoft 365 Files or shows a Microsoft 365 Files tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MS_ACCOUNT_EMAIL Account email when running in multi-account per-instance mode (falls back to the first account in accounts.json)
  • MS_MCP_PACKAGE_ID Logical package ID surfaced in error responses · default Microsoft365Files
  • MICROSOFT_REQUEST_TIMEOUT_MS Override the upstream Microsoft Graph request timeout in milliseconds (max 300000 = 5 min) · default 60000

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Microsoft 365 Files for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "microsoft-files": { "command": "npx", "args": [ "-y", "@mindstone/mcp-server-microsoft-files" ], "env": { "MS_CLIENT_ID": "your-value", "MS_CONFIG_DIR": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MS_CLIENT_ID, MS_CONFIG_DIR, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Microsoft 365 Files tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MS_CLIENT_ID Microsoft Entra (Azure AD) application client ID
    • MS_CONFIG_DIR Path to the per-user Microsoft config directory (credentials/, accounts.json)

    Descriptions are as written by the maker.

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Microsoft 365 Files settings, MS_CLIENT_ID, MS_CONFIG_DIR is empty; add your key and save

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Microsoft 365 Files and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Microsoft 365 Files or shows a Microsoft 365 Files tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MS_ACCOUNT_EMAIL Account email when running in multi-account per-instance mode (falls back to the first account in accounts.json)
  • MS_MCP_PACKAGE_ID Logical package ID surfaced in error responses · default Microsoft365Files
  • MICROSOFT_REQUEST_TIMEOUT_MS Override the upstream Microsoft Graph request timeout in milliseconds (max 300000 = 5 min) · default 60000

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

2 setting(s) to fill in (MS_CLIENT_ID, MS_CONFIG_DIR) · Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Microsoft 365 Files for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "microsoft-files": { "type": "stdio", "command": "npx", "args": [ "-y", "@mindstone/mcp-server-microsoft-files" ], "env": { "MS_CLIENT_ID": "your-value", "MS_CONFIG_DIR": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MS_CLIENT_ID, MS_CONFIG_DIR, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Microsoft 365 Files tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MS_CLIENT_ID Microsoft Entra (Azure AD) application client ID
    • MS_CONFIG_DIR Path to the per-user Microsoft config directory (credentials/, accounts.json)

    Descriptions are as written by the maker.

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Microsoft 365 Files settings, MS_CLIENT_ID, MS_CONFIG_DIR is empty; add your key and save

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Microsoft 365 Files and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Microsoft 365 Files or shows a Microsoft 365 Files tool in the answer, you are connected

3 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • MS_ACCOUNT_EMAIL Account email when running in multi-account per-instance mode (falls back to the first account in accounts.json)
  • MS_MCP_PACKAGE_ID Logical package ID surfaced in error responses · default Microsoft365Files
  • MICROSOFT_REQUEST_TIMEOUT_MS Override the upstream Microsoft Graph request timeout in milliseconds (max 300000 = 5 min) · default 60000

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Microsoft 365 Files💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user microsoft-files --env MS_CLIENT_ID=your-value --env MS_CONFIG_DIR=your-value -- npx -y @mindstone/mcp-server-microsoft-files

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "microsoft-files": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-files"
      ],
      "env": {
        "MS_CLIENT_ID": "your-value",
        "MS_CONFIG_DIR": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "microsoft-files": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-files"
      ],
      "env": {
        "MS_CLIENT_ID": "your-value",
        "MS_CONFIG_DIR": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "microsoft-files": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-files"
      ],
      "env": {
        "MS_CLIENT_ID": "your-value",
        "MS_CONFIG_DIR": "your-value"
      }
    }
  }
}

Values you fill in

  • MS_CLIENT_ID required env
    Microsoft Entra (Azure AD) application client ID
  • MS_CONFIG_DIR required env
    Path to the per-user Microsoft config directory (credentials/, accounts.json)
  • MS_ACCOUNT_EMAIL env
    Account email when running in multi-account per-instance mode (falls back to the first account in accounts.json)
  • MS_MCP_PACKAGE_ID env
    Logical package ID surfaced in error responses
  • MICROSOFT_REQUEST_TIMEOUT_MS env
    Override the upstream Microsoft Graph request timeout in milliseconds (max 300000 = 5 min)

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

GitHub starsi
14 (Stars for the whole repo)
This repo holds several MCP listings; its stars count once in rankings
Downloads per weeki
63/wk
Licencei
No licence stated
Connection
Runs on your computer
Latest versioni
0.2.1
Published to registryi
Aug 10, 2026
Code last changedi
Nov 15, 2026
Maker
mindstone
Packages
npm: @mindstone/mcp-server-microsoft-files
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 15, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account mindstone, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed today

  • ! Caution

    Has a licence

    GitHub could not identify the licence type; open the file to check

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked yet

What we check → · JSON

Makers: ask for a re-check or report wrong info

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Docs, sheets & office worki

  • More stars than 0% of the other 3939 servers in this category
  • Published to the registry more recently than 21% of the other 3939 servers in this category
  • Basic checks equal to or better than 47% of the other 3939 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Microsoft 365 Files safe?

It passed 2 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed today, and the latest version (0.2.1) reached the registry 3 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: Puter MCP, XcodeBuildMCP, Anki MCP Server, Sosumi, Zapier

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Puter MCP

Puter MCP enables AI tools to interact with Puter: manage files, websites, workers, and more

by HeyPuterWidely used★ 44.2KUpdated 5 months ago

Runs in the cloud✓ service owner · puter.com

XcodeBuildMCP

XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.

by getsentryWidely used↓ 130.5K/wk shared package★ 6.6KUpdated 4 months ago

Runs on your computer✓ service owner · xcodebuildmcp.com

Anki MCP Server

MCP server for Anki flashcards: adaptive review, notes, media, and deck management via AnkiConnect.

by ankimcpGrowing↓ 1.1K/wk★ 558Updated 41 days ago

Runs on your computer✓ service owner · ankimcp.ai

Sosumi

Search and read Apple developer documentation, HIG, and WWDC transcripts as Markdown.

by NSHipsterGrowing★ 492Updated 6 days ago

Runs in the cloud✓ service owner · sosumi.ai

Zapier

Connects AI to thousands of apps through one Zapier server, such as Gmail, Google Sheets and Slack. You choose which actions the AI may use.

by zapierGrowing★ 459Updated 4 months ago

Runs in the cloud✓ service owner · zapier.com
  • Puter MCP — Runs in the cloud, nothing to install · No key needed
  • XcodeBuildMCP — Installs on your computer · No key needed
  • Anki MCP Server — Installs on your computer · No key needed
  • Sosumi — Runs in the cloud, nothing to install · No key needed
  • Zapier — Runs in the cloud, nothing to install · No key needed · In Claude’s directory

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

@mindstone/mcp-server-microsoft-files

Microsoft 365 OneDrive Files MCP server — list, search, get, download, upload, delete, move, copy, share files, manage sharing permissions and version history, review file activity, and read text and Office document contents via the Microsoft Graph API.

*Cohort-style Microsoft 365 OneDrive MCP. Reuses the OAuth surface owned by @mindstone/mcp-server-microsoft-mail, so the host signs in once and gets files plus mail plus calendar plus Teams plus SharePoint from the same credentials.*

Status

Why this exists

When we ported this in May 2026, Microsoft's own Graph MCP lineup did not yet ship a stand-alone OneDrive server, and the community options at the time treated OneDrive as its own login surface — every connector ran a separate OAuth dance and stored its own copy of the refresh token. We pulled the bundled connector out of MindstoneRebel as a 1:1 port so that the same five-connector Microsoft 365 cohort (mail, calendar, files, teams, SharePoint) shares a single set of credentials, a single shared-library package for token persistence and request timeouts, and the structured auth_required envelope the host already knows how to recover from. Files reuses @mindstone/mcp-server-microsoft-mail's authenticate_microsoft_account tool rather than declaring its own.

Example interaction

"Find the latest version of Q3-plan.docx in my OneDrive and give me a sharing link my team can read."

Tools the host calls:

  1. search_files — name:Q3-plan.docx, returns the most recent matching item.
  2. share_file — creates a read-only sharing link for that item.

Response (trimmed):

{

"match": { "id": "01H7...", "name": "Q3-plan.docx", "lastModifiedDateTime": "2026-05-18T17:42:00Z" }, "share": { "type": "view", "scope": "organization", "webUrl": "https://example-my.sharepoint.com/:w:/g/personal/.../EZk..." } }

Requirements

  • Node.js 20+
  • npm
  • A host application that performs the Microsoft OAuth flow and writes per-account token files into ${MS_CONFIG_DIR}/credentials/${sanitised-email}.token.json and an ${MS_CONFIG_DIR}/accounts.json index. This server reads those files; it does not initiate OAuth itself.

One-click install

After clicking the button, your host will prompt you to fill: MS_CLIENT_ID, MS_CONFIG_DIR, MS_MCP_PACKAGE_ID, MICROSOFT_REQUEST_TIMEOUT_MS.

Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Microsoft 365 Files)

{

"mcpServers": { "Microsoft 365 Files": { "command": "npx", "args": [ "-y", "@mindstone/mcp-server-microsoft-files" ], "env": { "MS_CLIENT_ID": "", "MS_CONFIG_DIR": "", "MS_MCP_PACKAGE_ID": "Microsoft365Files", "MICROSOFT_REQUEST_TIMEOUT_MS": "60000" } } } }

Quick Start

Install & build
cd <path-to-repo>/connectors/microsoft-files

npm install npm run build

npx (once published)
npx -y @mindstone/mcp-server-microsoft-files
Local
node dist/index.js

Configuration

This server runs alongside a host application that owns the Microsoft 365 OAuth flow. The host writes credentials to disk; this server reads them.

Required environment variables
NameDescription
MS_CLIENT_IDMicrosoft Entra (Azure AD) application client ID.
MS_CONFIG_DIRPath to the per-user Microsoft config directory (credentials/, accounts.json).
Optional environment variables
NameDescriptionDefault
MS_ACCOUNT_EMAILAccount email when running in multi-account per-instance mode.First account in accounts.json.
MS_MCP_PACKAGE_IDLogical package ID surfaced in error responses.Microsoft365Files
MICROSOFT_REQUEST_TIMEOUT_MSOverride the upstream Microsoft Graph request timeout (max 300000 ms).60000
MICROSOFT_DISABLE_REFRESHSet to 1 to disable token refresh on this surface. Tools fail closed with the structured auth_required response so the host can drive reauth. Cloud surfaces set this to 1.unset

Host configuration examples

Claude Desktop / Cursor
{

"mcpServers": { "Microsoft365Files": { "command": "npx", "args": ["-y", "@mindstone/mcp-server-microsoft-files"], "env": { "MS_CLIENT_ID": "your-entra-application-client-id", "MS_CONFIG_DIR": "/absolute/path/to/microsoft-config" } } } }

Sign in via @mindstone/mcp-server-microsoft-mail's authenticate_microsoft_account first; the files tools then reuse the credentials it writes to ${MS_CONFIG_DIR}/.

Local development (no npm publish needed)
{

"mcpServers": { "Microsoft365Files": { "command": "node", "args": [" /connectors/microsoft-files/dist/index.js"], "env": { "MS_CLIENT_ID": "your-entra-application-client-id", "MS_CONFIG_DIR": "/absolute/path/to/microsoft-config" } } } }

Tools (20)

ToolDescription
list_filesList files and folders in OneDrive (root by default).
get_fileGet metadata for a specific file or folder.
download_fileGet a short-lived download URL for a file.
search_filesSearch for files in OneDrive by name or content.
upload_fileUpload a file to OneDrive (text up to 4 MB; binary as base64 up to 10 MB via a resumable upload session).
create_folderCreate a new folder in OneDrive.
delete_fileDelete a file or folder.
move_fileMove a file or folder to a new location.
copy_fileCopy a file or folder to a new location.
get_recentList recently accessed files.
get_sharedList files shared with you by others.
share_fileCreate a sharing link for a file or folder.
read_text_fileRead the contents of a text file.
invite_to_fileShare a file or folder with specific people by email (read or write).
list_file_permissionsList the sharing permissions granted on a file or folder.
revoke_file_permissionRevoke a sharing permission by ID.
list_file_versionsList the version history of a file.
restore_file_versionRestore a previous version, replacing the current content.
list_file_activitiesList recent file activity (drive-wide or per item; OneDrive for Business / SharePoint only).
read_documentExtract the text of a Word (.docx) or PowerPoint (.pptx) file directly.

Security notes

  • No authentication tool of its own; sign-in is delegated to @mindstone/mcp-server-microsoft-mail so the cohort has a single OAuth surface.
  • Token-provider refresh failures map to the structured auth_required response so the host can drive reauth without crashing.
  • upload_file enforces empty-content validation in line with the bundled connector to reject zero-byte uploads as a misuse.
  • Binary uploads chunk to the preauthenticated upload-session URL without the Graph access token, as Graph requires. The session URL is validated before any byte is sent: HTTPS on the default port, no userinfo, Microsoft OneDrive/SharePoint hosts only, and redirects are rejected rather than followed.
  • Content authored in Microsoft 365 (file names, grantee identities, activity actors and action keys, permission roles, extracted document text, and Graph error messages) is returned inside envelopes; Graph responses on the permission/version/activity/upload/document paths are Zod-validated at the boundary. Functional identifiers (permission/version/item IDs) and webUrls stay structural so they can round-trip into follow-up tool calls.
  • Permission/version/activity lists follow @odata.nextLink pagination (bounded, with an explicit truncated flag); continuation links are only followed back to the Graph host so the access token cannot leak to another origin.
  • read_document downloads are byte-capped mid-stream (not just by advertised metadata size) and Office ZIP inflation is bounded per-entry and cumulatively, so ZIP bombs cannot expand in memory.
  • read_document follows Graph's redirect to the pre-authenticated download URL manually: each hop is revalidated against the same OneDrive/SharePoint host policy as upload sessions, hops are capped, and the access token is only sent to the Graph host — never forwarded across origins.
  • Numeric limits (top, maxSize, maxChars) must be positive integers and are rejected before any network request.
  • Per-tool Graph calls run under a composed caller + cohort timeout signal.

Licence

FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. Free for non-competing use; relicenses to MIT on the converter date in LICENSE.