The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the SharePoint MCP Server listing page.
A production-grade Model Context Protocol (MCP) server for Microsoft SharePoint.
Connect Claude Desktop, VS Code Copilot, Cursor, Continue, or any MCP-compatible AI agent
to your SharePoint — read files, manage folders, and reason over your organisation's knowledge.
📚 Docs · 🗺️ Roadmap · 🐛 Bugs · 💡 Features
Most AI agents only know what's in their training data.
sharepoint-mcp gives your agent live access to your organisation's real knowledge.
| Without sharepoint-mcp | With sharepoint-mcp |
|---|---|
| 🤷 Agent guesses or hallucinates | Agent reads the actual document |
| 📋 You copy-paste content manually | Agent fetches files automatically |
| 🔒 Knowledge locked in SharePoint | Knowledge flows into your AI workflow |
| 🐌 Static, one-shot answers | Agent reasons, rewrites, and saves back |
| 📄 Format | 🤖 What the Agent Gets |
|---|---|
| Full text from every page | |
Word .docx .doc | Complete document content |
Excel .xlsx .xls | All sheets as structured text |
| Text, JSON, Markdown, HTML, YAML, Python | Raw content as-is |
| Images, ZIP, binaries | File type + Base64 |
| Feature | Description | |
|---|---|---|
| 🔀 | Dual API Support | Choose Office365 REST or Microsoft Graph API |
| 📁 | Folder Management | List, create, delete, get full recursive tree |
| 📄 | Document Management | Upload, download, update, delete, search, read content |
| 🏷️ | Metadata Management | Read and update SharePoint list-item fields |
| 🔍 | Smart Parsing | Auto-detects PDF / Word / Excel / text |
| 🔎 | KQL Search | Native SharePoint KQL search for semantic file finding |
| 📂 | Flexible Library Scope | Scope to a subfolder or access the entire library root |
| 🔁 | Auto-Retry | Exponential backoff on SharePoint 429/503 throttling |
| 🚀 | Dual Transport | stdio for desktop · http for Docker/remote |
| 🪵 | Structured Logging | JSON in production · coloured console in dev |
| 🐳 | Docker-Ready | Single command: docker compose up -d |
| 🛡️ | Non-Root Container | Runs as unprivileged user inside Docker |
| 🩺 | Health Check | Live /health endpoint with real SharePoint check |
| 🤖 | CI/CD | Tested on Python 3.10 · 3.11 · 3.12 · 3.13 |
Or from source:
🔑 New to Azure AD? Follow the step-by-step guide →
🔀 Choose Your API: SharePoint MCP supports both Office365 REST API (default) and Microsoft Graph API. See API Configuration Guide →
By default, the server accesses your entire document library root. To restrict operations to a specific subfolder:
The fastest way to deploy for remote or cloud use.
Use this for production deployments with the latest stable release:
What happens: Pulls ravikant1918/sharepoint-mcp:latest from DockerHub with automatic architecture detection (Intel/ARM).
Lock to a specific version for stability or testing:
What happens: Pulls ravikant1918/sharepoint-mcp:v1.0.1 instead of latest.
Use this for development or when you've made local code changes:
What happens: Builds image from local Dockerfile, tags as ravikant1918/sharepoint-mcp:latest, and starts container.
If you've forked the repo and published to your own DockerHub:
What happens: Pulls from your custom registry/repository.
Using Podman? Just replace
dockerwithpodman— fully compatible.
| Variable | Default | Description |
|---|---|---|
TRANSPORT | http | stdio or http |
HTTP_HOST | 0.0.0.0 | Bind address |
HTTP_PORT | 8000 | Port |
LOG_FORMAT | json | json or console |
| Mode | Best For | Set With |
|---|---|---|
stdio | Claude Desktop, Cursor, MCP Inspector | TRANSPORT=stdio (default) |
http | Docker, remote agents, VS Code Copilot, REST clients | TRANSPORT=http |
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
💡 Omit
SHP_DOC_LIBRARYto access the full library root. If your org uses Office365 REST API and renamed the default library, also setSHP_LIBRARY_NAME.
TRANSPORT=http sharepoint-mcp.vscode/mcp.json in your workspace:⚠️ Trailing slash matters — the URL must end with
/mcp/(not/mcp).
Add to your MCP config (uses stdio transport):
| Tool | What It Does |
|---|---|
List_SharePoint_Folders | 📋 List all sub-folders in a directory |
Get_SharePoint_Tree | 🌳 Get full recursive folder + file tree |
Create_Folder | ➕ Create a new folder |
Delete_Folder | 🗑️ Delete an empty folder |
| Tool | What It Does |
|---|---|
List_SharePoint_Documents | 📋 List all files with metadata |
Search_SharePoint | 🔎 Search documents using KQL queries |
Get_Document_Content | 📖 Read & parse file content (PDF/Word/Excel/text) |
Upload_Document | ⬆️ Upload file as string or Base64 |
Upload_Document_From_Path | 📂 Upload a local file directly |
Update_Document | ✏️ Overwrite existing file content |
Delete_Document | 🗑️ Permanently delete a file |
Download_Document | ⬇️ Download file to local filesystem |
| Tool | What It Does |
|---|---|
Get_File_Metadata | 🔍 Get all SharePoint list-item fields |
Update_File_Metadata | ✏️ Update metadata fields |
| Variable | Required | Default | Description |
|---|---|---|---|
SHP_ID_APP | ✅ | Azure AD app client ID | |
SHP_ID_APP_SECRET | ✅ | Azure AD client secret | |
SHP_TENANT_ID | ✅ | Microsoft tenant ID | |
SHP_SITE_URL | ✅ | SharePoint site URL | |
SHP_API_TYPE | office365 | office365, graph, or graphql | |
SHP_LIBRARY_NAME | Shared Documents | Library name (Office365 REST only; Graph auto-detects) | |
SHP_DOC_LIBRARY | (empty = full library) | Subfolder scope (e.g. mcp_server). Empty = entire library | |
SHP_MAX_DEPTH | 15 | Max tree depth | |
SHP_MAX_FOLDERS_PER_LEVEL | 100 | Folders per batch | |
SHP_LEVEL_DELAY | 0.5 | Delay (s) between tree levels | |
TRANSPORT | stdio | stdio or http | |
HTTP_HOST | 0.0.0.0 | HTTP bind host | |
HTTP_PORT | 8000 | HTTP port | |
LOG_LEVEL | INFO | DEBUG INFO WARNING ERROR | |
LOG_FORMAT | console | console or json |
| Limitation | Details |
|---|---|
| Single site | Connects to one SharePoint site per server instance (multi-site planned for v2.0) |
| Sync client | Uses synchronous SharePoint REST API calls (async client planned for v1.3) |
| No sharing | Cannot create sharing links yet (planned for v1.1) |
| Large files | Very large files may hit memory limits during content extraction |
| Rate limits | SharePoint throttling (429/503) is handled with auto-retry, but sustained bulk operations may be slow |
Problem: Missing or invalid SharePoint credentials
Solution: Verify all 4 required environment variables are set:
Problem: Agent can't connect to the MCP server
Solution:
curl http://localhost:8000/mcp//mcp/ (trailing slash required)Problem: podman ps / docker ps shows (unhealthy)
Solution: Check container logs for errors:
Enable verbose output by setting LOG_LEVEL=DEBUG:
For Docker, add to your .env file or docker-compose.yml:
Problem: Access denied from SharePoint
Solution:
SHP_SITE_URL points to a site your app has access to| 📄 Doc | 📝 Description |
|---|---|
| ⚡ Getting Started | Full setup guide |
| ⚙️ Configuration | All environment variables |
| 🛠️ Tools Reference | Detailed tool parameters |
| 🏛️ Architecture | Design and layer diagram |
| 🔑 Azure Setup | Azure AD app registration guide |
| 🗺️ Roadmap | Planned features |
| 📅 Changelog | Version history |
Contributions are welcome! Please read docs/contributing.md and our Code of Conduct.
git checkout -b feat/my-toolmake testFound a vulnerability? Please do not open a public issue.
Report privately via GitHub Security Advisories or see SECURITY.md.
MIT License © 2026 Ravi Kant
⭐ If this project helps you, please star it on GitHub!