Microsoft 365 File Search (SharePoint & OneDrive) MCP Server

# MCP Server - Microsoft 365 File Search (SharePoint & OneDrive) ## Overview A Model Context Protocol (MCP) server implementation that provides

Local serverstdio

What is the Microsoft 365 File Search (SharePoint & OneDrive) MCP server?

MCP Server - Microsoft 365 File Search (SharePoint & OneDrive) ## Overview A Model Context Protocol (MCP) server implementation that provides advanced file search capabilities within Microsoft 365. This server enables efficient file. The microsoft 365 file search (sharepoint & onedrive) mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 2 defined tools rather than through you.

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Its toolset

Everything the assistant can do here goes through one of these:

  • Tools — The Tools tool exposed by this server
  • Caching — To improve performance and reduce redundant API calls, the server caches downloaded files locally. This is particularly useful when working with

Configuration

You will need 4 environment variables: CLIENT_ID, CLIENT_SECRET, TENANT_ID, REGION. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the microsoft 365 file search (sharepoint & onedrive) mcp server does with a few real requests.

When to reach for it

This sits in the cloud and infrastructure group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Microsoft 365 File Search (SharePoint & OneDrive)'s toolset — Tools, Caching — is a fair guide to whether it matches your workflow. It is maintained by godwin3737; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
ToolsThe Tools tool exposed by this server.
CachingTo improve performance and reduce redundant API calls, the server caches downloaded files locally. This is particularly useful when working with large documents or frequently accessed files.

How to install the Microsoft 365 File Search (SharePoint & OneDrive) MCP server

"mcpServers": {
  "M365 File Search (SharePoint/OneDrive)": {
    "command": "uv",
    "args": [
      "--directory",
      "full_path_to_parent_directory",
      "run",
      ".\\src\\mcp_m365_filesearch\\server.py"
    ],
    "env": {
      "CLIENT_ID": "MSGraph Client ID",
      "CLIENT_SECRET": "MS Graph Client Secret",
      "TENANT_ID": "TENANT ID",
      "REGION": "SEARCH REGION"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
CLIENT_IDConfiguration value read at startup.Optional
CLIENT_SECRETCredential the server authenticates with.Yes
TENANT_IDConfiguration value read at startup.Optional
REGIONConfiguration value read at startup.Optional

Example prompts to try

  • Use Microsoft 365 File Search (SharePoint & OneDrive) to Tools.
  • Use Microsoft 365 File Search (SharePoint & OneDrive) to Caching.

Frequently asked questions

This server provides direct MCP integration for AI assistants, bypassing manual searching and offering programmatic access via Microsoft Graph API.