3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Roo-cline + DeepSeek V3でMCPのセットアップをフルオートでやってみた!

Posted at

はじめに

今回は、Roo-clineとDeepSeek V3を使って、MCPサーバーのセットアップを完全自動化してみました。AIによるコーディング支援がどこまで進化しているのか、実際の例を通して見ていきましょう。

環境構成

  • Roo-cline:最新版
  • モデル:DeepSeek V3
  • 対象MCPサーバー:
    • aira-mcp-server
    • github-kanban-mcp-server

プロンプトの内容

まず、以下のような簡単なプロンプトをMarkdownファイルに記述しました:

下記のMCPサーバーをクローンしてclineのMCPのセットアップを実行して

npm インストールしてから npm run build でビルドして

https://github.com/Sunwood-ai-labs/aira-mcp-server.git

https://github.com/Sunwood-ai-labs/github-kanban-mcp-server.git

この短いプロンプトだけで、Roo-clineは以下の複雑なタスクを自動的に実行してくれました。

Roo-clineの実行プロセス

1. リポジトリのクローン

最初のクローン試行時にエラーが発生しましたが、Roo-clineは状況を分析して自動的に対処しました。

最初のクローン試行(エラー発生)

mkdir C:\Prj\MCP && cd C:\Prj\MCP && git clone https://github.com/Sunwood-ai-labs/aira-mcp-server.git && git clone https://github.com/Sunwood-ai-labs/github-kanban-mcp-server.git

エラー出力:

New-Item: An item with the specified name C:\Prj\MCP already exists.

エラー分析と対応

Roo-clineは以下のように状況を分析しました:

  1. C:\Prj\MCPディレクトリが既に存在している
  2. ディレクトリの存在確認が必要
  3. 既存ディレクトリ内のファイルを確認

再試行とクローンの成功

Roo-clineは既存ディレクトリの内容を確認した後、直接クローンコマンドを実行:

cd C:\Prj\MCP && git clone https://github.com/Sunwood-ai-labs/aira-mcp-server.git && git clone https://github.com/Sunwood-ai-labs/github-kanban-mcp-server.git

クローン結果:

Cloning into 'aira-mcp-server'...
remote: Enumerating objects: 320 done.
...
Cloning into 'github-kanban-mcp-server'...
remote: Enumerating objects: 268 done.
...

2. 依存関係のインストールとビルド

各リポジトリでnpm installnpm run buildを実行:

aira-mcp-server

cd C:\Prj\MCP\aira-mcp-server && npm install && npm run build

実行結果:

added 22 packages and audited 23 packages in 6s
...
Successfully set permissions for build/index.js

github-kanban-mcp-server

cd C:\Prj\MCP\github-kanban-mcp-server && npm install && npm run build

実行結果:

added 307 packages and audited 308 packages in 13s
...
Successfully compiled TypeScript

3. MCP設定ファイルの更新

Roo-clineは自動的に2つの設定ファイルを更新しました:

cline_mcp_settings.json

{
  "mcpServers": {
    // 既存の設定は保持
    "aira": {
      "command": "node",
      "args": [
        "C:/Prj/MCP/aira-mcp-server/build/index.js"
      ],
      "disabled": false,
      "alwaysAllow": []
    },
    "github-kanban": {
      "command": "node",
      "args": [
        "C:/Prj/MCP/github-kanban-mcp-server/build/index.js"
      ],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

claude_desktop_config.json

{
  "mcpServers": {
    // 既存の設定は保持
    "aira": {
      "command": "node",
      "args": [
        "C:/Prj/MCP/aira-mcp-server/build/index.js"
      ]
    },
    "github-kanban": {
      "command": "node",
      "args": [
        "C:/Prj/MCP/github-kanban-mcp-server/build/index.js"
      ]
    }
  }
}

Roo-clineの優れた点

  1. インテリジェントなエラーハンドリング

    • エラーの自動検知と状況分析
    • 適切な対処方法の選択
    • エラー発生後の自動リカバリー
    • 既存ディレクトリの存在確認
    • 必要に応じたディレクトリ作成
    • ビルドエラーの自動検知と対応
  2. 設定ファイルの適切な更新

    • 既存の設定を保持
    • 新規設定の追加
    • 適切なパス形式の使用(Windows形式)
  3. 自動化レベルの高さ

    • 最小限のプロンプトで複雑なタスクを実行
    • 必要な手順を自動的に判断
    • 複数の設定ファイルの同期を維持

まとめ

Roo-clineとDeepSeek V3の組み合わせにより、MCPサーバーのセットアップという複雑なタスクを、たった数行のプロンプトで自動化することができました。特に印象的だったのは、クローン時のエラーに遭遇しても、自動的に状況を分析して適切な対処を行い、タスクを完遂できた点です。特筆すべきは:

  • 最小限の人間の介入
  • 高い信頼性
  • 複数の設定ファイルの適切な管理

これは、AIによるコーディング支援が実用段階に達していることを示す良い例といえるでしょう。

参考リンク

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?