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?

Dockerコンテナ内でSerena起動時にブラウザが開かないようにする方法

Posted at

はじめに

Dockerコンテナ内でSerena起動時にブラウザが自動で開かないようにする方法を紹介する。Dockerコンテナ外でのグローバルな設定方法については、こちらの記事を参照。このグローバル設定ではブラウザが開いてしまったため、Dockerコンテナ内でも無効化できる別の方法を紹介する。

動作確認環境

  • Ubuntu 22.04 x86_64
  • Docker version 28.3.3, build 980b856
  • Serena v0.1.4
  • Claude Code
  • Codex

方法

SerenaのWebダッシュボード(ブラウザで開かれるインターフェース)は、--enable-web-dashboard=falseオプションを指定することで無効化できる。

Claude Code

Claude Codeにおける設定方法を紹介する。

新規に登録する場合

SerenaのMCPサーバーを以下のコマンドで登録する。--enable-web-dashboard=falseは最後につける。

claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project $(pwd) --enable-web-dashboard=false

以下のような出力が表示されれば成功。

Added stdio MCP server serena with command: uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project <project_path> --enable-web-dashboard=false to local config
File modified: /root/.claude.json [project: <project_path>]

既に登録されている場合

以下のコマンドで、SerenaのMCPサーバーを一度削除する。

claude mcp remove serena

以下のような出力が表示されれば削除完了。

Removed MCP server "serena" from local config
File modified: /root/.claude.json [project: <project_path>]

--enable-web-dashboard=falseオプションを追加してから、再度SerenaのMCPサーバーを登録する。

claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project $(pwd) --enable-web-dashboard=false

以下のような出力が表示されれば成功。

Added stdio MCP server serena with command: uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project <project_path> --enable-web-dashboard=false to local config
File modified: /root/.claude.json [project: <project_path>]

Codex

Codexを使用している場合は、~/.codex/config.toml(環境によっては /root/.codex/config.toml)を開いて、以下を追記してSerena MCPサーバーを追加する。

[mcp_servers.serena]
command = "uvx"
args = ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex", "--enable-web-dashboard=false"]

まとめ

Dockerコンテナ内でSerenaを利用する際に、ブラウザの自動起動を防ぐシンプルな方法を紹介した。
コンテナ環境での自動起動が不要な場合は、本記事の手順を参考に設定してほしい。

参考

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?