sharepoint-docs-mcp

ncdcdev/sharepoint-docs-mcp

3.3

If you are the rightful owner of sharepoint-docs-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that provides SharePoint document search functionality with Azure AD certificate-based authentication.

Tools
2
Resources
0
Prompts
0

SharePoint Docs MCP Server

A Model Context Protocol (MCP) server that provides SharePoint document search functionality. Supports both stdio and HTTP transports.

Authentication Methods

Two authentication methods are supported:

  • Certificate Authentication (Application Permissions)
    • Uses Azure AD certificate-based authentication
    • Supports both stdio and HTTP transports
    • Recommended for server applications and automation
  • OAuth Authentication (User Permissions)
    • Uses OAuth 2.0 Authorization Code Flow with PKCE
    • HTTP transport only (browser-based authentication required)
    • Recommended for user-delegated access scenarios

Features

SharePoint Features

  • sharepoint_docs_search
    • Document search by keywords
    • Support for both SharePoint sites and OneDrive
    • Multiple search targets (sites, OneDrive folders, or mixed)
    • File extension filtering (pdf, docx, xlsx, etc.)
    • Response format options (detailed/compact) for token efficiency
  • sharepoint_docs_download
    • File download from search results
    • Automatic method selection for SharePoint vs OneDrive files

OneDrive Support

This server supports searching both SharePoint sites and OneDrive content with flexible configuration:

  • OneDrive Integration: Search specific users' OneDrive content
  • Folder-level targeting: Search specific folders within OneDrive
  • Mixed search: Combine SharePoint sites and OneDrive in a single search
  • Flexible configuration: Simple environment variable setup

Requirements

  • Python 3.12
  • uv (package manager)

Quick Start

1. Installation

# Run directly from GitHub without cloning
uvx --from git+https://github.com/ncdcdev/sharepoint-docs-mcp sharepoint-docs-mcp --transport stdio

2. Configuration

Create a .env file with your SharePoint credentials:

# Basic configuration
SHAREPOINT_BASE_URL=https://yourcompany.sharepoint.com
SHAREPOINT_TENANT_ID=your-tenant-id-here
SHAREPOINT_CLIENT_ID=your-client-id-here
SHAREPOINT_SITE_NAME=yoursite

# For certificate authentication
SHAREPOINT_CERTIFICATE_PATH=path/to/certificate.pem
SHAREPOINT_PRIVATE_KEY_PATH=path/to/private_key.pem

# For OAuth authentication (HTTP transport only)
# SHAREPOINT_AUTH_MODE=oauth
# SHAREPOINT_OAUTH_CLIENT_SECRET=your-oauth-client-secret-here
# SHAREPOINT_OAUTH_SERVER_BASE_URL=https://your-server.com
# If not set: all URIs allowed (dev). If set: only specified patterns (production recommended)
# SHAREPOINT_OAUTH_ALLOWED_REDIRECT_URIS=https://claude.ai/*,https://*.anthropic.com/*

See for detailed configuration instructions.

3. Run the Server

# stdio mode (for Claude Desktop)
uv run sharepoint-docs-mcp --transport stdio

# HTTP mode (for network services)
uv run sharepoint-docs-mcp --transport http --host 127.0.0.1 --port 8000

Documentation

  • 📘 - Detailed Azure AD and environment configuration
  • 📗 - MCP client integration and search examples
  • 📙 - Project structure and development commands
  • 📕 - Common issues and debugging

License

MIT License - See file for details.