{"_id":"@bennycho/github-enterprise-mcp","_rev":"5-bfb12638126f43f7273a7f5a57103256","name":"@bennycho/github-enterprise-mcp","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@bennycho/github-enterprise-mcp","version":"1.0.0","keywords":["mcp","github","enterprise","llm","ai","claude","cursor","model context protocol","issue tracking","pull request","git","repository","workflow"],"author":{"name":"ddukbg"},"license":"ISC","_id":"@bennycho/github-enterprise-mcp@1.0.0","maintainers":[{"name":"bennycho","email":"bennycho@gmail.com"}],"homepage":"https://github.com/ddukbg/github-enterprise-mcp","bugs":{"url":"https://github.com/ddukbg/github-enterprise-mcp/issues"},"bin":{"github-enterprise-mcp":"dist/index.js"},"dist":{"shasum":"1d5ee504252302105569b77335be57c7b3c0e0eb","tarball":"https://registry.npmjs.org/@bennycho/github-enterprise-mcp/-/github-enterprise-mcp-1.0.0.tgz","fileCount":70,"integrity":"sha512-c9aK6Fha/6RN/B/osF2UxzT39I8eOcKBwI6aVpcSdfY+jwBYB3HguvWI4tmm+u3LUdrpsB29Nf6AY33I3Ffrlw==","signatures":[{"sig":"MEQCIDKaBQ+qHanWPGJRw+4gkfjbDs5JPJP2wOa1P0q+tooVAiAKYHOP4dvcBFr2gDPCq9woGfQPt4lvepuXo5LURORlJw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256616},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4ee362aef93a5f00b4c9c68106b074c6da95def8","scripts":{"dev":"concurrently \"npm run build:watch\" \"npm run dev:js\"","lint":"eslint src/**/*.ts","test":"npm run build && node test-i18n.js","build":"tsc && npm run copy-i18n","start":"node dist/index.js","dev:js":"nodemon dist/index.js --transport http","format":"prettier --write \"src/**/*.ts\"","copy-i18n":"mkdir -p dist/i18n/en dist/i18n/ko && cp i18n/en/*.json dist/i18n/en/ && cp i18n/ko/*.json dist/i18n/ko/","build:watch":"tsc --watch && npm run copy-i18n"},"_npmUser":{"name":"bennycho","email":"bennycho@gmail.com"},"repository":{"url":"git+https://github.com/ddukbg/github-enterprise-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for GitHub Enterprise API integration with Cursor, enabling AI access to repositories, issues, PRs and workflows","directories":{},"_nodeVersion":"25.2.1","dependencies":{"cors":"^2.8.5","axios":"^1.8.4","dotenv":"^16.4.7","express":"^4.19.2","node-fetch":"^3.3.2","universal-user-agent":"^7.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.24.2","nodemon":"^3.1.9","ts-node":"^10.9.2","typescript":"^5.8.2","@types/cors":"^2.8.17","@types/node":"^22.13.10","concurrently":"^9.1.2","@types/express":"^4.17.21","zod-to-json-schema":"^3.24.5","@modelcontextprotocol/sdk":"^1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/github-enterprise-mcp_1.0.0_1768757450702_0.1287505005927716","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bennycho/github-enterprise-mcp","version":"1.0.1","keywords":["mcp","github","enterprise","llm","ai","claude","cursor","model context protocol","issue tracking","pull request","git","repository","workflow"],"author":{"name":"ddukbg"},"license":"ISC","_id":"@bennycho/github-enterprise-mcp@1.0.1","maintainers":[{"name":"bennycho","email":"bennycho@gmail.com"}],"homepage":"https://github.com/ddukbg/github-enterprise-mcp","bugs":{"url":"https://github.com/ddukbg/github-enterprise-mcp/issues"},"bin":{"github-enterprise-mcp":"dist/index.js"},"dist":{"shasum":"2022368e3b3296ecf026bb033def35399149dae7","tarball":"https://registry.npmjs.org/@bennycho/github-enterprise-mcp/-/github-enterprise-mcp-1.0.1.tgz","fileCount":70,"integrity":"sha512-qv3PqUsnYzuupPq3tNeYtnpg6oMBfodl0PaR9knM9znhqR/DG7mOKaiTCWN6nLspO13K0rWZcAFQbbTjg1RVGA==","signatures":[{"sig":"MEUCIQCZViIyJgQ0cnebXEPA8By5nQPPqShnd0GDGHxWgb/s8gIgO1HTsSXErHk6Pgb3u8VOwAOfencoKDHwt3LtqjJVMkM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256664},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4ee362aef93a5f00b4c9c68106b074c6da95def8","scripts":{"dev":"concurrently \"npm run build:watch\" \"npm run dev:js\"","lint":"eslint src/**/*.ts","test":"npm run build && node test-i18n.js","build":"tsc && npm run copy-i18n","start":"node dist/index.js","dev:js":"nodemon dist/index.js --transport http","format":"prettier --write \"src/**/*.ts\"","copy-i18n":"mkdir -p dist/i18n/en dist/i18n/ko && cp i18n/en/*.json dist/i18n/en/ && cp i18n/ko/*.json dist/i18n/ko/","build:watch":"tsc --watch && npm run copy-i18n"},"_npmUser":{"name":"bennycho","email":"bennycho@gmail.com"},"repository":{"url":"git+https://github.com/ddukbg/github-enterprise-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for GitHub Enterprise API integration with Cursor, enabling AI access to repositories, issues, PRs and workflows","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.2","cors":"^2.8.5","axios":"^1.8.4","dotenv":"^16.4.7","express":"^4.19.2","node-fetch":"^3.3.2","zod-to-json-schema":"^3.24.5","universal-user-agent":"^7.0.2","@bennycho/github-enterprise-mcp":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.9","ts-node":"^1.7.1","typescript":"^5.8.2","@types/cors":"^2.8.17","@types/node":"^22.13.10","concurrently":"^9.1.2","@types/express":"^4.17.21","@modelcontextprotocol/sdk":"^1.7.0"},"_npmOperationalInternal":{"tmp":"tmp/github-enterprise-mcp_1.0.1_1768758586454_0.7042310120004438","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bennycho/github-enterprise-mcp","version":"1.0.2","keywords":["mcp","github","enterprise","llm","ai","claude","cursor","model context protocol","issue tracking","pull request","git","repository","workflow"],"author":{"name":"ddukbg"},"license":"ISC","_id":"@bennycho/github-enterprise-mcp@1.0.2","maintainers":[{"name":"bennycho","email":"bennycho@gmail.com"}],"homepage":"https://github.com/ddukbg/github-enterprise-mcp","bugs":{"url":"https://github.com/ddukbg/github-enterprise-mcp/issues"},"bin":{"github-enterprise-mcp":"dist/index.js"},"dist":{"shasum":"d3599f88cd9ed4bdebf2f041e1092dbc7d21f620","tarball":"https://registry.npmjs.org/@bennycho/github-enterprise-mcp/-/github-enterprise-mcp-1.0.2.tgz","fileCount":70,"integrity":"sha512-dLLoJEEWeZhnLDaEOuK98VouuS/5X25ANySsCTCTC9Fkxs6huJUP4+z1FU762RXi/ca7zcDkHcloOpTZxC1b4g==","signatures":[{"sig":"MEUCIQDFDwSsqxHueeOhCvWKX17+BWYnNfzYSYf6yv3AxpeS2wIgHc/A4vDskSMwmAbXwdmJRZF4i22wpHcVCa+Tl880tqk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256615},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"fe6c989789eb0a77e031258c4f68dcf4e3c1b313","scripts":{"dev":"concurrently \"npm run build:watch\" \"npm run dev:js\"","lint":"eslint src/**/*.ts","test":"npm run build && node test-i18n.js","build":"tsc && npm run copy-i18n","start":"node dist/index.js","dev:js":"nodemon dist/index.js --transport http","format":"prettier --write \"src/**/*.ts\"","copy-i18n":"mkdir -p dist/i18n/en dist/i18n/ko && cp i18n/en/*.json dist/i18n/en/ && cp i18n/ko/*.json dist/i18n/ko/","build:watch":"tsc --watch && npm run copy-i18n"},"_npmUser":{"name":"bennycho","email":"bennycho@gmail.com"},"repository":{"url":"git+https://github.com/ddukbg/github-enterprise-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for GitHub Enterprise API integration with Cursor, enabling AI access to repositories, issues, PRs and workflows","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.2","cors":"^2.8.5","axios":"^1.8.4","dotenv":"^16.4.7","express":"^4.19.2","node-fetch":"^3.3.2","zod-to-json-schema":"^3.24.5","universal-user-agent":"^7.0.2","@modelcontextprotocol/sdk":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.9","ts-node":"^1.7.1","typescript":"^5.8.2","@types/cors":"^2.8.17","@types/node":"^22.13.10","concurrently":"^9.1.2","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/github-enterprise-mcp_1.0.2_1768759013650_0.6946041424746172","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bennycho/github-enterprise-mcp","version":"1.0.3","keywords":["mcp","github","enterprise","llm","ai","claude","cursor","model context protocol","issue tracking","pull request","git","repository","workflow"],"author":{"name":"ddukbg"},"license":"ISC","_id":"@bennycho/github-enterprise-mcp@1.0.3","maintainers":[{"name":"bennycho","email":"bennycho@gmail.com"}],"homepage":"https://github.com/ddukbg/github-enterprise-mcp","bugs":{"url":"https://github.com/ddukbg/github-enterprise-mcp/issues"},"bin":{"github-enterprise-mcp":"dist/index.js"},"dist":{"shasum":"adf2c104522ff8887634178cf9f3e185e30548cc","tarball":"https://registry.npmjs.org/@bennycho/github-enterprise-mcp/-/github-enterprise-mcp-1.0.3.tgz","fileCount":70,"integrity":"sha512-WznUQPdZnJ9n0EjNnnO7WTfzqDFPg7H/5x7EQ3U4W2TZv9jInTMY3Bsk98KpitGa74nPITuZxcCxp3vmKgnXVA==","signatures":[{"sig":"MEQCIHR4qD5pvEesetAXZZKi8yWrYxtAFwbfyDENp9SWEBXMAiBRDOmF+b7Km9ujDFXeR14iivG+LRZzQPLgODV9Nr4xrA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256664},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b9198961e4e63f270f1e8315826f683f053e9256","scripts":{"dev":"concurrently \"npm run build:watch\" \"npm run dev:js\"","lint":"eslint src/**/*.ts","test":"npm run build && node test-i18n.js","build":"tsc && npm run copy-i18n","start":"node dist/index.js","dev:js":"nodemon dist/index.js --transport http","format":"prettier --write \"src/**/*.ts\"","copy-i18n":"mkdir -p dist/i18n/en dist/i18n/ko && cp i18n/en/*.json dist/i18n/en/ && cp i18n/ko/*.json dist/i18n/ko/","build:watch":"tsc --watch && npm run copy-i18n"},"_npmUser":{"name":"bennycho","email":"bennycho@gmail.com"},"repository":{"url":"git+https://github.com/ddukbg/github-enterprise-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for GitHub Enterprise API integration with Cursor, enabling AI access to repositories, issues, PRs and workflows","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.24.2","cors":"^2.8.5","axios":"^1.8.4","dotenv":"^16.4.7","express":"^4.19.2","node-fetch":"^3.3.2","zod-to-json-schema":"^3.24.5","universal-user-agent":"^7.0.2","@modelcontextprotocol/sdk":"^1.7.0","@bennycho/github-enterprise-mcp":"^1.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.9","ts-node":"^1.7.1","typescript":"^5.8.2","@types/cors":"^2.8.17","@types/node":"^22.13.10","concurrently":"^9.1.2","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/github-enterprise-mcp_1.0.3_1768759617009_0.23078250606181983","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bennycho/github-enterprise-mcp","version":"1.0.4","type":"module","main":"dist/index.js","bin":{"github-enterprise-mcp":"dist/index.js"},"scripts":{"build":"tsc && npm run copy-i18n","build:watch":"tsc --watch && npm run copy-i18n","copy-i18n":"mkdir -p dist/i18n/en dist/i18n/ko && cp i18n/en/*.json dist/i18n/en/ && cp i18n/ko/*.json dist/i18n/ko/","start":"node dist/index.js","dev":"concurrently \"npm run build:watch\" \"npm run dev:js\"","dev:js":"nodemon dist/index.js --transport http","test":"npm run build && node test-i18n.js","lint":"eslint src/**/*.ts","format":"prettier --write \"src/**/*.ts\""},"keywords":["mcp","github","enterprise","llm","ai","claude","cursor","model context protocol","issue tracking","pull request","git","repository","workflow"],"author":{"name":"ddukbg"},"license":"ISC","description":"MCP server for GitHub Enterprise API integration with Cursor, enabling AI access to repositories, issues, PRs and workflows","repository":{"type":"git","url":"git+https://github.com/ddukbg/github-enterprise-mcp.git"},"homepage":"https://github.com/ddukbg/github-enterprise-mcp","bugs":{"url":"https://github.com/ddukbg/github-enterprise-mcp/issues"},"devDependencies":{"@types/cors":"^2.8.17","@types/express":"^4.17.21","@types/node":"^22.13.10","concurrently":"^9.1.2","nodemon":"^3.1.9","ts-node":"^1.7.1","typescript":"^5.8.2"},"dependencies":{"@modelcontextprotocol/sdk":"^1.7.0","axios":"^1.8.4","cors":"^2.8.5","dotenv":"^16.4.7","express":"^4.19.2","node-fetch":"^3.3.2","universal-user-agent":"^7.0.2","zod":"^3.24.2","zod-to-json-schema":"^3.24.5"},"publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"gitHead":"b9198961e4e63f270f1e8315826f683f053e9256","types":"./dist/index.d.ts","_id":"@bennycho/github-enterprise-mcp@1.0.4","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-POjHIBmKnSxmm5D9J/Tw7jgAvjbHijZgSHmAc+bm0pRZJrbf0sqVAEpgIiibtJJFEgNjxS2rIYGPQIsMs04MTQ==","shasum":"2bd85708062e6d63caa8b861d064ee302c831be4","tarball":"https://registry.npmjs.org/@bennycho/github-enterprise-mcp/-/github-enterprise-mcp-1.0.4.tgz","fileCount":70,"unpackedSize":256615,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCRfKki5HpP++tX3oOFDQpEc3Q2DcsOHlUPjo75A3EsbAIhALBJC24ba8DYj2Vb76WfHxmNuXpYKWQm/tpSzIgns2V6"}]},"_npmUser":{"name":"bennycho","email":"bennycho@gmail.com"},"directories":{},"maintainers":[{"name":"bennycho","email":"bennycho@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/github-enterprise-mcp_1.0.4_1768759779037_0.9268944090100089"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-18T17:30:50.617Z","modified":"2026-01-18T18:09:39.277Z","1.0.0":"2026-01-18T17:30:50.853Z","1.0.1":"2026-01-18T17:49:46.602Z","1.0.2":"2026-01-18T17:56:53.794Z","1.0.3":"2026-01-18T18:06:57.168Z","1.0.4":"2026-01-18T18:09:39.170Z"},"bugs":{"url":"https://github.com/ddukbg/github-enterprise-mcp/issues"},"author":{"name":"ddukbg"},"license":"ISC","homepage":"https://github.com/ddukbg/github-enterprise-mcp","keywords":["mcp","github","enterprise","llm","ai","claude","cursor","model context protocol","issue tracking","pull request","git","repository","workflow"],"repository":{"type":"git","url":"git+https://github.com/ddukbg/github-enterprise-mcp.git"},"description":"MCP server for GitHub Enterprise API integration with Cursor, enabling AI access to repositories, issues, PRs and workflows","maintainers":[{"name":"bennycho","email":"bennycho@gmail.com"}],"readme":"\n[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/containerelic-github-enterprise-mcp-badge.png)](https://mseep.ai/app/containerelic-github-enterprise-mcp)\n\n[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/ddukbg/github-enterprise-mcp)](https://archestra.ai/mcp-catalog/ddukbg__github-enterprise-mcp)\n\n# GitHub Enterprise MCP Server\n\n![image](https://github.com/user-attachments/assets/55403caa-c81d-486a-8ec7-3a2532e7545e)\n\n這是一個用於與 GitHub Enterprise API 整合的 MCP (Model Context Protocol) 伺服器。此伺服器提供 MCP 介面，讓您能輕鬆地在 Cursor 中存取 GitHub Enterprise 的儲存庫資訊、Issues、PR 等內容。\n\n## 相容性 (Compatibility)\n\n本專案主要是為 GitHub Enterprise Server 環境設計，但也適用於：\n\n- GitHub.com\n- GitHub Enterprise Cloud\n\n> **注意**：某些企業特定功能（如授權資訊和企業統計數據）在 GitHub.com 或 GitHub Enterprise Cloud 上無法運作。\n\n## 主要功能 (Key Features)\n\n- 從 GitHub Enterprise 實例檢索儲存庫列表\n- 獲取詳細的儲存庫資訊\n- 列出儲存庫分支\n- 查看檔案和目錄內容\n- 管理 Issues 和 Pull Requests (PR)\n- 儲存庫管理（建立、更新、刪除）\n- GitHub Actions 工作流程 (Workflows) 管理\n- 使用者管理（列出、建立、更新、刪除、暫停/恢復使用者）\n- 存取企業統計數據\n- 增強的錯誤處理和友善的回應格式\n\n## 開始使用 (Getting Started)\n\n### 先決條件 (Prerequisites)\n\n- Node.js 18 或更高版本\n- 能夠存取 GitHub Enterprise 實例\n- 個人存取權杖 (Personal Access Token, PAT)\n\n### Docker 安裝與設定\n\n#### 選項 1：使用 Docker 執行\n\n1. 建置 Docker 映像檔：\n\n    ```bash\n    docker build -t github-enterprise-mcp .\n    ```\n\n2. 使用環境變數執行 Docker 容器：\n\n    ```bash\n    docker run -p 3000:3000 \\\n      -e GITHUB_TOKEN=\"your_github_token\" \\\n      -e GITHUB_ENTERPRISE_URL=\"https://github.your-company.com/api/v3\" \\\n      -e DEBUG=true \\\n      github-enterprise-mcp\n    ```\n\n> **注意**：Dockerfile 預設配置為使用 `--transport http` 執行。如果需要更改此設定，您可以覆蓋該命令：\n\n```bash\ndocker run -p 3000:3000 \\\n  -e GITHUB_TOKEN=\"your_github_token\" \\\n  -e GITHUB_ENTERPRISE_URL=\"https://github.your-company.com/api/v3\" \\\n  -e DEBUG=true \\\n  github-enterprise-mcp node dist/index.js --transport http --debug\n```\n\n#### 選項 2：使用 Docker Compose\n\n1. 在專案根目錄建立一個 `.env` 檔案，並填入所需的環境變數：\n\n    ```shell\n    GITHUB_ENTERPRISE_URL=https://github.your-company.com/api/v3\n    GITHUB_TOKEN=your_github_token\n    DEBUG=true\n    ```\n\n2. 使用 Docker Compose 啟動容器：\n\n    ```bash\n    docker-compose up -d\n    ```\n\n3. 查看日誌：\n\n    ```bash\n    docker-compose logs -f\n    ```\n\n4. 停止容器：\n\n    ```bash\n    docker-compose down\n    ```\n\n### 安裝與設定 (Installation and Setup)\n\n#### 本地開發（使用並行模式）\n\n此方法推薦用於需要自動重新編譯和伺服器重啟的活躍開發過程：\n\n1. 複製儲存庫並安裝所需套件：\n\n    ```bash\n    git clone https://github.com/ddukbg/github-enterprise-mcp.git\n    cd github-enterprise-mcp\n    npm install\n    ```\n\n2. 執行開發伺服器：\n\n    ```bash\n    export GITHUB_TOKEN=\"your_github_token\"\n    export GITHUB_ENTERPRISE_URL=\"https://github.your-company.com/api/v3\"\n    npm run dev\n    ```\n\n    這將會：\n    - 當檔案變更時自動編譯 TypeScript 程式碼\n    - 當編譯後的檔案更新時重新啟動伺服器\n    - 以 HTTP 模式執行伺服器以進行基於 URL 的連接\n\n3. 如下所述使用 URL 模式連接到 Cursor\n\n### 生產環境安裝與設定\n\n#### 選項 1：使用 URL 模式（推薦用於本地開發）\n\n此方法最穩定，推薦用於本地開發或測試：\n\n1. 複製儲存庫並安裝所需套件：\n\n    ```bash\n    git clone https://github.com/ddukbg/github-enterprise-mcp.git\n    cd github-enterprise-mcp\n    npm install\n    ```\n\n2. 建置專案：\n\n    ```bash\n    npm run build\n    chmod +x dist/index.js\n    ```\n\n3. 執行伺服器：\n\n    ```bash\n    export GITHUB_TOKEN=\"your_github_token\"\n    export GITHUB_ENTERPRISE_URL=\"https://github.your-company.com/api/v3\"\n    node dist/index.js --transport http --debug\n    ```\n\n4. 使用 URL 模式連接到 Cursor：\n   - 將以下內容新增到您的 Cursor `.cursor/mcp.json` 檔案中：\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"github-enterprise\": {\n         \"url\": \"http://localhost:3000/sse\"\n       }\n     }\n   }\n   ```\n\n#### 選項 2：安裝為全域指令 (npm link)\n\n此方法適用於本地開發：\n\n```bash\n# 複製儲存庫後\ngit clone https://github.com/ddukbg/github-enterprise-mcp.git\ncd github-enterprise-mcp\n\n# 安裝所需套件\nnpm install\n\n# 建置\nnpm run build\nchmod +x dist/index.js\n\n# 全域連結\nnpm link\n\n# 作為全域指令執行\nexport GITHUB_TOKEN=\"your_github_token\"\nexport GITHUB_ENTERPRISE_URL=\"https://github.your-company.com/api/v3\"\ngithub-enterprise-mcp --transport=http --debug\n```\n\n#### 選項 3：使用 npx（當套件已發布時）\n\n如果套件已發布到公共 npm 註冊表：\n\n```bash\nnpx @bennycho/github-enterprise-mcp --token=your_github_token --github-enterprise-url=https://github.your-company.com/api/v3\n```\n\n## 與 AI 工具整合 (Integration with AI Tools)\n\n### Claude Desktop\n\n將以下內容新增到您的 `claude_desktop_config.json`：\n\n```json\n{\n  \"mcpServers\": {\n    \"github-enterprise\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bennycho/github-enterprise-mcp\", \"--token=YOUR_GITHUB_TOKEN\", \"--github-enterprise-url=YOUR_GITHUB_ENTERPRISE_URL\"]\n    }\n  }\n}\n```\n\n請將 `YOUR_GITHUB_TOKEN` 和 `YOUR_GITHUB_ENTERPRISE_URL` 替換為您的實際值。\n\n### Cursor\n\n#### 推薦：URL 模式（最穩定）\n\n為了在 Cursor 中獲得最可靠的操作體驗，建議使用 URL 模式：\n\n1. 在單獨的終端機視窗中啟動伺服器：\n\n   ```bash\n   cd /path/to/github-enterprise-mcp\n   GITHUB_ENTERPRISE_URL=\"https://github.your-company.com/api/v3\" GITHUB_TOKEN=\"your_github_token\" node dist/index.js --transport http\n   ```\n\n2. 設定 Cursor 的 MCP 設定：\n   - 開啟 Cursor 並前往 **Settings (設定)**\n   - 導航至 **AI > MCP Servers**\n   - 編輯您的 `.cursor/mcp.json` 檔案：\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"github-enterprise\": {\n         \"url\": \"http://localhost:3000/sse\"\n       }\n     }\n   }\n   ```\n\n3. 重啟 Cursor 以套用變更\n\n#### 替代方案：Command 模式\n\n或者，您可以將 Cursor 設定為使用 Command 模式，儘管 URL 模式更為可靠：\n\n1. 開啟 Cursor 並前往 **Settings (設定)**\n2. 導航至 **AI > MCP Servers**\n3. 點擊 **Add MCP Server (新增 MCP 伺服器)**\n4. 輸入以下詳細資訊：\n   - **Name**: GitHub Enterprise\n   - **Command**: `npx`\n   - **Arguments**: `@bennycho/github-enterprise-mcp`\n   - **Environment Variables**:\n     - `GITHUB_ENTERPRISE_URL`: 您的 GitHub Enterprise API URL\n     - `GITHUB_TOKEN`: 您的 GitHub 個人存取權杖 (PAT)\n\n或者，您可以手動編輯 `.cursor/mcp.json` 檔案以包含：\n\n```json\n{\n  \"mcpServers\": {\n    \"github-enterprise\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"@bennycho/github-enterprise-mcp\"\n      ],\n      \"env\": {\n        \"GITHUB_ENTERPRISE_URL\": \"https://github.your-company.com/api/v3\",\n        \"GITHUB_TOKEN\": \"your_github_token\"\n      }\n    }\n  }\n}\n```\n\n## 語言設定 (Language Configuration)\n\n此 MCP 伺服器支援英文和韓文。您可以使用以下方式設定語言：\n\n### 環境變數\n\n```bash\n# 設定語言為韓文\nexport LANGUAGE=ko\n\n# 或者在 .env 檔案中\nLANGUAGE=ko\n```\n\n### 命令列參數\n\n```bash\n# 設定語言為韓文\nnode dist/index.js --language ko\n```\n\n如果未指定，預設語言為英文。\n\n## HTTP 模式下的其他選項\n\n- `--debug`: 啟用除錯日誌\n- `--github-enterprise-url <URL>`: 設定 GitHub Enterprise API URL\n- `--token <TOKEN>`: 設定 GitHub 個人存取權杖\n- `--language <LANG>`: 設定語言（en 或 ko，預設值：en）\n\n## 可用的 MCP 工具 (Available MCP Tools)\n\n此 MCP 伺服器提供以下工具：\n\n| 工具名稱 | 描述 | 參數 | 必要的 PAT 權限 |\n|---|---|---|---|\n| `list-repositories` | 檢索使用者或組織的儲存庫列表 | `owner`: 使用者名稱/組織名稱<br>`isOrg`: 是否為組織<br>`type`: 儲存庫類型<br>`sort`: 排序標準<br>`page`: 頁碼<br>`perPage`: 每頁項目數 | `repo` |\n| `get-repository` | 獲取詳細的儲存庫資訊 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱 | `repo` |\n| `list-branches` | 列出儲存庫的分支 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`protected_only`: 是否只顯示受保護的分支<br>`page`: 頁碼<br>`perPage`: 每頁項目數 | `repo` |\n| `get-content` | 檢索檔案或目錄內容 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`path`: 檔案/目錄路徑<br>`ref`: 分支/提交 (選填) | `repo` |\n| `list-pull-requests` | 列出儲存庫中的 Pull Requests | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`state`: PR 狀態篩選<br>`sort`: 排序標準<br>`direction`: 排序方向<br>`page`: 頁碼<br>`per_page`: 每頁項目數 | `repo` |\n| `get-pull-request` | 獲取 Pull Request 詳情 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`pull_number`: Pull Request 編號 | `repo` |\n| `create-pull-request` | 建立新的 Pull Request | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`title`: PR 標題<br>`head`: Head 分支<br>`base`: Base 分支<br>`body`: PR 描述<br>`draft`: 建立為草稿 PR | `repo` |\n| `merge-pull-request` | 合併 Pull Request | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`pull_number`: Pull Request 編號<br>`merge_method`: 合併方式<br>`commit_title`: 提交標題<br>`commit_message`: 提交訊息 | `repo` |\n| `list-issues` | 列出儲存庫中的 Issues | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`state`: Issue 狀態篩選<br>`sort`: 排序標準<br>`direction`: 排序方向<br>`page`: 頁碼<br>`per_page`: 每頁項目數 | `repo` |\n| `get-issue` | 獲取 Issue 詳情 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`issue_number`: Issue 編號 | `repo` |\n| `list-issue-comments` | 列出 Issue 或 Pull Request 的留言 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`issue_number`: Issue/PR 編號<br>`page`: 頁碼<br>`per_page`: 每頁項目數 | `repo` |\n| `create-issue` | 建立新的 Issue | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`title`: Issue 標題<br>`body`: Issue 內容<br>`labels`: 標籤名稱陣列<br>`assignees`: 被指派者登入帳號陣列<br>`milestone`: 里程碑 ID | `repo` |\n| `create-repository` | 建立新的儲存庫 | `name`: 儲存庫名稱<br>`description`: 儲存庫描述<br>`private`: 是否私人<br>`auto_init`: 使用 README 初始化<br>`gitignore_template`: 新增 .gitignore<br>`license_template`: 新增授權條款<br>`org`: 組織名稱 | `repo` |\n| `update-repository` | 更新儲存庫設定 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`description`: 新描述<br>`private`: 變更隱私設定<br>`default_branch`: 變更預設分支<br>`has_issues`: 啟用/停用 issues<br>`has_projects`: 啟用/停用 projects<br>`has_wiki`: 啟用/停用 wiki<br>`archived`: 封存/取消封存 | `repo` |\n| `delete-repository` | 刪除儲存庫 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`confirm`: 確認 (必須為 true) | `delete_repo` |\n| `list-workflows` | 列出 GitHub Actions 工作流程 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`page`: 頁碼<br>`perPage`: 每頁項目數 | `actions:read` |\n| `list-workflow-runs` | 列出工作流程執行記錄 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`workflow_id`: 工作流程 ID/檔名<br>`branch`: 依分支篩選<br>`status`: 依狀態篩選<br>`page`: 頁碼<br>`perPage`: 每頁項目數 | `actions:read` |\n| `trigger-workflow` | 觸發工作流程 | `owner`: 儲存庫擁有者<br>`repo`: 儲存庫名稱<br>`workflow_id`: 工作流程 ID/檔名<br>`ref`: Git 參照<br>`inputs`: 工作流程輸入 | `actions:write` |\n| `get-license-info` | 獲取 GitHub Enterprise 授權資訊 | - | **需要 site_admin (管理員) 帳號** |\n| `get-enterprise-stats` | 獲取 GitHub Enterprise 系統統計數據 | - | **需要 site_admin (管理員) 帳號** |\n\n> **注意**：對於企業特定工具（`get-license-info` 和 `get-enterprise-stats`），需要具有 **網站管理員 (site administrator)** 權限的使用者。建議使用 Classic Personal Access Token，因為 Fine-grained tokens 可能不支援這些企業級權限。\n\n## 在 Cursor 中使用工具\n\n設定好 MCP 伺服器並配置 Cursor 連接後，您可以在 Cursor 的 AI 聊天中直接使用 GitHub Enterprise 工具。以下是一些範例：\n\n### 列出儲存庫\n\n```js\nmcp_github_enterprise_list_repositories(owner=\"octocat\")\n```\n\n### 獲取儲存庫資訊\n\n```js\nmcp_github_enterprise_get_repository(owner=\"octocat\", repo=\"hello-world\")\n```\n\n### 列出 Pull Requests\n\n```js\nmcp_github_enterprise_list_pull_requests(owner=\"octocat\", repo=\"hello-world\", state=\"open\")\n```\n\n### 管理 Issues\n\n```js\n# 列出 issues\nmcp_github_enterprise_list_issues(owner=\"octocat\", repo=\"hello-world\", state=\"all\")\n# 獲取 issue 詳情\nmcp_github_enterprise_get_issue(owner=\"octocat\", repo=\"hello-world\", issue_number=1)\n\n# 獲取 issue/PR 留言\nmcp_github_enterprise_list_issue_comments(owner=\"octocat\", repo=\"hello-world\", issue_number=1)\n\n\n# 建立新的 issue\nmcp_github_enterprise_create_issue(\n  owner=\"octocat\", \n  repo=\"hello-world\",\n  title=\"Found a bug\",\n  body=\"Here is a description of the bug\",\n  labels=[\"bug\", \"important\"]\n)\n```\n\n### 使用儲存庫內容\n\n```js\nmcp_github_enterprise_get_content(owner=\"octocat\", repo=\"hello-world\", path=\"README.md\")\n```\n\n### 儲存庫管理\n\n```\n# 建立新的儲存庫\nmcp_github_enterprise_create_repository(\n  name=\"new-project\",\n  description=\"This is a new project\",\n  private=true,\n  auto_init=true\n)\n\n# 更新儲存庫設定\nmcp_github_enterprise_update_repository(\n  owner=\"octocat\",\n  repo=\"hello-world\",\n  description=\"Updated description\",\n  has_issues=true\n)\n```\n\n### 使用者管理（僅限 Enterprise）\n\n這些功能專為 GitHub Enterprise Server 環境設計，需要管理員權限：\n\n```js\n# 列出 GitHub Enterprise 實例中的所有使用者\nmcp_github_enterprise_list_users(filter=\"active\", per_page=100)\n\n# 獲取特定使用者的詳細資訊\nmcp_github_enterprise_get_user(username=\"octocat\")\n\n# 建立新使用者 (僅限 Enterprise)\nmcp_github_enterprise_create_user(\n  login=\"newuser\",\n  email=\"newuser@example.com\",\n  name=\"New User\",\n  company=\"ACME Inc.\"\n)\n\n# 更新使用者資訊 (僅限 Enterprise)\nmcp_github_enterprise_update_user(\n  username=\"octocat\",\n  email=\"updated-email@example.com\",\n  location=\"San Francisco\"\n)\n\n# 暫停使用者 (僅限 Enterprise)\nmcp_github_enterprise_suspend_user(\n  username=\"octocat\",\n  reason=\"Violation of terms of service\"\n)\n\n# 恢復使用者 (僅限 Enterprise)\nmcp_github_enterprise_unsuspend_user(username=\"octocat\")\n\n# 列出使用者所屬的組織\nmcp_github_enterprise_list_user_orgs(username=\"octocat\")\n```\n\n## API 改進 (API Improvements)\n\n- 靈活的 API URL 配置（支援各種環境變數和命令列參數）\n- 增強的錯誤處理和逾時管理\n- 友善的回應格式和訊息\n\n## 貢獻 (Contributing)\n\n歡迎提交貢獻！請隨意提交 Pull Request。\n\n## 授權 (License)\n\nISC\n","readmeFilename":"README.md"}