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?

GitHub Copilot の MCP 設定で API キーをベタ書きしないで input を使って回避する

Last updated at Posted at 2025-07-15

内容

タイトルの通りです。

GitHub Copilot の MCP 設定で API キーをベタ書きしないで input を使って回避する。

ちょっとしたメモですので、シンプルにサクッと書きます。

設定例

API キーの入力はサーバーの初回起動時に求められ、password フィールドを true に設定しておけば入力した値は表示されなくなる。

.vscode/mcp.json
{
    "inputs": [
        {
            "type": "promptString",
            "id": "figma-api-token", 
            "description": "Figma Access Token",
            "password": true
        }
    ],
    "servers": {
        "figma-developer-mcp": {
            "command": "npx",
            "args": [
                "-y", 
                "figma-developer-mcp", 
                "--figma-api-key=${input:figma-api-token}",
                "--stdio"
                ]
        }
    },
}

サンプル

API キーを入力。
スクリーンショット 2025-07-15 11.34.23.png

API キーを入力後、password は、************ となり起動。
スクリーンショット 2025-07-15 11.38.01.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?