SharePoint MCP Server
A Model Context Protocol (MCP) server that provides Claude with access to Microsoft SharePoint via the Microsoft Graph API.
Features
Folder Management: List, create, delete folders and view folder tree structure
Document Operations: Upload, download, read, update, and delete documents
Metadata Support: Get and update file metadata fields
OAuth 2.0 Authentication: Secure user-based authentication via browser flow
Consistent Architecture: Same modular pattern as Outlook MCP for easy maintenance
Quick Start
1. Install Dependencies
2. Azure AD Setup
Go to Azure Portal > App registrations > New registration
Name:
sharepoint-mcp(or your preferred name)Supported account types: "Accounts in this organizational directory only"
Redirect URI:
Web>http://localhost:3334/auth/callbackClick Register
After registration:
Copy the Application (client) ID
Copy the Directory (tenant) ID
Go to Certificates & secrets > New client secret
Copy the Value (not the Secret ID!)
Go to API permissions > Add a permission > Microsoft Graph > Delegated permissions
Add:
Sites.ReadWrite.All,Files.ReadWrite.All
Click Grant admin consent (requires admin)
3. Configure Environment
Create a .env file:
4. Authenticate
5. Run the Server
Claude Desktop Integration
Add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Available Tools
Authentication
Tool | Description |
| Start the OAuth authentication flow |
| Check current authentication status |
| Clear stored tokens |
Folder Operations
Tool | Description |
| List folders in a directory |
| Create a new folder |
| Delete an empty folder |
| Get recursive folder structure |
Document Operations
Tool | Description |
| List documents in a folder |
| Read document content |
| Upload content as a new document |
| Upload a local file |
| Update an existing document |
| Delete a document |
| Download to local filesystem |
| Get file metadata fields |
| Update metadata fields |
Development
Architecture
Troubleshooting
"Authentication required" error
Ensure you've run the auth server and completed browser authentication
Check that tokens are stored in
~/.sharepoint-mcp-tokens.json
"AADSTS7000215" error
You're using the Secret ID instead of the Secret Value
Go back to Azure and copy the actual secret value
"Access denied" error
Ensure admin consent was granted for the API permissions
Verify the site URL is correct
Port 3334 in use
License
MIT