Set up the SharePoint MCP server
The SharePoint MCP server gives AI agents access to files and content in a specific SharePoint site. This guide covers registering an Azure app, granting it site-restricted access through Microsoft Graph, and deploying it to MintMCP as a Hosted Connector with per-user OAuth.
Prerequisites
- A MintMCP admin account
- An Azure account with permission to register apps in Azure Active Directory
- A Global Admin account for your Microsoft 365 tenant (for the Graph Explorer consent step)
Register an Azure app
-
Go to portal.azure.com.
-
Navigate to Azure Active Directory > App registrations.
-
Click New registration.
-
Enter a name — for example, MintMCP SharePoint.
-
Under Redirect URI, select Web and enter:
https://app.mintmcp.com/oauth/callback -
Click Register.
-
Go to API permissions > Add a permission > Microsoft Graph > Delegated permissions.
-
Search for and add each of the following permissions:
Permission Purpose Sites.SelectedAccess only sites explicitly granted to this app emailRead user email offline_accessMaintain access with refresh tokens openidSign in users profileRead user profile User.ReadRead the signed-in user's profile -
Click Add permissions.
Create a client secret
- Go to Certificates & secrets > New client secret.
- Enter a description and select an expiry period.
- Click Add.
- Copy the Value immediately — it won't be shown again.
Copy the client ID and tenant ID
- Go to Overview.
- Copy the Application (client) ID — this is your Client ID.
- Copy the Directory (tenant) ID — you'll need it for the OAuth URLs.
Grant the app access to a specific SharePoint site
This step uses Microsoft Graph Explorer to give the registered app read and write access to a single SharePoint site. Log in as a Global Admin.
-
Go to developer.microsoft.com/en-us/graph/graph-explorer and sign in.
-
Click Modify permissions to open the permissions panel.
-
Find Sites.FullControl.All, grant it, and consent on behalf of your organization.
-
In the request builder, send this POST request:
URL:
POST https://graph.microsoft.com/v1.0/sites/{site_id}/permissionsBody:
{
"roles": ["write", "read"],
"grantedToIdentities": [
{
"application": {
"id": "<your-client-app-id>",
"displayName": "MintMCP SiteRestricted Sharepoint"
}
}
]
}Replace
{site_id}with your SharePoint site ID and<your-client-app-id>with the Application (client) ID from the previous step.
The site ID is a three-part string in the format hostname,siteGuid,webGuid — for example, contoso.sharepoint.com,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy. To find it, run GET https://graph.microsoft.com/v1.0/sites/{hostname}:/sites/{site-name} in Graph Explorer and copy the id field from the response.
Add SharePoint to MintMCP
-
In MintMCP, go to MCP store > Manage store.
-
Click + Add an MCP to your registry → Host an open source or custom MCP.
-
Click the Hosted Server tab, then select Advanced from the dropdown.
-
Set Container Image to:
docker.io/mintmcp/sharepoint-mcp:0.1.0 -
Set Transport to
http. -
Add this environment variable and set its scope to Global:
Variable Value SHAREPOINT_SCOPED_SITE_IDYour SharePoint site ID (the hostname,siteGuid,webGuidstring) -
Click Create.
Configure OAuth
After the connector is created:
-
In MintMCP, open the connector settings and go to Hosted Connector > Advanced.
-
Configure the OAuth fields:
Field Value Authorization URL https://login.microsoftonline.com/<your-tenant-id>/oauth2/v2.0/authorizeToken URL https://login.microsoftonline.com/<your-tenant-id>/oauth2/v2.0/tokenClient ID Your Application (client) ID Client Secret Your client secret value Scopes Sites.Selected email offline_access openid profile User.ReadToken field access_tokenHeader name AuthorizationPrefix BearerReplace
<your-tenant-id>with your Directory (tenant) ID. -
Click Connect.
Security considerations
Sites.Selectedlimits this app to only the site you explicitly granted — it cannot access other SharePoint sites in your tenant.- Each user authenticates through their own Microsoft account, so access reflects their existing permissions on the site.
- Keep the client secret secure — anyone with it can authenticate as your Azure app.
SHAREPOINT_SCOPED_SITE_IDis set globally so all users are restricted to the same site.
Next steps
- Tool customization — Control which SharePoint tools are exposed to users
- MCP gateway administration — Manage access and permissions