前提条件
Node.jsのインストール
text
node -v && npm -v
Pythonのインストール(Pythonベースサーバー用)
-
Python公式サイトからインストーラーをダウンロード
-
「Add Python to PATH」をチェックしてインストール
-
コマンドプロンプトで確認:
text
python --version
uvのインストール
# PowerShellを管理者モードで実行
Set-ExecutionPolicy Bypass -Scope Process -Force
irm https://astral.sh/uv/install.ps1 | iex
MCPサーバーのインストール手順
方法1:グローバルインストール(推奨)
text
npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-brave-search
npm install -g @modelcontextprotocol/server-github
方法2:スクリプトを使った自動インストール
-
mcp-installer.ps1をダウンロード
-
PowerShellで実行:
.\mcp-installer.ps1 @modelcontextprotocol/server-filesystem
設定ファイルの作成(C:\Users<ユーザー名>\AppData\Roaming\Claude\claude_desktop_config.json)
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": [
"%APPDATA%\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
"C:\\Users\\<ユーザー名>\\Documents"
]
},
"brave-search": {
"command": "node",
"args": [
"%APPDATA%\\npm\\node_modules\\@modelcontextprotocol\\server-brave-search\\dist\\index.js"
],
"env": {
"BRAVE_API_KEY": "your_api_key_here"
}
}
}
}
サーバー起動テスト
text
node "%APPDATA%\npm\node_modules\@modelcontextprotocol\server-filesystem\dist\index.js"
トラブルシューティング
モジュールが見つからないエラー
text
npm list -g @modelcontextprotocol/server-filesystem
# パス確認
echo %APPDATA%\npm\node_modules
権限エラー
text
# 管理者権限でPowerShellを起動
Start-Process powershell -Verb RunAs
Pythonサーバーエラー
text
python -m pip install --upgrade uv
uv venv .venv
.venv\Scripts\activate
主要MCPサーバー設定例
| サーバー名 | コマンド例 | 必須環境変数 |
|---|---|---|
| Filesystem | node "%APPDATA%\npm\node_modules\@modelcontextprotocol\server-filesystem\dist\index.js" C:\Users\Public\Documents |
なし |
| Brave検索 | node "%APPDATA%\npm\node_modules\@modelcontextprotocol\server-brave-search\dist\index.js" |
BRAVE_API_KEY |
| GitHub | node "%APPDATA%\npm\node_modules\@modelcontextprotocol\server-github\dist\index.js" |
GITHUB_TOKEN |