> ## Documentation Index
> Fetch the complete documentation index at: https://docs.typingmind.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TypingMind MCP + OneDrive

> Connect your OneDrive to TypingMind with the Microsoft 365 MCP server, so the AI can list, search, download, and upload your files.

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.

[Connect OneDrive to TypingMind with the Microsoft 365 MCP Server](https://www.youtube.com/embed/AfOR3RO1vuQ)

> [!NOTE]
>
> This guide uses [ms-365-mcp-server](https://github.com/Softeria/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

> [!WARNING]
>
> The server **cannot edit the contents of Word or PowerPoint files** directly. See [Edit Word and PowerPoint files](#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:

```bash theme={null}
npx @typingmind/mcp <your-token>
```

When the dialog shows **Server ready!** and the status becomes **Ready**, the connector is running.

![01 Connector Ready](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/01-connector-ready.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=5791ad2cdd6fe2b259f5c94e6a655641)

For more details, see [Use MCP with Private MCP Connector](https://docs.typingmind.com/model-context-protocol-\(mcp\)-in-typingmind/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](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/02-edit-servers-json.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=67d9c5f340339298f881f079fb43c828)

```json Personal account (outlook.com, hotmail, live) theme={null}
{
  "mcpServers": {
    "microsoft-365": {
      "command": "npx",
      "args": ["-y", "@softeria/ms-365-mcp-server", "--preset", "onedrive"]
    }
  }
}
```

```json Work or school account theme={null}
{
  "mcpServers": {
    "microsoft-365": {
      "command": "npx",
      "args": ["-y", "@softeria/ms-365-mcp-server", "--org-mode", "--preset", "onedrive"]
    }
  }
}
```

The **microsoft-365** server should show as running with **28 tools**.

![microsoft-365 MCP server running with 28 tools](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/03-server-running.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=179e4a9b05cfcf05aaff49c3cd5bc3ce)

> [!TIP]
>
> `--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.

> [!NOTE]
>
> 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](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/04-enable-plugin.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=cc7603c6377e8c9c33dc248e562d5c02)

**4. Sign in to Microsoft**

Start a chat, enable the **microsoft-365** plugin, and ask:

```text theme={null}
Log in to Microsoft
```

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](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/05-login-prompt.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=37362d0e290f233c03a851e48fcf6b9c)

> [accordion] Alternative: sign in from the terminal
>
> Run this once in a terminal and follow the instructions:
>
> ```bash theme={null}
> npx -y @softeria/ms-365-mcp-server --login --preset onedrive
> ```
>
> 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.

> [!NOTE]
>
> 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:

```text theme={null}
List the files in the "TypingMind Demo" folder in my OneDrive.
```

The AI calls `list-drives`, `search-onedrive-files`, and `list-folder-files`:

![microsoft-365 tool calls in the chat](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/06-tool-calls.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=dc17852d6a77cae42f14505ee11b93c3)

Then it shows the files in the folder:

![AI answer listing the files in the TypingMind Demo folder](https://mintcdn.com/typingmind/iHm5cXHIHdizpH7U/images/mcp-onedrive/07-answer.webp?fit=max\&auto=format\&n=iHm5cXHIHdizpH7U\&q=85\&s=d7528adbe4f6b076dd97068166312aea)

More 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:

| Tool | What it does |
| :- | :- |
| `list-drives` | List your OneDrive drives |
| `list-folder-files` | List files and folders in a folder |
| `search-onedrive-files` | Search files by name or content |
| `get-drive-item` | Get file or folder details |
| `download-bytes`, `get-download-url` | Download a file or get its download link |
| `upload-file-content` | Upload a file |
| `create-onedrive-folder` | Create a folder |
| `move-rename-onedrive-item` | Move or rename a file or folder |
| `copy-drive-item` | Copy a file or folder |
| `create-drive-item-share-link` | Create a share link |
| `delete-onedrive-file` | Delete a file |

> [!TIP]
>
> 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](https://docs.typingmind.com/plugins/toolbox.md) 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:
   ```text theme={null}
   Download "Report.docx" from my TypingMind Demo folder in OneDrive, add a "Next steps" section with Toolbox, and upload it back as "Report v2.docx". Use an upload session to upload the file.
   ```
3. When it's done, ask the AI to list the folder to confirm the new file is there.

> [!TIP]
>
> 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.

> [!NOTE]
>
> 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

> [accordion] The MCP Connector is not Ready
>
> * 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.

> [accordion] "No accounts found. Please login first."
>
> You're not signed in yet. Ask the AI to "log in to Microsoft" and complete [Step 4](#step-by-step-setup).

> [accordion] The login code expired
>
> Codes are valid for 15 minutes. Ask the AI to "log in to Microsoft" again to get a new code.

> [accordion] I get disconnected after about an hour (personal account)
>
> Add `"env": { "MS365_MCP_TENANT_ID": "consumers" }` to the server config, restart the server, then sign in again.

> [accordion] My work or school account says I need admin approval
>
> 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.