内容
タイトルの通りです。
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"
]
}
},
}