Microsoft 365 File Search MCP Server (SharePoint & OneDrive)

Microsoft 365 File Search MCP Server (SharePoint & OneDrive)

By godwin3737 GitHub

-

mcp-server microsoft365
Overview

What is Microsoft 365 File Search MCP Server?

Microsoft 365 File Search MCP Server is a Model Context Protocol (MCP) server that provides advanced file search capabilities within Microsoft 365, specifically for SharePoint and OneDrive. It enables efficient file discovery and metadata analysis, integrating seamlessly with business workflows.

How to use Microsoft 365 File Search MCP Server?

To use the server, integrate it with Claude Desktop by updating the claude_desktop_config.json file with the necessary command and environment variables. You can perform file searches using the search_m365_files tool and retrieve file content using the get_file_content tool.

Key features of Microsoft 365 File Search MCP Server?

  • Advanced file search capabilities within Microsoft 365.
  • Metadata analysis for better file discovery.
  • Local caching of files to improve performance and reduce API calls.

Use cases of Microsoft 365 File Search MCP Server?

  1. Quickly finding documents in SharePoint or OneDrive.
  2. Analyzing file metadata for business insights.
  3. Integrating file search capabilities into business workflows.

FAQ from Microsoft 365 File Search MCP Server?

  • What is the purpose of the caching feature?

The caching feature improves performance by storing frequently accessed files locally, reducing the need for repeated API calls.

  • How do I perform a file search?

Use the search_m365_files tool with your search query to retrieve file metadata.

  • Can I retrieve the content of a specific file?

Yes, use the get_file_content tool with the appropriate drive ID and file ID to access the file content.

Content

Microsoft 365 File Search MCP Server (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.

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:

"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"
    }
  }
}
No tools information available.

-

mcp-server v2ex
View Details

my-mcp-server(without auth)

mcp-server cloudflare
View Details
mcp-server
mcp-server by iyerrama29

MCP demo

mcp-server demo
View Details
Next MCP server
Next MCP server by Collaborne

-

mcp-server NEXT
View Details
MCP-Server
MCP-Server by fmpoliveira

-

mcp-server meteostat
View Details

Mirror of

mcp-server timelock-encryption
View Details

-

mcp-server minio
View Details