Logic Apps で MCP Server 経由で SharePoint Listの更新をしてみました。
基本的なAzure Logic Apps での MCP Serverの作り方は以下を参照。
前提
- Logic Appsのリソース作成済
- SharePoint接続のためのユーザあり
- Foundryリソースがあり、Agent定義済(MCP ClientであればFoundry以外でもOK)
Steps
1. ワークフロー定義
まず、ワークフロー定義をします。以下の記事のようにMCP Server作成と同時にやろうとすると内部エラーが起きたので、独立して作ります(ここで詰まった)。
メニュー ワークフロー -> ワークフロー で「+Create」

1.1. Trigger
HTTP Request Triggerを作る。
以下のサンプルからJSON Schemaを定義(直接定義してもOK)。
{
"title": "Issue Title",
"content": "Issue Content"
}
あとで、JSON Schema微調整。本当はproperties の各項目に descriptions を入れるべきだけど省略。
{
"type": "object",
"required": [
"subject",
"content"
],
"properties": {
"subject": {
"type": "string"
},
"content": {
"type": "string"
}
}
}
上の方にTriggerの説明も記載。これが、Tool実行時のDescriptionになるらしい。

1.2. SharePoint Item作成
SharePointの「項目の作成」を選択し値を設定していく。
取り急ぎ、Title と Issue descriptionを入れて、Statu Valueを固定値「New」にしておく。

1.3. Response
登録した内容を出すためにBodyにLink to itemを設定。
もっと本番稼働に近くするにはJSONで登録項目出しておくべきですが、今は省略。

Code View全体。
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"actions": {
"項目の作成": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"referenceName": "sharepointonline"
}
},
"method": "post",
"body": {
"Title": "@triggerBody()?['subject']",
"Description": "<p class=\"editor-paragraph\">@{triggerBody()?['content']}</p>",
"Status": {
"Value": "New"
}
},
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://<host>.sharepoint.com/sites/list-test'))}/tables/@{encodeURIComponent(encodeURIComponent('b00e1d16-0cf5-45a2-aa73-bf0b5eadb70c'))}/items"
},
"runAfter": {}
},
"Response": {
"type": "Response",
"kind": "Http",
"inputs": {
"statusCode": 200,
"body": "@body('項目の作成')?['{Link}']"
},
"runAfter": {
"項目の作成": [
"SUCCEEDED"
]
}
}
},
"outputs": {},
"triggers": {
"When_an_HTTP_request_is_received": {
"type": "Request",
"description": "この操作では、Issue Registration をします。",
"kind": "Http",
"inputs": {
"schema": {
"type": "object",
"required": [
"subject",
"content"
],
"properties": {
"subject": {
"type": "string"
},
"content": {
"type": "string"
}
}
}
}
}
}
},
"kind": "stateful"
}
2. 単体テスト
Logic Apps単体でテスト。
以下のPayloadを入れて実行。
{
"subject": "Issue Title2",
"content": "Issue Content2"
}
3. MCP Server 作成
メニュー Agents -> MCP servers から 「Use existing workflows」を選択。

名前などを入れて作成。この辺の詳細は、「Azure Logic Apps で MCP Server を作ってみた」記事参照




