インストール不要。2分以内に動きます。
cloud.anythingmcp.com で無料トライアルを開始し、SharePoint (Microsoft 365) をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。
概要
AI に SharePoint で作業させます。サイトの検索、ドキュメントライブラリの閲覧と検索、ファイルの詳細とアクセスできる人の確認、リストアイテムの読み取り、作成、更新、リスト、フォルダー、テキストファイルの作成、サイトページの読み取り、Microsoft Search による全体の検索ができます。Microsoft Graph 経由で Microsoft 365 に対応し、職場アカウントでサインインします。
こう聞いてみよう
SharePoint (Microsoft 365) のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → SharePoint (Microsoft 365) をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Microsoft SharePoint + Gemini
AI に SharePoint で作業させます。サイトの検索、ドキュメントライブラリの閲覧と検索、ファイルの詳細とアクセスできる人の確認、リストアイテムの読み取り、作成、更新、リスト、フォルダー、テキストファイルの作成、サイトページの読み取り、Microsoft Search による全体の検索ができます。Microsoft Graph 経由で Microsoft 365 に対応し、職場アカウントでサインインします。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET, MICROSOFT_TENANT_ID
ステップ 1 — 認証情報を取得
-
Microsoft Entra 管理センター(entra.microsoft.com)または Azure portal を開き、Applications → App registrations → New registration に進みます。
-
アプリに名前を付け(例: 「AnythingMCP Microsoft 365」)、Supported account types を選びます。この選択によって
MICROSOFT_TENANT_IDに入れる値が決まります。- Accounts in this organizational directory only(シングルテナント): 自組織のユーザーだけがサインインできます。アプリの Overview ページにある Directory (tenant) ID(GUID)か、
contoso.onmicrosoft.comのようなドメインを入れます。 - Accounts in any organizational directory(マルチテナント):
organizationsを入れます。 - Accounts in any organizational directory and personal Microsoft accounts:
commonを入れます。個人用 Microsoft アカウントには SharePoint がないため、サインインはできてもデータは取得できません。
値がアカウントの種類と一致しないと、Microsoft はサインインを拒否します(AADSTS50194 または AADSTS50020)。
- Accounts in this organizational directory only(シングルテナント): 自組織のユーザーだけがサインインできます。アプリの Overview ページにある Directory (tenant) ID(GUID)か、
-
Redirect URI でプラットフォーム Web を選び、
https://cloud.anythingmcp.com/api/mcp-oauth/callbackを入力します。AnythingMCP をセルフホストしている場合は、代わりにhttps://your-anythingmcp-host/api/mcp-oauth/callbackを入力します。URI は 1 文字単位で一致している必要があり、一致しないと Microsoft は AADSTS50011 を返します。 -
API permissions → Add a permission → Microsoft Graph → Delegated permissions を開き、
offline_access、User.Read、Sites.ReadWrite.All、Files.ReadWrite.Allを追加します。offline_accessがあることで Microsoft はリフレッシュトークンを発行します。これがないと、コネクターは承認から 1 時間後に動かなくなります。 -
Certificates & secrets → New client secret を開きます。Secret ID ではなく、シークレットの Value をコピーします。表示されるのは一度だけです。有効期限を控えておいてください。期限が切れると、新しいシークレットを作成して入力し直すまでコネクターは動作しません。
-
Overview ページの Application (client) ID を
MICROSOFT_CLIENT_IDに、シークレットの値をMICROSOFT_CLIENT_SECRETに、手順 2 のテナントの値をMICROSOFT_TENANT_IDに入力し、コネクターをインストールします。 -
コネクターのページで Authorize with Provider をクリックし、AI に扱わせる SharePoint サイトにアクセスできる職場アカウントでサインインします。リフレッシュトークンは暗号化して保存され、アクセストークン(有効期間は約 1 時間)は自動で更新されます。
-
まず
sharepoint_get_root_siteを実行します。組織のルートサイトが表示され、SharePoint に接続できることを確認できます。
「.All」の意味: これらの委任されたアクセス許可における All は、「サインインしたユーザーが開けるすべてのサイト」という意味です。AI がそのユーザー自身の SharePoint へのアクセス権を超える権限を得ることはありません。
すべての Microsoft コネクターに 1 つの Entra アプリ: Outlook、OneDrive、Excel のコネクター用に作成したアプリの登録は、ここでもそのまま使えます。登録を開いて API permissions で手順 4 のアクセス許可を追加し、リダイレクト URI はそのままで、同じクライアント ID、シークレット、テナントを使い回してください。各コネクターは、承認時に自分に必要なアクセス許可だけを求めます。
- Outlook:
Mail.ReadWrite、Mail.Send、Calendars.ReadWrite - OneDrive:
Files.ReadWrite - Excel:
Files.ReadWrite(SharePoint 内のブックや共有されたブックにはFiles.ReadWrite.Allも必要) - SharePoint:
Sites.ReadWrite.AllとFiles.ReadWrite.All
どのコネクターにも offline_access と User.Read が必要です。
管理者の同意: これらの委任されたアクセス許可には通常は管理者は不要ですが、多くの組織ではユーザーによる同意が無効になっています。サインイン時に「Need admin approval」(AADSTS65001 または AADSTS90094)と表示された場合は、テナント管理者がアプリの登録を一度開き、API permissions → Grant admin consent で組織全体に同意を付与します。その後は各ユーザーが承認できます。それでも各コネクターが扱えるのは、サインインしたアカウントが見られる範囲だけです。
読み取り専用の設定: アプリの登録に Sites.Read.All と Files.Read.All を追加し、コネクターの OAuth 設定でスコープを offline_access User.Read Sites.Read.All Files.Read.All に置き換えて再度承認し、sharepoint_create_list_item、sharepoint_update_list_item、sharepoint_create_list、sharepoint_create_folder、sharepoint_upload_text_file、sharepoint_rename_drive_item、sharepoint_move_drive_item を無効にします。
インストール時はオフ: sharepoint_delete_list_item、sharepoint_delete_drive_item、sharepoint_create_sharing_link、sharepoint_invite。共有リンクと招待は意図的にオフにしています。他の人に組織のファイルへのアクセス権を与えることになり、AI が読んだドキュメントに何かを共有するよう求める文章が含まれている可能性もあるからです。AI に本当に必要な場合だけツールをオンにしてください。削除したアイテムはサイトのごみ箱に移ります。
サイトの探し方: AI はキーワードやサイトのアドレス(例: https://contoso.sharepoint.com/sites/Marketing)からサイトを見つけ、そのドキュメントライブラリとリストを開きます。sharepoint_search は Microsoft Search を使って、あなたが見られるすべてのサイト、ファイル、リストアイテムを横断して検索します。モダンなサイトページは読み取れますが、クラシックページ、ニュース投稿、ページの編集には対応していません。
リスト: リストの値は各列の内部名で保存されており、画面に表示される名前とは異なる場合があります(「期限」と表示される列が DueDate であることもあります)。そのため AI は、先に sharepoint_list_columns で列を読み取ります。アイテムが 5,000 件を超えるリストでは、SharePoint はインデックス付きの列でしか絞り込みや並べ替えを行いません。
ファイルと内容: このコネクターはファイルの内容をダウンロードしません。代わりに AI がファイルのリンクを示します。約 4 MB までのテキストファイルを作成でき、既定では既存のファイルを上書きすることはありません。ライブラリ内の Excel ブックのセルを扱うには、Microsoft Excel コネクターを使います。
よくあるエラー: 401 InvalidAuthenticationToken は、承認が取り消されたかクライアントシークレットの期限が切れたことを示します。必要に応じて新しいシークレットを入力し、もう一度 Authorize with Provider をクリックします。403 accessDenied は、手順 4 のアクセス許可が不足しているか同意されていないこと、またはそのサイト、ライブラリ、リストへのアクセス権がないことを示します。404 itemNotFound は、サイト、ライブラリ、リスト、アイテムのいずれかが間違っているか、存在しないサイトパスであることを示します。個人用 Microsoft アカウントでは、すべての呼び出しが 404 または 400 になります。リストアイテムでの 400 invalidRequest は、列名が内部名ではないか、値が列に合っていないことを示します。「cannot be referenced in filter or orderby as it is not indexed」は、リストの設定でその列にインデックスを作成する必要があることを示します。409 nameAlreadyExists は、同じ名前のアイテムがすでにそのフォルダーにあることを示します。
このコネクターは、ファイルの内容のダウンロード、バイナリファイルのアップロード、サイトの作成やサイトのアクセス許可の変更、リストや列の削除、ページの編集、用語ストアとコンテンツタイプの管理は行いません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Gemini にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
Gemini CLI は ~/.gemini/settings.json(Windows では %USERPROFILE%\.gemini\settings.json)から MCP サーバーを読み込みます。次を追加してください:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- AnythingMCP の MCP Servers → 対象のサーバー → API keys で MCP API キーを作成し、
YOUR_MCP_API_KEYと置き換えます。 - ファイルを保存し、
geminiを再起動します。 - Gemini CLI で
/mcpを実行します(またはシェルでgemini mcp list)。anythingmcpが接続済みとして表示されるはずです。 - プロンプトを入力しましょう。Gemini CLI が
Microsoft SharePointのツールを呼び出せるようになりました。
利用可能なツール
| Tool | What it does |
|---|---|
sharepoint_get_root_site | Get the organisation's root SharePoint site (e.g. https://contoso.sharepoint.com): its id, name, displayName, webUrl and hostname… |
sharepoint_search_sites | Find SharePoint sites the user can open by keyword in their name or description, e.g. "marketing". "*" lists all sites the user can reach |
sharepoint_get_site_by_path | Get a site from its address: hostname plus server-relative path, as in https://contoso.sharepoint.com/sites/Marketing → hostname… |
sharepoint_get_site | Get one site by id: name, displayName, description, webUrl, dates and hostname |
sharepoint_list_subsites | List the subsites of a site: id, name, displayName, webUrl |
sharepoint_list_drives | List the document libraries (drives) of a site, e.g. "Documents" (Shared Documents) and other libraries: id, name, description, driveType… |
sharepoint_list_drive_root | List the files and folders at the top level of a document library: id, name, size, dates, last modifier, file mimeType or folder child… |
sharepoint_list_folder | List the files and folders inside one folder of a document library |
sharepoint_search_drive | Search one document library for files and folders whose name, metadata or content matches the text |
sharepoint_get_drive_item | Get one file's or folder's metadata in a document library: name, size, dates, creator and last modifier, parentReference, file mimeType or… |
sharepoint_search | Search everything the user can see across SharePoint and OneDrive with Microsoft Search: files (driveItem), list items (listItem), lists… |
sharepoint_list_lists | List the lists and libraries of a site: id, name, displayName, description, list.template (genericList, documentLibrary, events...)… |
sharepoint_list_columns | List the columns of a list with their internal name (the key used in fields), displayName, type (text, number, dateTime, choice with its… |
sharepoint_list_items | List the items of a list with their column values (fields), id, dates, creator and last modifier, webUrl |
sharepoint_get_list_item | Get one list item with all its column values (fields), id, dates, creator, last modifier and webUrl |
sharepoint_create_list_item | Create an item in a list, with values keyed by the internal column names from sharepoint_list_columns |
sharepoint_update_list_item | Change column values of a list item; columns not named keep their values |
sharepoint_delete_list_item | Delete a list item |
sharepoint_create_list | Create a new list in a site, optionally with columns (every list has a Title column) |
sharepoint_create_folder | Create a folder in a document library, inside a parent folder (default: the library's top level) |
sharepoint_upload_text_file | Create a new text file (.txt, .md, .csv, .json, .html, .xml...) with the given content in a folder of a document library, up to about 4 MB |
sharepoint_rename_drive_item | Rename a file or folder in a document library in place |
sharepoint_move_drive_item | Move a file or folder to another folder of the same document library, optionally renaming it on the way |
sharepoint_delete_drive_item | Delete a file or folder (with its contents) from a document library |
sharepoint_list_permissions | List who has access to a file or folder in a document library: roles, people and groups (grantedToV2), sharing links (link.type… |
sharepoint_create_sharing_link | Create a sharing link for a file or folder in a document library: type "view" or "edit", scope "anonymous", "organization" or "users" |
sharepoint_invite | Give people access to a file or folder in a document library by email address, with role "read" or "write", optionally emailing them |
sharepoint_list_pages | List the modern pages of a site: id, name, title, webUrl, pageLayout, publishing state, dates and author |
sharepoint_get_page | Read one modern page with its content: title, description and canvasLayout (sections, columns and web parts; text web parts carry innerHtml) |
プロンプトの例
- 「マーケティングのサイトを探して、その「ドキュメント」ライブラリで今月変更されたファイルを一覧にして。」
- 「「プロジェクト」リストで、ステータスが「オープン」で期限が金曜日より前のアイテムをすべて見せて。」
- 「「購入申請」リストにアイテムを追加して。「営業用の新しいノート PC」、金額 4,800、ステータス「保留中」で。」
- 「SharePoint で最新の出張規程を探して、どこに保存されているか教えて。」
FAQ
Gemini CLI はどこから MCP サーバーを読み込みますか? ユーザー単位では ~/.gemini/settings.json、プロジェクト単位ではプロジェクト内の .gemini/settings.json です。gemini mcp list で各サーバーと接続状態を確認できます。
次のステップ
このガイドは役に立ちましたか?