diff --git a/README.md b/README.md index d0ec24d..0553b97 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - [What is Gitea?](#what-is-gitea) - [What is MCP?](#what-is-mcp) - [🚧 Installation](#-installation) + - [Usage with Claude Code](#usage-with-claude-code) - [Usage with VS Code](#usage-with-vs-code) - [📥 Download the official binary release](#-download-the-official-binary-release) - [🔧 Build from Source](#-build-from-source) @@ -32,6 +33,17 @@ Model Context Protocol (MCP) is a protocol that allows for the integration of va ## 🚧 Installation +### Usage with Claude Code + +This method uses `go run` and requires [Go](https://go.dev) to be installed. + +```bash +claude mcp add --transport stdio gitea \ + --env GITEA_ACCESS_TOKEN=token \ + --env GITEA_HOST=https://gitea.com \ + -- go run gitea.com/gitea/gitea-mcp@latest -t stdio +``` + ### Usage with VS Code For quick installation, use one of the one-click install buttons at the top of this README. diff --git a/README.zh-cn.md b/README.zh-cn.md index e08ec7c..5aa705d 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -13,6 +13,7 @@ - [什么是 Gitea?](#什么是-gitea) - [什么是 MCP?](#什么是-mcp) - [🚧 安装](#-安装) + - [在 Claude Code 中使用](#在-claude-code-中使用) - [在 VS Code 中使用](#在-vs-code-中使用) - [📥 下载官方二进制版本](#-下载官方二进制版本) - [🔧 从源码构建](#-从源码构建) @@ -32,6 +33,17 @@ Model Context Protocol (MCP) 是一种协议,允许通过聊天界面整合各 ## 🚧 安装 +### 在 Claude Code 中使用 + +此方式使用 `go run`,需要安装 [Go](https://go.dev)。 + +```bash +claude mcp add --transport stdio gitea \ + --env GITEA_ACCESS_TOKEN=token \ + --env GITEA_HOST=https://gitea.com \ + -- go run gitea.com/gitea/gitea-mcp@latest -t stdio +``` + ### 在 VS Code 中使用 要快速安装,请使用本 README 顶部的安装按钮。 diff --git a/README.zh-tw.md b/README.zh-tw.md index e471956..6da2368 100644 --- a/README.zh-tw.md +++ b/README.zh-tw.md @@ -13,6 +13,7 @@ - [什麼是 Gitea?](#什麼是-gitea) - [什麼是 MCP?](#什麼是-mcp) - [🚧 安裝](#-安裝) + - [在 Claude Code 中使用](#在-claude-code-中使用) - [在 VS Code 中使用](#在-vs-code-中使用) - [📥 下載官方二進位版本](#-下載官方二進位版本) - [🔧 從原始碼建置](#-從原始碼建置) @@ -32,6 +33,17 @@ Model Context Protocol (MCP) 是一種協議,允許透過聊天介面整合各 ## 🚧 安裝 +### 在 Claude Code 中使用 + +此方式使用 `go run`,需要安裝 [Go](https://go.dev)。 + +```bash +claude mcp add --transport stdio gitea \ + --env GITEA_ACCESS_TOKEN=token \ + --env GITEA_HOST=https://gitea.com \ + -- go run gitea.com/gitea/gitea-mcp@latest -t stdio +``` + ### 在 VS Code 中使用 欲快速安裝,請使用本 README 頂部的安裝按鈕。