Skip to main content

Get started with the ShareGate Protect MCP server

How to connect your AI tool to ShareGate Protect using the MCP server to query Microsoft 365 governance data

Use the ShareGate Protect Model Context Protocol (MCP) server to query your Microsoft 365 governance data directly from any AI tool that supports MCP.

Ask governance questions in natural language, explore your tenant data, and get back real data from ShareGate Protect without leaving your AI tool.

Note: The MCP server is read-only in this release. Actions such as archiving sites and deleting sharing links are planned for a future release.

Prerequisites

Before connecting, make sure you have:

  • Access to ShareGate Protect

  • An AI tool that supports MCP

What you can do

Once connected, you can ask your AI tool for live data from ShareGate Protect.

For example, you can:

  • Explore your tenant. Filter and browse sites, groups, teams, OneDrives, users, licenses, and sharing links by activity, ownership, storage, and more.

  • Review governance insights. Retrieve active Protect insights for your workspace, such as inactive sites, overshared content, and external sharing exposure.

  • Track governance metrics. Pull daily measurements for up to 365 days across key governance metrics.

  • Work across multiple workspaces. If you manage more than one ShareGate workspace, switch between them mid-conversation or run cross-workspace analysis.

Connect your AI tool

Use the MCP server address that matches your ShareGate Protect workspace region:

  • North America: https://mcp.sharegate.com/mcp

  • Europe: https://mcp.eu.sharegate.com/mcp

Select your AI tool below.

Claude

Adding a custom connector is the simplest way to connect Claude to ShareGate Protect. It requires a Claude Pro or Max personal account or admin access to a Claude organization.

  1. In Claude (Desktop or web), select Customize from the sidebar.

  2. Select Connectors.

  3. Click Add custom connector.

  4. Enter a name and paste the MCP server URL for your region.

  5. Click Connect.

  6. Follow the sign-in steps in your browser.

Note: Enterprise Claude Desktop users may have custom connectors blocked by their admin. If you cannot add a custom connector, use the config file method below.

Claude Desktop (config file)

This method works for any Claude Desktop user, but requires Node.js to be installed on your machine.

  1. Open Claude Desktop.

  2. Go to Settings > Developer > Edit Config. This opens claude_desktop_config.json.

  3. Add the following inside the "mcpServers" section, replacing the MCP URL with the one for your region.

    {
    "mcpServers": {
    "mcp-sg-protect": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://mcp.sharegate.com/mcp", "--transport", "http-only"]
    }
    }
    }
  4. Save the file, then fully quit and reopen Claude Desktop.

  5. A browser window opens for sign-in the first time.

Claude Code

Run one command in your terminal, using the MCP URL for your region. After it completes, run /mcp inside Claude Code and sign in from your browser.

claude mcp add --scope user --transport http mcp-sg-protect https://mcp.sharegate.com/mcp

Microsoft Copilot (Copilot Studio)

Connecting ShareGate Protect to Microsoft Copilot requires a Copilot Studio license and a new or existing agent.

  1. In Copilot Studio, open your agent or create a new one.

  2. Go to the Tools tab and click Add a tool.

  3. Select Model Context Protocol.

  4. Enter the MCP information and server URL for your region.

  5. For Authentication, select OAuth 2.0 with the Dynamic discovery type.

  6. Connect using the Connection - Not connected button or using the Manage your connection page, and follow the steps to connect the MCP.

To make the agent available in Microsoft 365 or Microsoft Teams, publish it and add the relevant channels. Each user who connects for the first time will be prompted to sign in with their ShareGate account.

For more information, see Microsoft's article, Connect to MCP server via Microsoft 365 Copilot.

GitHub Copilot in Visual Studio Code

You can connect ShareGate Protect to GitHub Copilot when using agent mode in Visual Studio Code.

  1. Switch Copilot Chat to Agent mode using the dropdown next to the chat input.

  2. Open the Command Palette (Cmd/Ctrl+Shift+P) and run MCP: Open User Configuration. This opens or creates ~/.vscode/mcp.json.

  3. Add the following inside the file, replacing the URL with the one for your region:

{
"servers": {
"mcp-sg-protect": {
"type": "http",
"url": "https://mcp.sharegate.com/mcp"
}
}
}

  1. Save the file. Visual Studio Code prompts you to sign in, and a browser window opens to log in to ShareGate Home.

ChatGPT

You can connect ShareGate Protect to ChatGPT with a ChatGPT Business or Enterprise plan.

Business or Enterprise (admin setup): Admins can add ShareGate Protect as an app for all users.

Go to Workspace settings > Apps > Create, fill in the MCP server URL, and publish the app.

Developer mode: If developer mode is enabled for your account, go to Settings > Apps > Create app and enter the MCP server URL for your region.

Note: On Business and Enterprise plans, developer mode may require your organization's admin to enable it first.

Sign in for the first time

The first time you connect from any AI tool, two prompts appear in your browser:

  1. ShareGate Home login: Enter the credentials for the ShareGate account you want to use.

  2. Authorize access: A one-time security prompt appears when a new redirect URL is detected on your client registration. Only approve this if you are actively setting up the MCP connection.

To confirm the connection is working, ask your AI tool to "list my ShareGate workspaces."

Remove access

You can remove ShareGate Protect's data access at any time by:

  • Removing the MCP connection from your AI tool.

  • Disconnecting ShareGate Protect from your tenant by removing the ShareGate Protect app registration in Microsoft Entra.

Did this answer your question?