Microsoft 365 MCP server for AI agents
Let Claude, ChatGPT or your own agent read and act on Microsoft 365: 10 typed functions through one MCP server. No Microsoft 365 API key needed.
- Functions
- 10
- Sign-in
- For account actions
- Works with
- MCP, HTTP, Node, Python
Connect
An MCP server for Microsoft 365 alone, with one tool per function. Paste it into Claude, ChatGPT, Cursor or any MCP client as a remote server.
https://api.bowmark.ai/mcp/site/microsoft_365One MCP server for Microsoft 365 and every other site Bowmark covers. Your agent looks up what it needs and calls it.
https://api.bowmark.ai/mcpSet it up in your clientBoth need a Bowmark API key. The quickstart gets you one and a first result in a few minutes. Functions that need a login use the person's own account: how sign-in works.
Functions
Open a function to see its arguments, what it returns and how to call it.
getDocumentRetrieves metadata for a specific document or folder in the user's Microsoft 365 OneDrive by item ID.Arguments
Name Type Required itemIdstringYes Returns
microsoft_365Documentinterface microsoft_365Document { id: string; name: string; size?: number; lastModifiedDateTime?: string; webUrl?: string; createdDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; parentReference?: { driveId?: string }; file?: { mimeType?: string }; folder?: { childCount?: number }; isFile: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/getDocumentCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.getDocument({ itemId: "01AVMG27P6PZZZZZZZZZZZZZZZZZZ" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.getDocument({"itemId": "01AVMG27P6PZZZZZZZZZZZZZZZZZZ"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/getDocument \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"itemId":"01AVMG27P6PZZZZZZZZZZZZZZZZZZ"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.getDocument({ itemId: "01AVMG27P6PZZZZZZZZZZZZZZZZZZ" });getDocumentContentRetrieves the binary content of a document from the user's Microsoft 365 OneDrive.Arguments
Name Type Required itemIdstringYes Returns
DocumentContentinterface DocumentContent { content: string; // base64-encoded binary content of the file contentType?: string; // MIME type if available }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/getDocumentContentCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.getDocumentContent({ itemId: "01AVMG27P6PZZZZZZZZZZZZZZZZZZ" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.getDocumentContent({"itemId": "01AVMG27P6PZZZZZZZZZZZZZZZZZZ"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/getDocumentContent \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"itemId":"01AVMG27P6PZZZZZZZZZZZZZZZZZZ"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.getDocumentContent({ itemId: "01AVMG27P6PZZZZZZZZZZZZZZZZZZ" });listDocumentsLists documents from the user's Microsoft 365 OneDrive, including files and folders with metadata.Arguments
Name Type Required folderIdstringNo Returns
microsoft_365Document[]interface microsoft_365Document { id: string; name: string; size?: number; lastModifiedDateTime?: string; webUrl?: string; createdDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; parentReference?: { driveId?: string }; file?: { mimeType?: string }; folder?: { childCount?: number }; isFile: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/listDocumentsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.listDocuments();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.listDocuments())curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/listDocuments \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.listDocuments();listDocumentVersionsLists the version history of a specific document in the user's Microsoft 365 OneDrive.Arguments
Name Type Required itemIdstringYes Returns
DocumentVersion[]interface DocumentVersion { id: string; versionNumber?: number; lastModifiedDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; publication?: { level?: string }; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/listDocumentVersionsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.listDocumentVersions({ itemId: "01AVMG27P6PZZZZZZZZZZZZZZZZZZ" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.listDocumentVersions({"itemId": "01AVMG27P6PZZZZZZZZZZZZZZZZZZ"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/listDocumentVersions \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"itemId":"01AVMG27P6PZZZZZZZZZZZZZZZZZZ"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.listDocumentVersions({ itemId: "01AVMG27P6PZZZZZZZZZZZZZZZZZZ" });listRecentDocumentsLists the user's recently accessed documents in Microsoft 365 OneDrive, ordered by most recently used.Arguments
None.
Returns
microsoft_365Document[]interface microsoft_365Document { id: string; name: string; size?: number; lastModifiedDateTime?: string; webUrl?: string; createdDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; parentReference?: { driveId?: string }; file?: { mimeType?: string }; folder?: { childCount?: number }; isFile: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/listRecentDocumentsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.listRecentDocuments();import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.listRecentDocuments())curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/listRecentDocuments \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.listRecentDocuments();searchDocumentsSearches for documents in the user's Microsoft 365 OneDrive by name or content.Arguments
Name Type Required querystringYes Returns
microsoft_365Document[]interface microsoft_365Document { id: string; name: string; size?: number; lastModifiedDateTime?: string; webUrl?: string; createdDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; parentReference?: { driveId?: string }; file?: { mimeType?: string }; folder?: { childCount?: number }; isFile: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/searchDocumentsCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.searchDocuments({ query: "test" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.searchDocuments({"query": "test"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/searchDocuments \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"query":"test"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.searchDocuments({ query: "test" });
createDocumentCreates a new document in the user's Microsoft 365 OneDrive with the specified name and optional type (Word, Excel, PowerPoint, or OneNote).Arguments
Name Type Required namestringYes parentFolderIdstringNo fileType"word" | "excel" | "powerpoint" | "onenote"No Returns
microsoft_365Documentinterface microsoft_365Document { id: string; name: string; size?: number; lastModifiedDateTime?: string; webUrl?: string; createdDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; parentReference?: { driveId?: string }; file?: { mimeType?: string }; folder?: { childCount?: number }; isFile: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/createDocumentCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.createDocument({ name: "<name>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.createDocument({"name": "<name>"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/createDocument \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"name":"<name>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.createDocument({ name: "<name>" });deleteDocumentDeletes a document or folder from the user's Microsoft 365 OneDrive by item ID.Arguments
Name Type Required itemIdstringYes Returns
{ id: string }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/deleteDocumentCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.deleteDocument({ itemId: "<itemId>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.deleteDocument({"itemId": "<itemId>"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/deleteDocument \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"itemId":"<itemId>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.deleteDocument({ itemId: "<itemId>" });restoreDocumentVersionRestores a document in Microsoft 365 OneDrive to a specified previous version.Arguments
Name Type Required itemIdstringYes versionIdstringYes Returns
microsoft_365Documentinterface microsoft_365Document { id: string; name: string; size?: number; lastModifiedDateTime?: string; webUrl?: string; createdDateTime?: string; lastModifiedBy?: { user?: { displayName?: string } }; parentReference?: { driveId?: string }; file?: { mimeType?: string }; folder?: { childCount?: number }; isFile: boolean; }HTTP endpoint
POST https://api.bowmark.ai/v1/sites/microsoft_365/restoreDocumentVersionCall it
import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.microsoft_365.restoreDocumentVersion({ itemId: "<itemId>", versionId: "<versionId>" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.microsoft_365.restoreDocumentVersion({"itemId": "<itemId>", "versionId": "<versionId>"}))curl -X POST https://api.bowmark.ai/v1/sites/microsoft_365/restoreDocumentVersion \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"itemId":"<itemId>","versionId":"<versionId>"}}'// The body of a run: the MCP run tool, or POST /v1/run return await bowmark.providers.microsoft_365.restoreDocumentVersion({ itemId: "<itemId>", versionId: "<versionId>" });
Use it from code
- Node
npm i @bowmark/web - Python
pip install bowmark-web - HTTP
POST /v1/sites/microsoft_365/<function> - OpenAPI
/v1/sites/microsoft_365/openapi.json