﻿---
title: "Cockpit 原生插件"
filename: "terminal"
canonical: /templates/cockpit-codex-plugin/
---

# Cockpit 原生插件

先用 Dart 安装 Cockpit，再从 cockpit-dev/cockpit 安装 cockpit@cockpit。插件会登记本地 cockpit_mcp 服务。

```
dart pub global activate cockpit any
codex plugin marketplace add cockpit-dev/cockpit
codex plugin add cockpit@cockpit

# 已装过：
# codex plugin marketplace upgrade cockpit
# codex plugin add cockpit@cockpit

# 只要 MCP、不装插件：
# codex mcp add cockpit -- cockpit_mcp

# [mcp_servers.cockpit]
# command = "cockpit_mcp"
# args = []
# enabled = true

```
