Skip to main content
MCP server CX Codex

Microsoft 365 Files — Claude Code MCP server

This MCP server connects OneDrive to AI coding hosts through Microsoft Graph for file search, reading, transfers, and sharing links.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> --transport stdio microsoft-files -- npx -y @mindstone/mcp-server-microsoft-files
Open on GitHub

What Microsoft 365 Files does

Microsoft 365 Files exposes Microsoft 365 OneDrive files through Microsoft Graph. An agent can list and search items, fetch file data, read text and Office documents, upload or download files, and delete, move, or copy them. It also covers share links, permissions, version history, and file activity. The server provides 20 tools.

Run it with npx on Node.js 20+ and npm. You must provide MS_CLIENT_ID and MS_CONFIG_DIR. The host handles Microsoft OAuth and writes the account token files, since this server does not start the OAuth flow itself. MS_ACCOUNT_EMAIL selects an account in a multi-account setup, while the same credentials can be shared with the Microsoft mail connector.

What it helps with

  • search OneDrive by filename
  • read text from an Office document
  • upload a file to OneDrive
  • create a read-only sharing link
  • inspect file versions and activity

Example prompts for the agent

  • Find the latest Q3-plan.docx in my OneDrive and create a read-only link for my team.
  • Read the text from project-notes.docx in OneDrive and summarize it.
  • Upload the prepared file to OneDrive and return its sharing link.

How to install Microsoft 365 Files

Platform CLI

claude mcp add --env MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> --transport stdio microsoft-files -- npx -y @mindstone/mcp-server-microsoft-files

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Microsoft 365 Files

How do I install Microsoft 365 Files in Claude Code?

Run `claude mcp add mcp-server-microsoft-files -e MS_CLIENT_ID=<MS_CLIENT_ID> -e MS_CONFIG_DIR=<MS_CONFIG_DIR> -- npx -y @mindstone/mcp-server-microsoft-files`. Fill in the Microsoft OAuth client ID and configuration directory values.

What does Microsoft 365 Files do?

It gives an agent Microsoft Graph access to OneDrive files. The server supports search, reading, upload, download, file moves and copies, plus sharing, permissions, versions, and activity.

Does the server perform Microsoft OAuth itself?

No. The host completes the OAuth flow and writes token files under MS_CONFIG_DIR; Microsoft 365 Files reads them. The credentials can be shared with mcp-server-microsoft-mail.

Similar MCP servers

All MCP servers for Cloud: AWS, Azure, GCP →

From the same set24

OpenAI Image An MCP server that hands your agent two tools: turn a text prompt into an image, or edit one you already have, through Anthropic. CX Codex +1 ★ 13repo stars Nano Banana An MCP server that hands your agent image generation and editing through Google Gemini. Useful when a picture has to come out of the coding session itself. CX Codex +1 ★ 13repo stars Microsoft 365 Teams This MCP server lets an agent work with Teams chats, channel messages, and presence through Microsoft Graph. Use it to search conversations or send replies from your coding host. CX Codex +1 ★ 13repo stars Microsoft 365 SharePoint An MCP server that gives your agent SharePoint through Microsoft Graph: find sites, read libraries and lists, search content, and create sharing links. CX Codex +1 ★ 13repo stars Microsoft 365 Calendar Brings the Outlook calendar from Microsoft 365 into your coding agent: read events, create and edit meetings, find free slots. Handy when you plan the day from the chat window. CX Codex +1 ★ 13repo stars Humaans Connects Humaans to an MCP host so an agent can work with people, roles, time away, offices, and company records. It requires an API key. CX Codex +1 ★ 13repo stars HubSpot A local MCP server that exposes HubSpot CRM to your coding agent: contacts, deals, tickets, tasks and files. Handy when you juggle more than one HubSpot account. CX Codex +1 ★ 13repo stars Gamma Turns a prompt into a Gamma deck, document or webpage and hands back a link or a PPTX/PDF file inside your host. CX Codex +1 ★ 13repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor