Skip to main content
Connect TypingMind to your OneDrive with the Microsoft 365 MCP server. Once connected, you can ask the AI to find, read, organize, and upload files in your OneDrive, right from your chat.
This guide uses ms-365-mcp-server (npm: @softeria/ms-365-mcp-server), a community project by Softeria. It is not made by TypingMind or Microsoft. This guide was tested with version 0.178.0.

What you can do

With the OneDrive tools enabled, the AI can:
  • List your drives, and list or search files and folders
  • Get file details and download files
  • Upload files and create folders
  • Move, rename, copy, and delete files
  • Create share links
The server cannot edit the contents of Word or PowerPoint files directly. See Edit Word and PowerPoint files for a workaround.

Requirements

  • Node.js 20 or later installed on your computer. The MCP Connector needs Node.js 18+, and Softeria recommends Node.js 20+ for this server.
  • A Microsoft account (personal, or work/school).
  • The TypingMind MCP Connector running on the same computer you use TypingMind on.
  • An AI model that supports plugins/tool calling.

Step-by-step setup

1

Set up the MCP Connector

In TypingMind, go to Settings → Model Context Protocol → Setup MCP Connector and choose This Device.Copy the command shown on the screen, run it in a terminal (Terminal on macOS, Windows Terminal on Windows), and keep the terminal open:
When the dialog shows Server ready! and the status becomes Ready, the connector is running.01 Connector ReadyFor more details, see Use MCP with Private MCP Connector.
2

Add the Microsoft 365 server

Click Edit Servers, paste the config for your account type, then save.Edit Servers JSON editor with the microsoft-365 server config
The microsoft-365 server should show as running with 28 tools.microsoft-365 MCP server running with 28 tools
--preset onedrive loads only the 28 OneDrive tools. Without it, the server loads 200+ tools (mail, calendar, Teams, and more), which uses a lot of tokens in every request.
For personal accounts, the Softeria README recommends adding "env": { "MS365_MCP_TENANT_ID": "consumers" } to the server config. With the default tenant, your session can expire after about an hour.
3

Enable the microsoft-365 plugin

Start a new chat, open the Plugin Selector (next to the Model Selector), and turn on microsoft-365.Plugin Selector with the microsoft-365 MCP plugin enabled
4

Sign in to Microsoft

Start a chat, enable the microsoft-365 plugin, and ask:
The AI replies with a link (https://www.microsoft.com/link or https://login.microsoft.com/device) and a code.
  1. Open the link within 15 minutes and enter the code.
  2. Sign in with your Microsoft account.
  3. Accept the permission request for the Softeria app (Files.ReadWrite). AI reply with the Microsoft sign-in link and device code
Run this once in a terminal and follow the instructions:
For a personal account, if you added the consumers setting from the note above, also set MS365_MCP_TENANT_ID=consumers in the terminal first.
If you ask the AI to “verify login”, it may show a 403 error for Graph profile access. This is expected with the onedrive preset. The file tools still work.
5

Test it

Make sure the microsoft-365 plugin is enabled in the chat’s Plugin Selector (next to the Model Selector), and choose a model that supports tool calling.Try:
The AI calls list-drives, search-onedrive-files, and list-folder-files:microsoft-365 tool calls in the chatThen it shows the files in the folder:AI answer listing the files in the TypingMind Demo folderMore prompts to try:
  • “Search my OneDrive for files with ‘invoice’ in the name.”
  • “Create a folder called Reports in my OneDrive.”
  • “Give me a share link for Budget.xlsx.”

Available tools

Some of the tools included in the onedrive preset:
If you don’t need to delete files, turn off delete-onedrive-file in the plugin’s Tools tab so the AI can’t remove anything by mistake.

Edit Word and PowerPoint files

The server can’t change what’s inside a .docx or .pptx file. You can combine it with the built-in Toolbox plugin instead. Toolbox runs code that can create and edit Office files, and the AI moves the files between Toolbox and your OneDrive for you.
  1. Enable both the microsoft-365 and Toolbox plugins in the same chat.
  2. Ask the AI to do the whole job in one message. For example:
  3. When it’s done, ask the AI to list the folder to confirm the new file is there.
Ask the AI to use an upload session when it uploads a file it made with Toolbox. Otherwise it may try to paste the whole file into a single upload call, which can corrupt the file, especially for larger files like presentations.
The AI may take a few minutes on these requests because it checks the file before and after uploading.

Security notes

  • Your Microsoft sign-in tokens are stored locally on your computer:
    • macOS / Linux: ~/.config/ms-365-mcp-server
    • Windows: %APPDATA%\ms-365-mcp-server
  • Work or school accounts may need admin approval before the Softeria app can access your files. Contact your IT admin if sign-in is blocked.
  • Your AI model provider receives the file names and content that the AI reads, the same as any chat.

Troubleshooting

  • Make sure the terminal running npx @typingmind/mcp <your-token> is still open.
  • Check your Node.js version with node -v. Use Node.js 20 or later.
  • Run the connector on the same computer you use TypingMind on.
You’re not signed in yet. Ask the AI to “log in to Microsoft” and complete Step 4.
Codes are valid for 15 minutes. Ask the AI to “log in to Microsoft” again to get a new code.
Add "env": { "MS365_MCP_TENANT_ID": "consumers" } to the server config, restart the server, then sign in again.
Some organizations block users from granting app permissions. Ask your Microsoft 365 admin to approve the app, then sign in again. You don’t need to create any Microsoft API key or app registration yourself.