Skip to main content
All connectors
qbash Connectors / Microsoft OneDrive

Microsoft OneDrive MCP serverand Python AI tasks

qbash hosts a Microsoft OneDrive MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse.

Developers use qbash Tasks to write cloud-hosted Python functions that pair Microsoft OneDrive with models such as Claude and GPT.

MCP server

Build a Microsoft OneDrive MCP server

Give ChatGPT, Claude and your other AI tools access to Microsoft OneDrive through one server. You pick which Microsoft OneDrive tools it shares, and you can add other connectors, memory folders and Tasks to the same server.

How to set it up

  1. Connect Microsoft OneDrive on the qbash Connectors page.
  2. Create an MCP server and add the Microsoft OneDrive tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Python AI task

Write a Microsoft OneDrive task in Python

A qbash Task is a hosted Python function that calls Microsoft OneDrive and AI models.

Review a folder for cleanup

List the Documents folder, then ask an inline prompt to flag large files and likely duplicates with their links.

main.py
report = qbash.integrations.microsoft_onedrive.list_files(
folder_path="Documents",
top=100,
)
items = report.get("value", [])
if items:
review = qbash.ai.run_prompt(
slug="onedrive-folder-review",
variables={"items": json.dumps(items)},
)
qbash.output({"review": review, "more_available": bool(report.get("next_page_token"))})
else:
qbash.output("The folder returned no items.")
Sample list_files response
{
"value": [
{
"id": "file-123",
"name": "Quarterly review.pdf",
"file": {
"mimeType": "application/pdf"
},
"size": 15000000,
"webUrl": "https://example.sharepoint.com/review.pdf"
}
]
}

What the Microsoft OneDrive connector can do

  • List files in a folder
  • Search for files by name or content
  • Upload a new file to OneDrive
  • Download a file from OneDrive
  • Delete a file from OneDrive
  • Copy a file to a new location
  • Move a file to a new location
  • Create a new folder in OneDrive
  • Get file or folder metadata
  • Create a sharing link for a file
  • Create a document from text content
  • List all worksheets in a workbook
  • Read a range of cells from a worksheet
  • Write values to a range of cells
  • Add a row to an existing table
  • List all tables in a workbook
  • Read all rows from a table
  • Read a single cell value
  • Create a new Excel workbook
See every Microsoft OneDrive method in the SDK Reference

qbash Tasks: AI applications in Python

A Task is a Python function that calls Microsoft OneDrive, your other connectors and models such as Claude, GPT, Gemini and Grok. qbash hosts and runs it.

AnthropicOpenAIGeminixAI

Run Tasks on a schedule or from your team's tools

OpenAIAnthropicGrokGmailSlackGitHub+ more
  • Deterministic where it counts Write the logic in Python and call a model only for the steps that need judgement, so the rest runs the same way every time.
  • Version controlled Every save is a revision you can compare and roll back.
  • Logged Each run records its inputs, output, errors and what started it.
  • Shared credentials Connections belong to your organization, so a Task keeps working when its author is away.

Microsoft OneDrive MCP questions

Can the OneDrive MCP server delete files?

Yes. delete_file removes a file or folder, and move_file can rename one. Disable those tools in the connector block on your qbash server if a client should only read.

Which Microsoft permissions does it request?

Sign in with Microsoft asks for file read and write permissions and basic user access. qbash renews the Microsoft token between runs, so MCP clients and Tasks keep working without a new sign-in.

Guides that use Microsoft OneDrive

Build a Microsoft OneDrive task

Write it in Python with AI steps, and qbash hosts it with versions and run logs.

Build a task

Build a Microsoft OneDrive MCP server

Pick the Microsoft OneDrive tools to share and connect ChatGPT, Claude or Grok Bot.

Build an MCP server