0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

APIManagement を使って RestAPI を MCP サーバーとして公開する

0
Posted at

REST API を MCP サーバーとして公開する - Azure API Management | Microsoft Learn

手順

API の作成

image.png

API を MCP サーバーとして公開

image.png

ポリシー設定

image.png

Visual Studio Codeに MCP サーバーを追加

image.png

呼んでみる。

image.png

サブスクリプション キーが必要と言われる。APIM を MCP Server にしたときに、Ocp-Apim-Subscription-Key はどこでどうやって指定すると良いのか。

ひとつの方法はこう。

{
  "mcpServers": {
    "my-mcp-server-8c46562b": {
      "tools": [
        "*"
      ],
      "type": "http",
      "url": "https://noyapim1.azure-api.net/noylogicapp1/mcp",
      "headers" :{
        "Ocp-Apim-Subscription-Key": "<key>"
      }
    }
  }
}

image.png

呼び出し成功

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?