Skip to content
Back to search

sharepoint-mcp

SharePoint MCP (Model Context Protocol) - A SharePoint connector for LLM applications. Access SharePoint documents and lists through Microsoft Graph API.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/demodorigatsuo--sharepoint-mcp/badge.svg)](/listings/demodorigatsuo--sharepoint-mcp)

HTML

<a href="/listings/demodorigatsuo--sharepoint-mcp"><img src="/api/listings/demodorigatsuo--sharepoint-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone and install

git clone https://github.com/DEmodoriGatsuO/sharepoint-mcp.git
cd sharepoint-mcp

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

pip install -r requirements.txt

2. Configure

cp .env.example .env
# Edit .env with your Azure AD credentials and SharePoint site URL

Required variables in `.env`:

| Variable | Description | |----------|-------------| | `TENANT_ID` | Azure AD tenant ID | | `CLIENT_ID` | Azure AD application (client) ID | | `CLIENT_SECRET` | Azure AD client secret | | `SITE_URL` | SharePoint site URL (`https://{tenant}.sharepoint.com/sites/{name}`) |

3. Verify your setup (optional)

python config_checker.py   # Validate configuration
python auth-diagnostic.py  # Test authentication

4. Start the server

# stdio — default, for Claude Desktop / MCP Inspector
python server.py

# HTTP streamable-http — for web services and Copilot agents
python server.py --transport streamable-http --port 8000

# Docker
docker-compose up

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 210 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/demodorigatsuo-sharepoint-mcp-badge.png)](https://mseep.ai/app/demodorigatsuo-sharepoint-mcp)
  2. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  3. [![Python 3.10+](https://img.shields.io/badge/Python-3.10+-blue.svg)](https://www.python.org/downloads/)
  4. [![MCP](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://docs.anthropic.com/claude/docs/model-context-protocol)
  5. [![Built with Claude Code](https://img.shields.io/badge/Built%20with-Claude%20Code-blueviolet.svg)](https://claude.ai/claude-code)
  6. # SharePoint MCP Server
  7. > **DISCLAIMER**: This project is not affiliated with, endorsed by, or related to Microsoft Corporation. SharePoint and Microsoft Graph API are trademarks of Microsoft Corporation. This is an independent, community-driven project.
  8. SharePoint MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that connects LLM applications such as Claude to your SharePoint site via the Microsoft Graph API. Use natural language to query documents, manage lists, upload files, and more — directly from your AI assistant.
  9. ---
  10. ## Features
  11. | Category | Capability |
  12. |----------|------------|
  13. | **Site** | Get site information |
  14. | **Libraries** | Browse document libraries, list folder contents |
  15. | **Documents** | Read DOCX, PDF, XLSX, CSV, TXT; browse by path; get item metadata; upload files |
  16. | **Search** | Full-text search across all site content |
  17. | **Lists** | Create lists with AI-optimized schemas; create, update list items |
  18. | **Pages** | Create modern pages and news posts |
  19. | **Provisioning** | Create new SharePoint sites and advanced document libraries |
  20. | **Transport** | stdio (local), SSE, streamable-http (web / Docker) |
  21. ---
  22. ## Prerequisites
  23. - Python 3.10 or higher
  24. - A SharePoint site with Microsoft 365
  25. - An Azure AD application registration with the required Graph API permissions (see [docs/auth_guide.md](docs/auth_guide.md))
  26. ---
  27. ## Quickstart
  28. ### 1. Clone and install
  29. ```bash
  30. git clone https://github.com/DEmodoriGatsuO/sharepoint-mcp.git
  31. cd sharepoint-mcp
  32. python -m venv venv
  33. source venv/bin/activate # Windows: venv\Scripts\activate
  34. pip install -r requirements.txt
  35. ```
  36. ### 2. Configure
  37. ```bash
  38. cp .env.example .env
  39. # Edit .env with your Azure AD credentials and SharePoint site URL
  40. ```
  41. Required variables in `.env`:
  42. | Variable | Description |
  43. |----------|-------------|
  44. | `TENANT_ID` | Azure AD tenant ID |
  45. | `CLIENT_ID` | Azure AD application (client) ID |
  46. | `CLIENT_SECRET` | Azure AD client secret |
  47. | `SITE_URL` | SharePoint site URL (`https://{tenant}.sharepoint.com/sites/{name}`) |
  48. ### 3. Verify your setup (optional)
  49. ```bash
  50. python config_checker.py # Validate configuration
  51. python auth-diagnostic.py # Test authentication
  52. ```
  53. ### 4. Start the server
  54. ```bash
  55. # stdio — default, for Claude Desktop / MCP Inspector
  56. python server.py
  57. # HTTP streamable-http — for web services and Copilot agents
  58. python server.py --transport streamable-http --port 8000
  59. # Docker
  60. docker-compose up
  61. ```
  62. ---
  63. ## Usage
  64. ### Claude Desktop
  65. Install the server into Claude Desktop:
  66. ```bash
  67. mcp install server.py --name "SharePoint Assistant"
  68. ```
  69. Or add it manually to `claude_desktop_config.json`:
  70. ```json
  71. {
  72. "mcpServers": {
  73. "sharepoint": {
  74. "command": "python",
  75. "args": ["/absolute/path/to/sharepoint-mcp/server.py"],
  76. "env": {
  77. "TENANT_ID": "...",
  78. "CLIENT_ID": "...",
  79. "CLIENT_SECRET": "...",
  80. "SITE_URL": "..."
  81. }
  82. }
  83. }
  84. }
  85. ```
  86. ### MCP Inspector (development)
  87. ```bash
  88. mcp dev server.py
  89. ```
  90. ### HTTP Server
  91. ```bash
  92. # streamable-http (recommended for Copilot agents and web clients)
  93. python server.py --transport streamable-http --host 0.0.0.0 --port 8000
  94. # SSE
  95. python server.py --transport sse --host 0.0.0.0 --port 8000
  96. # Via environment variables
  97. MCP_TRANSPORT=streamable-http MCP_PORT=8000 python server.py
  98. ```
  99. ### Docker
  100. ```bash
  101. # Build and start (defaults to streamable-http on port 8000)
  102. docker-compose up
  103. # Or run manually
  104. docker build -t sharepoint-mcp .
  105. docker run --env-file .env -p 8000:8000 sharepoint-mcp
  106. ```
  107. ---
  108. ## Available Tools
  109. The following MCP tools are exposed to the LLM:
  110. | Tool | Description |
  111. |------|-------------|
  112. | `get_site_info` | Get name, description, URL, and metadata of the SharePoint site |
  113. | `list_document_libraries` | List all document libraries (drives) in the site |
  114. | `list_folder_contents` | Browse files and folders within a document library by path |
  115. | `get_document_content` | Read and parse DOCX, PDF, XLSX, CSV, or TXT files |
  116. | `get_document_by_path` | Retrieve document content by file path |
  117. | `get_item_metadata` | Get metadata for a file or folder |
  118. | `search_sharepoint` | Full-text search across all content in the site |
  119. | `upload_document` | Upload a file to a document library |
  120. | `create_list_item` | Create a new item in a SharePoint list |
  121. | `update_list_item` | Update an existing item in a SharePoint list |
  122. | `create_intelligent_list` | Provision a list with an AI-optimized schema |
  123. | `create_advanced_document_library` | Create a document library with rich metadata |
  124. | `create_modern_page` | Publish a modern SharePoint page |
  125. | `create_news_post` | Publish a news article to the site |
  126. | `create_sharepoint_site` | Provision a new SharePoint team site |
  127. For detailed usage examples and example prompts, see [docs/usage.md](docs/usage.md).
  128. ---
  129. ## Monitoring and Troubleshooting
  130. ### Logs
  131. The server writes logs to stdout. Set `DEBUG=True` in `.env` to enable verbose logging.
  132. ### Common Issues
  133. | Symptom | Resolution |
  134. |---------|------------|
  135. | Authentication failure | Run `python auth-diagnostic.py` to diagnose |
  136. | Permission errors | Verify your Azure AD app has the required Graph API permissions |
  137. | Token issues | Run `python token-decoder.py` to inspect token claims |
  138. ---
  139. ## Contributing
  140. Contributions are welcome. Please open an issue first to discuss significant changes. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  141. All contributions must pass the quality checks before merge:
  142. ```bash
  143. black . # Formatting
  144. ruff check . # Linting
  145. pytest # Tests
  146. ```
  147. ---
  148. ## License
  149. Released under the MIT License. See [LICENSE](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.