sharepoint-mcp
SharePoint MCP Server
FastMCP server exposing SharePoint file operations to Microsoft Copilot Studio. Publishes files and returns organisation-scoped hyperlinks; file bytes are never returned to the agent.
Tools
Tool | Purpose |
| Upload a base64 file, get a shareable link |
| List files in the agent folder |
| Get a shareable link for an existing file |
| Move a file to the recycle bin |
Related MCP server: SharePoint MCP Server
Setup
Register an Entra app — see the "Entra app registration" section of mode you need no admin involvement.
Fill in
.env(see below). If you only have the tenant/client IDs and don't know the site, leaveSP_HOSTNAME/SP_SITE_PATHblank for now..venv/bin/python scripts/list_sites.py— signs you in and printsSP_HOSTNAMEplus anSP_SITE_PATHfor every site you can reach; paste the pair for your site into.env..venv/bin/python scripts/find_drive_id.py— printsSP_DRIVE_ID; paste it into.env.Create the
AgentFilesfolder in the document library..venv/bin/python scripts/smoke.py— live round trip..venv/bin/python My_Sharepoint_Test.py, thenngrok http 8000.In Copilot Studio: Tools → Add a tool → New tool → Model Context Protocol, URL
https://<ngrok>.ngrok-free.app/mcp, authentication None.
Configuration
Variable | Notes |
|
|
| Directory (tenant) ID |
| Application (client) ID |
|
|
| Document library drive ID |
| e.g. |
| e.g. |
| Folder all operations are confined to. Default |
| Default 8000 |
Switching to app-only auth
When IT provides a client secret, admin consent for Sites.Selected, and a
per-site write grant (POST /sites/{site-id}/permissions — admin consent
alone grants nothing): set SP_CLIENT_SECRET and SP_AUTH_MODE=app, then
restart. No code changes.
Design notes
Links, not bytes.
createLinkwithscope: "organization"is used everywhere. A driveItem's rawwebUrlonly opens for people who already have permission to it, so it is never returned.Containment. Every path is confined to
SP_ROOT_FOLDER. Traversal and absolute paths are rejected before any network call.Uploads default to
conflictBehavior=rename. Graph's own default is silent overwrite.Azure ACS is dead (retired 2 April 2026). Tutorials using
ClientCredential(client_id, client_secret)withOffice365-REST-Python-Clientno longer work. This server uses Entra ID against Microsoft Graph, which is unaffected.
Testing
.venv/bin/pytest # 78 offline tests, no SharePoint needed
.venv/bin/python scripts/smoke.py # live round tripThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables interaction with Microsoft SharePoint sites, document libraries, and files through the Microsoft Graph API. Supports browsing, searching, uploading/downloading files, managing lists, and creating sharing links with secure OAuth authentication.2MIT
- Alicense-qualityDmaintenanceEnables browsing and interacting with Microsoft SharePoint sites and documents through Microsoft Graph API, supporting file search, site listing, document library browsing, and file content retrieval with OAuth2 authentication.289MIT
- FlicenseAqualityDmaintenanceEnables AI agents to manage SharePoint Online resources including lists, libraries, columns, views, and files through the SharePoint REST API. It supports comprehensive data operations, schema management, and file transfers using secure MSAL authentication.21
- AlicenseBqualityDmaintenanceEnables AI assistants to manage Microsoft SharePoint documents and folders through natural language, supporting operations like listing, reading, uploading, updating, deleting, and creating Office files.13MIT
Related MCP Connectors
File uploads for AI agents. Upload, list, and manage files. No signup required.
Publish Markdown or HTML to a shareable link from your AI assistant. OAuth, no API keys.
*Updated June 17th 2025** Manage your Microsoft 365 services effortlessly. Create and manage distr…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/falconttu/sharepoint-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server