sharepoint-mcp
SharePoint MCP Server
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.
SharePoint MCP Server is a Model Context Protocol (MCP) 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.
Features
Category | Capability |
Site | Get site information |
Libraries | Browse document libraries, list folder contents |
Documents | Read DOCX, PDF, XLSX, CSV, TXT; browse by path; get item metadata; upload files |
Search | Full-text search across all site content |
Lists | Create lists with AI-optimized schemas; create, update list items |
Pages | Create modern pages and news posts |
Provisioning | Create new SharePoint sites and advanced document libraries |
Transport | stdio (local), SSE, streamable-http (web / Docker) |
Prerequisites
Python 3.10 or higher
A SharePoint site with Microsoft 365
An Azure AD application registration with the required Graph API permissions (see docs/auth_guide.md)
Quickstart
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.txt2. Configure
cp .env.example .env
# Edit .env with your Azure AD credentials and SharePoint site URLRequired variables in .env:
Variable | Description |
| Azure AD tenant ID |
| Azure AD application (client) ID |
| Azure AD client secret |
| SharePoint site URL ( |
3. Verify your setup (optional)
python config_checker.py # Validate configuration
python auth-diagnostic.py # Test authentication4. 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 upUsage
Claude Desktop
Install the server into Claude Desktop:
mcp install server.py --name "SharePoint Assistant"Or add it manually to claude_desktop_config.json:
{
"mcpServers": {
"sharepoint": {
"command": "python",
"args": ["/absolute/path/to/sharepoint-mcp/server.py"],
"env": {
"TENANT_ID": "...",
"CLIENT_ID": "...",
"CLIENT_SECRET": "...",
"SITE_URL": "..."
}
}
}
}MCP Inspector (development)
mcp dev server.pyHTTP Server
# streamable-http (recommended for Copilot agents and web clients)
python server.py --transport streamable-http --host 0.0.0.0 --port 8000
# SSE
python server.py --transport sse --host 0.0.0.0 --port 8000
# Via environment variables
MCP_TRANSPORT=streamable-http MCP_PORT=8000 python server.pyDocker
# Build and start (defaults to streamable-http on port 8000)
docker-compose up
# Or run manually
docker build -t sharepoint-mcp .
docker run --env-file .env -p 8000:8000 sharepoint-mcpAvailable Tools
The following MCP tools are exposed to the LLM:
Tool | Description |
| Get name, description, URL, and metadata of the SharePoint site |
| List all document libraries (drives) in the site |
| Browse files and folders within a document library by path |
| Read and parse DOCX, PDF, XLSX, CSV, or TXT files |
| Retrieve document content by file path |
| Get metadata for a file or folder |
| Full-text search across all content in the site |
| Upload a file to a document library |
| Create a new item in a SharePoint list |
| Update an existing item in a SharePoint list |
| Provision a list with an AI-optimized schema |
| Create a document library with rich metadata |
| Publish a modern SharePoint page |
| Publish a news article to the site |
| Provision a new SharePoint team site |
For detailed usage examples and example prompts, see docs/usage.md.
Monitoring and Troubleshooting
Logs
The server writes logs to stdout. Set DEBUG=True in .env to enable verbose logging.
Common Issues
Symptom | Resolution |
Authentication failure | Run |
Permission errors | Verify your Azure AD app has the required Graph API permissions |
Token issues | Run |
Contributing
Contributions are welcome. Please open an issue first to discuss significant changes. See CONTRIBUTING.md for guidelines.
All contributions must pass the quality checks before merge:
black . # Formatting
ruff check . # Linting
pytest # TestsLicense
Released under the MIT License. See LICENSE for details.
This 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.
Latest Blog Posts
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/DEmodoriGatsuO/sharepoint-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server