OneDrive MCP Server

OneDrive MCP Server

onedrive-mcp-server-spring•bykarthik20

A Spring Boot Model Context Protocol server that lets AI agents search and navigate Microsoft OneDrive files and folders via the Microsoft Graph API.

License: MIT License•Runtime: Awaiting documentation review•Category: file systems-docs

WHAT IT DOES

  • •Searches files in OneDrive with optional folder filtering.
  • •Searches and navigates folder structures in OneDrive.
  • •Lists files and folders under a given folder path, returning names, web URLs and paths.
  • •Retrieves direct web URLs to OneDrive files and folders.

BEST FOR

  • •Agents that need to find specific files stored in a user's OneDrive.
  • •Browsing nested OneDrive folder contents such as Documents/Bills.
  • •AI assistants that need to retrieve shareable links to OneDrive items.

ABOUT ONEDRIVE-MCP-SERVER-SPRING

OneDrive MCP Server is cataloged as an MCP server attributed to karthik20. A Spring Boot Model Context Protocol server that lets AI agents search and navigate Microsoft OneDrive files and folders via the Microsoft Graph API. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for OneDrive MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server access OneDrive data?

It uses the Microsoft Graph API with an access token provided via the MICROSOFT_ONEDRIVE_ACCESS_TOKEN environment variable.

Upstream README

View this exact version on GitHub

README.md · 460857486bb7 · Fetched 2026-11-13 12:35:26 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

OneDrive MCP Server

A Model Context Protocol (MCP) server implementation that enables AI agents to search and navigate files and folders in Microsoft OneDrive. Built with Spring Boot and Spring AI.

Features

  • 🔍 Search files in OneDrive with optional folder filtering
  • 📁 Search and navigate folder structures
  • 🔗 Get direct web URLs to files and folders
  • 🤖 MCP-compatible interface for AI agent integration
  • 🔒 Secure access using Microsoft Graph API

Prerequisites

  • Java 21 or higher
  • Maven 3.6+
  • Docker (optional, for containerized deployment)
  • Microsoft OneDrive account and access token

Getting Microsoft OneDrive Access Token

You can obtain the access token in two ways:

Option 1: Using Microsoft Graph Explorer (Quick Method)

  1. Visit Microsoft Graph Explorer
  2. Sign in with your Microsoft account
  3. Go to the "Access token" tab
  4. Make sure you have the following permissions enabled:
    • Files.Read
    • Files.Read.All
  5. Copy the access token from the token field

Note: This token is temporary and will expire after a few hours. It's good for testing but not recommended for production use.

  1. Register your application in the Microsoft Azure Portal:

    • Click "New Registration"
    • Give your application a name
    • For "Supported account types" select "Accounts in any organizational directory and personal Microsoft accounts"
    • For "Redirect URI", select "Public client/native (mobile & desktop)" and enter "https://login.microsoftonline.com/common/oauth2/nativeclient"
    • Click "Register"
  2. Note down these values from your registered application:

    • Application (client) ID
    • Redirect URI
  3. Configure API Permissions:

    • Go to "API Permissions"
    • Click "Add a permission"
    • Select "Microsoft Graph"
    • Choose "Delegated permissions"
    • Add the following permissions:
      • Files.Read
      • Files.Read.All
  4. Get your access token:

    • Visit this URL in your browser (replace YOUR_CLIENT_ID):
    https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=YOUR_CLIENT_ID&scope=files.read&response_type=token&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
    
    • Sign in with your Microsoft account
    • After authentication, you'll be redirected to a URL containing your access token
    • Copy the access token value from the URL parameter access_token=

This token is valid for several hours and needs to be refreshed periodically. For production use, implement proper OAuth2 token refresh flow.

Configuration

  1. Set your OneDrive access token:

The application expects the access token to be provided via the MICROSOFT_ONEDRIVE_ACCESS_TOKEN environment variable, which is referenced in application.yaml:

onedrive:
    access-token: ${MICROSOFT_ONEDRIVE_ACCESS_TOKEN}
  1. VS Code MCP Configuration:

You can configure the MCP server in VS Code either using the local JAR file or using Docker. Create or update .vscode/mcp.json in your VS Code workspace:

Option 1: Using Local JAR

{
    "servers": {
        "onedrive-mcpserver": {
            "type": "stdio",
            "command": "java",
            "args": [
                "-jar",
                "~/onedrive-mcp-server/target/onedrive-mcp-server-0.0.1.jar"
            ],
            "env": {
                "MICROSOFT_ONEDRIVE_ACCESS_TOKEN": "<INSERT TOKEN HERE>"
            }
        }
    }
}

Option 2: Using Docker

{
    "servers": {
        "onedrive-mcpserver-docker": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "-e",
                "MICROSOFT_ONEDRIVE_ACCESS_TOKEN",
                "karthik20/onedrive-mcp-server:0.0.1"
            ],
            "env": {
                "MICROSOFT_ONEDRIVE_ACCESS_TOKEN": "<INSERT TOKEN HERE>"
            }
        }
    }
}

Replace <INSERT TOKEN HERE> with your Microsoft OneDrive access token. For the local JAR option, make sure to update the jar path to match your local setup.

Building and Running

Local Development

  1. Build the project:
mvn clean package
  1. Run the server:
java -jar target/onedrive-mcp-server-0.0.1.jar

Docker Deployment

  1. Build the Docker image:
mvn spring-boot:build-image

This will create an image named: karthik20/onedrive-mcp-server:0.0.1

  1. Run the container:
docker run -p 8080:8080 -e ONEDRIVE_ACCESS_TOKEN=your-token karthik20/onedrive-mcp-server:0.0.1

Testing with MCP Clients

GitHub Copilot

  1. Install GitHub Copilot in VS Code
  2. Configure your AI settings to use the MCP server:
{
    "mcp.server.url": "http://localhost:8080"
}

Claude Desktop

  1. Open Claude Desktop settings
  2. Add a new MCP server with URL: http://localhost:8080
  3. Use the built-in file browser to access OneDrive files

Available MCP Tools

1. Search Files

Search for files in OneDrive with optional folder filtering:

public String searchFiles(String fileName, String folder)

2. Search Folders

Navigate and search folder structures:

public String searchFolderPath(String folderName)

3. List Folder Contents

List all files and folders under a specific folder path:

public String listFolderContents(String folderPath)

Returns a JSON array of file and folder information including names, web URLs, and paths. The folder path can be nested like 'Documents/Bills'.

Testing

Run the test suite:

mvn test

Built With

  • Spring Boot 3.4.4
  • Spring AI 1.0.0-M7
  • Microsoft Graph API
  • JUnit 5 & Mockito

License

This project is licensed under the MIT License - see the LICENSE file for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for OneDrive MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/onedrive-mcp-server-spring)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related file systems-docs MCP Servers

Alternative and complementary servers in the same category

View all in file systems-docs →

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Repository stats unavailable
Files & Documentation
LoreKeeper MCP server
lorekeeper-rpg-lorekeeper-com•lore-keeper

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

Repository stats unavailable
Files & Documentation

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.

Repository stats unavailable
Files & Documentation