How I Automated My Entire SharePoint Tenant with 150 MCP Tools and Claude Desktop


Skip to main content

What This Actually Is

I built a 150-tool MCP server that turns Claude Desktop into a full-stack SharePoint administrator, Power Apps developer, and Dataverse operator. It is two Python files — server.py registers 150 MCP tools, and sharepoint_client.py provides 147 methods that call Microsoft Graph, SharePoint REST, Dataverse Web API, and the Power Platform CLI.

Claude picks the right tool based on your natural language. You never see the API calls, you never open the SharePoint admin center, you never type a PowerShell command. You just describe what you want.

Example workflow: You say "Create a BurgerKing list on UberHub with 36 menu items, build a Code App with SharePoint data source, deploy to Power Apps." Claude chains five tools: create_list → add_list_column → bulk_import_to_list → scaffold_and_deploy_code_app → deploy_to_powerapps_atomic. A live app appears in under two minutes.

Architecture Components
ComponentTechnologyPurpose
server.pyPython + FastMCP150 MCP tool registrations — the JSON-RPC gateway
sharepoint_client.pyPython + MSAL + requests147 methods that call Microsoft APIs
AuthenticationAzure AD App RegistrationClient credentials flow and device code flow
APIs consumedGraph, SP REST, Dataverse, pac CLIFull CRUD across the Power Platform

Step 1 — Prerequisites

Gather these before installing the MCP server. Node.js and pac CLI are only required if you plan to deploy Code Apps to Power Apps.

Python 3.10+

Runs both server files.

python --version

Claude Desktop

The AI interface for all commands.

claude.ai/download

Azure App Registration

API authentication identity.

portal.azure.com

Microsoft 365 Tenant

SharePoint Online with admin access.

tenant.sharepoint.com

Node.js (optional)

Required only for Code App deploys to Power Apps.

winget install OpenJS.NodeJS.LTS

pac CLI (optional)

Power Platform CLI for Code App push.

dotnet tool install -g Microsoft.PowerApps.CLI.Tool

Step 2 — Azure App Registration

This gives the MCP server an identity to call Microsoft APIs on your tenant.

Register a new app

Go to portal.azure.com → Azure Active Directory → App registrations → New registration. Name it SharePoint MCP Server. Select single tenant. No redirect URI.

Create a client secret

Go to Certificates & secrets → New client secret. Copy the Value immediately — it is shown only once.

Add API permissions

Add the permissions below, then click Grant admin consent so all show green checkmarks.

API Permissions Required
APIPermissionTypePurpose
Microsoft GraphSites.ReadWrite.AllApplicationRead and write all SharePoint sites
Microsoft GraphUser.Read.AllApplicationUser lookup for sharing and permissions
Microsoft GraphGroup.ReadWrite.AllApplicationCreate and manage security groups
SharePointSites.FullControl.AllApplicationAdmin operations like custom scripts
Dynamics CRMuser_impersonationApplicationDataverse operations (optional)

Enable public client flows

Authentication → Advanced settings → Allow public client flows → Yes. This enables delegated authentication for SharePoint write operations.

Step 3 — Install the MCP Server

Download the package

Get the latest version with all 150 tools:

Download sharepoint-mcp-v5-ultimate.zip

Extract the ZIP

Unzip to a permanent location such as C:\Projects\sharepoint-mcp-v5\

Install Python dependencies

Terminal
cd C:\Projects\sharepoint-mcp-v5
pip install msal requests fastmcp

Verify installation

Run this to confirm both files compile without errors:

Terminal
python -c "import py_compile; py_compile.compile('server.py'); py_compile.compile('sharepoint_client.py'); print('Ready.')"

Step 4 — Configure Claude Desktop

Connect the MCP server to Claude Desktop so it can call all 150 tools.

Open Claude Desktop settings

Claude Desktop → Settings (gear icon) → Developer → Edit Config. This opens the claude_desktop_config.json file.

Add the MCP server configuration

Replace the placeholders with your actual Azure credentials:

claude_desktop_config.json
{
  "mcpServers": {
    "sharepoint": {
      "command": "python",
      "args": ["C:\\Projects\\sharepoint-mcp-v5\\server.py"],
      "env": {
        "SP_TENANT_ID":     "YOUR_TENANT_ID",
        "SP_CLIENT_ID":     "YOUR_CLIENT_ID",
        "SP_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "SP_SITE_URL":      "https://TENANT.sharepoint.com",
        "DATAVERSE_URL":    "https://ORG.crm.dynamics.com"
      },
      "timeout": 300000
    }
  }
}

About DATAVERSE_URL: This environment variable is optional. Only include it if you plan to use Dataverse tools (create tables, sync data, CRUD operations). Find your URL at admin.powerplatform.microsoft.com → Environments → your environment → Environment URL.

Restart Claude Desktop

Close and reopen. Look for the hammer icon (๐Ÿ”จ) in the chat — it should show 150 tools from the SharePoint MCP server.

Test it

Type "List all my SharePoint sites" in Claude. It should call list_all_sites and return your tenant's sites.

You are done. Claude Desktop now has full access to your SharePoint tenant, Power Apps, and Dataverse through 150 natural-language tools. Everything below is a reference for what each tool does.

All 150 Tools by Category

Every tool is callable by natural language. Claude picks the right one based on your request.

Sites & Structure

36 tools
  • list_all_sitesDiscover tenant sites
  • create_modern_siteTeam or communication site
  • clone_site_advancedFull clone with content
  • build_branded_siteBrand-aware site builder
  • build_full_intranet_siteCorporate intranet
  • customize_site_from_imageAI brand from image
  • get_site_infoDetails and analytics
  • audit_site_permissionsPermission audit
  • add_user_to_siteGrant access by role
  • apply_site_themeColor theming
  • create_smart_site_templateExport as template

Lists & Items

20 tools
  • create_listCreate new list with columns
  • add_list_columnText, choice, number, boolean
  • get_list_itemsRead all items
  • bulk_import_to_listBulk data import
  • export_list_dataExport to CSV or JSON
  • copy_list_between_sitesCross-site copy
  • compare_listsDiff two lists
  • create_list_dashboardAuto dashboard from list
  • get_item_version_historyVersion tracking
  • embed_list_viewEmbed on a page

Pages & Content

7 tools
  • create_pageModern SharePoint page
  • add_web_part_to_pageAny web part type
  • deploy_html_to_homepageBranded homepage
  • configure_page_headerHeader design options
  • embed_file_viewerOffice document viewer
  • embed_powerbi_dashboardPower BI embed

Navigation & Branding

8 tools
  • build_navigation_structureFull nav from JSON
  • setup_custom_navigationMega menu support
  • apply_advanced_themeFull color palette
  • apply_custom_css_themeCSS injection
  • inject_custom_cssRaw CSS override
  • clear_navigationReset all nav links

Code Apps & Deploy

15 tools — Primary Feature
  • deploy_to_powerapps_atomicFull atomic deploy
  • scaffold_and_deploy_code_appScaffold and script
  • deploy_code_app_to_sharepointInstant SP deploy
  • add_sharepoint_datasource_to_code_appWire SP connector
  • extract_connection_idParse connection URLs
  • run_pac_commandAny pac CLI command
  • run_npm_commandAny npm command
  • fix_code_app_pathResolve PATH issues
  • build_code_app_from_listGenerate from list schema

Dataverse Operations

14 tools — New
  • list_dataverse_tablesList all tables
  • get_dataverse_table_columnsTable schema
  • get_dataverse_recordsRead with OData filters
  • create_dataverse_recordCreate single record
  • update_dataverse_recordUpdate by ID
  • delete_dataverse_recordDelete by ID
  • query_dataverseOData and FetchXML
  • create_dataverse_table_from_listSP to DV schema
  • sync_sharepoint_to_dataverseUpsert sync
  • migrate_sharepoint_list_to_dataverseFull pipeline

Security & Diagnostics

10 tools
  • test_network_connectivityEndpoint health
  • troubleshoot_mcpMCP health check
  • check_throttling_statusRate limit check
  • detect_and_configure_proxyProxy detection
  • scan_governance_issuesGovernance scan
  • audit_external_sharingSharing audit report

Utilities & Forms

38 tools
  • create_powershell_scriptPowerShell generation
  • create_sharepoint_hosted_formSP-hosted forms
  • create_sharepoint_agentCopilot agent
  • create_document_libraryDocument libraries
  • generate_sample_dataTest data generation
  • search_sharepointCross-site search
  • list_power_apps_connectionsConnection list
  • convert_form_keep_styleForm conversion

Troubleshooting

Common issues and their solutions:

Common Issues and Fixes
ProblemCauseSolution
MCP not showing in Claude DesktopConfiguration path is incorrectUse double backslashes \\ in Windows file paths
Auth failed errorIncorrect credentialsVerify Tenant ID, Client ID, and Client Secret in env block
403 Access DeniedMissing API permissionsGrant admin consent for all permissions in Azure Portal
power.config.json not foundpac CLI writes to wrong directoryUse scaffold_and_deploy_code_app which writes the config directly
Failed to fetch in Code AppCORS blocks cross-origin requestsRun pac code add-data-source locally to generate SDK service files
MCP timeout error (-32001)Tool execution exceeds default timeoutSet "timeout": 300000 in your Claude Desktop config
DATAVERSE_URL not setEnvironment variable missingAdd DATAVERSE_URL to the env block in your config file
npm or vite not foundPATH does not include Node.jsInstall Node.js: winget install OpenJS.NodeJS.LTS

Comments

Popular posts from this blog

Bridging the Impossible: Connecting Jira On-Prem to Power Automate & Copilot Studio — The Solution Nobody Built Until Now"

Azure Management MCP Server