Skip to main content
Glama
README.md
# Dotfiles MCP Server

這是一個 MCP (Model Context Protocol) 伺服器,讓大型語言模型 (LLMs) 如 Claude 或 Copilot 可以存取並執行您的自動化腳本。
此專案旨在讓使用者無需完整複製龐大的 dotfiles 儲存庫,也能透過簡單的設定流程,快速使用這些強大的開發工具。

## 功能

- **自動化工具整合**:自動將 `bin/` 目錄下的 Shell 腳本轉換為可供 LLM 呼叫的 MCP 工具。
- **便攜式設計**:內建設定腳本,自動下載所需腳本並設定環境,隨裝隨用。
- **安全路徑管理**:支援動態路徑配置,確保工具在正確的環境下執行。

## 包含的工具腳本

安裝後,LLM 將能夠使用以下工具:

- `bi-weekly-report`: 自動生成雙週工作報告 (透過 GitHub PRs)
- `checkout-ticket`: 根據 JIRA 票號快速建立並切換開發分支
- `checkout-config`: 快速切換設定檔專案分支
- `deploy-console`: 觸發 Jenkins 部署 Console 專案
- `deploy-one`: 觸發 Monorepo 部署
- `trace-build`: 追蹤 Jenkins 建置狀態並回報進度
- `review-ticket`: 協助進行 Code Review

## 快速開始

### 1. 複製專案

```bash
git clone https://github.com/andrew-wu-12/dotfile-mcp-server.git
cd dotfile-mcp-server
```

### 2. 執行自動化設定

此指令會自動下載最新的腳本、安裝 NPM 相依套件,並編譯 TypeScript 程式碼。

```bash
npm run setup
```

### 3. 設定 MCP 客戶端

設定腳本執行完畢後,會直接在終端機顯示您需要的設定資訊。請根據您使用的客戶端進行設定。

#### Claude Desktop / OpenCode 設定

將以下 JSON 設定加入您的設定檔 (例如 `claude_desktop_config.json` 或 `opencode.json`):

```json
{
  "mcpServers": {
    "dotfiles": {
      "command": "node",
      "args": ["{dotfile-mcp-server 絕對路徑}/dist/index.js"],
      "env": {
        "DOTFILES_PATH": "{dotfile-mcp-server 絕對路徑}"
      }
    }
  }
}
```

#### Claude Code (CLI) 使用方式

若要在 Claude Code CLI 中直接加入此伺服器,請執行以下指令(`npm run setup` 結束時會提供包含正確路徑的完整指令):

```bash
claude mcp add dotfiles -- /usr/bin/env DOTFILES_PATH="{dotfile-mcp-server 絕對路徑}" node "{dotfile-mcp-server 絕對路徑}/dist/index.js"
```

## 開發與維護

- **更新腳本**: 重新執行 `npm run setup` 即可重新下載最新的腳本。
- **重新建置**: `npm run build`

## 授權

ISC

TDQS

D1.8/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion between tools. The tool name 'read_file' is clear and unambiguous.

Naming Consistency5/5

Single tool means no inconsistency. The verb_noun pattern is followed.

Tool Count2/5

A single 'read_file' tool is insufficient for a dotfiles server, which typically requires at least listing and writing capabilities.

Completeness2/5

The tool surface is severely incomplete for managing dotfiles. Only reading is possible; no listing, writing, or other operations are present.

Maintenance

ActivityInactive
ResponsivenessNo issues