Microsoft 365 Files (SharePoint/OneDrive)

Microsoft 365 Files (SharePoint/OneDrive)

MCP server for advanced Microsoft 365 file search across SharePoint and OneDrive.

8
Stars
2
Forks
0
Releases

Overview

An MCP server implementation that provides advanced file search within Microsoft 365, enabling discovery, metadata analysis, and content access from SharePoint and OneDrive. It exposes two core tools: search_m365_files and get_file_content. The search tool accepts a query string and returns an array of file metadata including content summary, drive ID, and file ID, enabling precise discovery. The get_file_content tool retrieves file content as a binary stream for a given drive ID and file ID, and it uses a local cache to speed up repeat access. Cached files are stored in ./src/mcp_m365_filesearch/.local/downloads, and when a file is requested, the server first checks the cache and serves from disk if available to reduce API calls and latency. The server is designed to integrate with business workflows by exposing content and metadata from SharePoint/OneDrive to downstream processes. The README also provides usage guidance for Claude Desktop with a JSON config, and Microsoft Graph app registration steps: register an app, note Client ID and Tenant ID, create a Client Secret, grant Sites.Read.All and Files.Read.All permissions, and grant admin consent. MIT license.

Details

Owner
godwin3737
Language
Python
License
Updated
2025-12-07

Features

search_m365_files tool

Performs a file search within the Microsoft 365 environment and returns an array of file metadata, including content summary, drive ID, and file ID.

get_file_content tool

Retrieves the binary content of a specified file (drive ID + file ID) and supports binary stream delivery; uses the local cache to speed repeated access.

Local file caching

Caches downloaded files locally in ./src/mcp_m365_filesearch/.local/downloads to improve performance and reduce API calls.

Metadata-rich results

Returns file metadata including content summary, drive ID, and file ID to support downstream processing.

Workflow integration

Designed to integrate with business workflows by exposing file content and metadata to MCP-enabled automation.

Claude Desktop integration guide

Includes configuration guidance for Claude Desktop via claude_desktop_config.json enabling seamless use in Claude workflows.

Graph API authentication guidance

Provides steps for Microsoft Graph app registration including Client ID, Tenant ID, Client Secret and required permissions (Sites.Read.All, Files.Read.All) with admin consent.

Audience

DevelopersCreate MCP-based apps to search SharePoint/OneDrive and fetch file content.
IT ProsEnable IT teams to integrate Microsoft 365 content search into automation workflows.
System IntegratorsEmbed MCP-based search and retrieval into enterprise systems and automation pipelines.

Tags

MCPMicrosoft 365SharePointOneDriveFile searchMetadataCachingGraph APIAzure AD