MCP ExplorerExplorer

Mcp Server Microsoft365 Filesearch

@godwin3737on a month ago
1 MIT
FreeCommunity
AI Systems
MCP Server for advanced file search in Microsoft 365, integrating SharePoint and OneDrive.

Overview

What is Mcp Server Microsoft365 Filesearch

mcp-server-microsoft365-filesearch is a Model Context Protocol (MCP) server implementation that provides advanced file search capabilities within Microsoft 365, enabling efficient file discovery, metadata analysis, and integration with business workflows using content from SharePoint and OneDrive.

Use cases

Use cases include searching for files across SharePoint and OneDrive, retrieving content from specific documents, and enhancing business workflows by integrating file search capabilities into applications.

How to use

To use mcp-server-microsoft365-filesearch, you can utilize its core tools: ‘search_m365_files’ to perform file searches by providing a query string, and ‘get_file_content’ to retrieve specific file content using unique identifiers for the drive and file. Integration with Claude Desktop requires updating the configuration file with the server details.

Key features

Key features include advanced file search capabilities, metadata analysis, local caching for improved performance, and integration with business workflows. The caching mechanism reduces redundant API calls and speeds up access to frequently used files.

Where to use

mcp-server-microsoft365-filesearch is suitable for organizations that utilize Microsoft 365, particularly those that rely on SharePoint and OneDrive for document management and collaboration.

Content

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 discovery, metadata analysis, and integration with business workflows by making available the content from SharePoint/OneDrive.

https://github.com/user-attachments/assets/bbe63c02-f6d9-4c9b-8f98-36fc22a081cc

Components

Tools

The server offers 2 core tools:

  • search_m365_files
    Perform a file search within the M365 environment.
    Input:

    • query (string): The search term or criteria.
      Returns: Array of file metadata objects. Metadata includes the file content summary, drive ID, and file ID, among other details.
  • get_file_content
    Retrieve content from a specific file.
    Input:

    • driveid (string): The unique identifier of the parent drive.
    • fileid (string): The unique identifier of the file.
      Returns: File content as a binary stream.
      Note: Uses a local cache to speed up repeat access.

Caching

To 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.

  • Cached files are stored in the ./src/mcp_m365_filesearch/.local/downloads directory (relative to the project root).
  • When a file is requested via get_file_content, the server first checks the cache.
  • If the file is already cached, it is returned directly from disk without a new API call.

This feature ensures faster response times and efficient use of API rate limits.

Usage with Claude Desktop

To integrate the server with Claude Desktop, update your claude_desktop_config.json:

Microsoft Graph App Registration

To use this server, you’ll need to register an application in the Azure Portal:

  1. Register a new application.
  2. Note down the Client ID and Tenant ID.
  3. Create a Client Secret under Certificates & Secrets.
  4. Under API permissions, add the following delegated or application permissions:
    • Sites.Read.All
    • Files.Read.All
  5. Click Grant admin consent for these permissions.

Ensure these values are correctly set in your env configuration for the MCP server.

License

This project is licensed under the MIT License.
You are free to use, modify, and distribute it with proper attribution.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers