How to configure MCP servers using "npx" on Windows and Mac
Windowsでnpxを使ったMCPの設定にはまったのでメモ
Mac
"slack": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-slack"
],
"env": {
"SLACK_BOT_TOKEN": "{token}",
"SLACK_TEAM_ID": "{team id}",
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
}
}
Windows
"slack": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@modelcontextprotocol/server-slack"
],
"env": {
"SLACK_BOT_TOKEN": "{token}",
"SLACK_TEAM_ID": "{team id}",
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
}
}