0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

IBM BobにMCPサーバーを設定する

Last updated at Posted at 2026-01-18

ヤッホー!

最近 IBM Bob にTerraform MCPを繋げたので、設定方法をメモとして残しておく。

設定ファイルの場所

MCPの設定はプロジェクト毎に.bob/mcp.jsonで管理する。

プロジェクト構成の例
.
├── .bob/
│   └── mcp.json    # 👈 ここ
├── README.md
├── environments/
│   ├── dev/
│   ├── prod/
│   └── staging/
└── modules/

今回はTerraformでインフラを管理しているレポジトリに配置した。

mcp.json の書き方

今回は Terraform MCP Server を使う。

まず、コンテナイメージを取得しておく。

podman pull docker.io/hashicorp/terraform-mcp-server:0.3.3

通常、このMCPサーバーはSTDIOモードで以下のように起動する。

podman run -i --rm hashicorp/terraform-mcp-server:0.3.3

このコマンドをmcp.jsonに落とし込むとこうなる。

{
  "mcpServers": {
    "terraform": {
      "command": "podman",
      "args": [
        "run",
        "-i",
        "--rm",
        "hashicorp/terraform-mcp-server:0.3.3"
      ]
    }
  }
}

"terraform" の部分がUIに表示される名前になる。

UIで確認

Command Paletteから「MCP Servers」を選択。

Screenshot 2026-01-19 at 1.49.28.png

設定したサーバーが表示されていればOK。ここからEdit/Refreshもできる。

Screenshot 2026-01-19 at 1.50.00.png

BobからMCPサーバーを使う

普通にプロンプトで聞く

Terraform MCPサーバーを接続した。このレポジトリをチェックするために使ってください。

(MCPツールを使いながらチェックされる。いつくかの指摘をもらう)

プロバイダーバージョンを6に上げたい。やってくれる?

(MCPツールを使いながら更新される)

google-beta必要か?googleだけではだめ?

google = {
source = "hashicorp/google"
version = "~> 6.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 6.0"
}

(回答される。私の場合は必要)

バージョン7にアップグレードしても beta必要か?

(MCPツールでドキュメント取得され回答。必要だって)

Screenshot 2026-01-19 at 2.23.26.png

以上!

🐊

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?