🔌
VS Codeで .cursor/mcs.json が再利用可能だった
ごきげんよう🙋♀️あっきー(@kuronekopunk)です。
VS Code v1.99 でMCPが利用できるようになりましたね。
リリースノートに書いてありますが、「他のアプリケーションでMCPサーバーをすでに使用している場合は、VS Codeがそれらを検出し、実行するように提案します。」とのことで .cursor/mcp.json
などがあれば利用することが可能になっています。
If you've already been using MCP servers in other applications such as Claude Desktop, VS Code will discover them and offer to run them for you. This behavior can be toggled with the setting chat.mcp.discovery.enabled.
⌘ + Shift + I
でCopilotを開いたあとに Agent
モードに切り替えるとMCPアイコンの横に🔄更新マークが出ています。
[信頼する]を押すことで今回読み込まれたMCPを利用することができるようになりました。
VS Code のMCP設定方法
.vscode/setting.json
⌘ + ,
の設定からワークスペースのMCP設定を編集すると .vscode/setting.json
に書き出されます。
.vscode/setting.json
{
"mcp": {
"inputs": [],
"servers": {
"mcp-server-time": {
"command": "python",
"args": [
"-m",
"mcp_server_time",
"--local-timezone=America/Los_Angeles"
],
"env": {}
}
}
}
}
.vscode/mcp.json
.vscode/setting.json
は他のVS Code設定も記述されるため少し管理がしづらいです。
Cursor等と同じように .vscode/mcp.json
でも管理が可能です。
.vscode/mcp.json
{
"servers": {
"mcp-server-time": {
"command": "python",
"args": [
"-m",
"mcp_server_time",
"--local-timezone=America/Los_Angeles"
],
"env": {}
}
}
}
Discussion