Files
gitea-mcp/README.md
T
chaim 842502ca5a feat: auto-install missing prerequisites (go, git, jq)
Install script now detects missing dependencies and installs them
automatically via apt/dnf/yum/pacman/apk/brew. Go is installed
directly from go.dev if missing or too old.

Also added note about global config path in README.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 18:06:54 +00:00

136 lines
4.8 KiB
Markdown

# Gitea MCP Server
שרת MCP (Model Context Protocol) לגיטאה — מאפשר ניהול מלא של ריפוזיטוריות, issues, pull requests, wikis, actions ועוד דרך Claude Code וכלי MCP אחרים.
**תומך בחיבור לכמה שרתי Gitea במקביל.**
## התקנה מהירה
```bash
curl -fsSL https://gitea.dev.marcus-law.co.il/Chaim/gitea-mcp/raw/branch/main/install.sh | bash
```
הסקריפט:
- משכפל את הריפו ל-`~/.gitea-mcp`
- בונה בינארי ומתקין ל-`$GOPATH/bin`
- מגדיר MCP server גלובלי ב-`~/.claude/settings.json`
- מאפשר הוספת שרתים נוספים באופן אינטראקטיבי
- מוחק הגדרות כפולות מקבצי `.mcp.json` ברמת פרויקט
### דרישות מוקדמות
- [Go](https://go.dev) 1.24+
- git
- jq
### שדרוג
אותה פקודה בדיוק — הסקריפט מזהה התקנה קיימת ומעדכן:
```bash
curl -fsSL https://gitea.dev.marcus-law.co.il/Chaim/gitea-mcp/raw/branch/main/install.sh | bash
```
## הגדר ידנית
> **חשוב:** כדי שההגדרה תהיה **גלובלית** (זמינה בכל פרויקט), יש לכתוב אותה ב-`~/.claude/settings.json` תחת `mcpServers`.
> אל תשתמשו ב-`.mcp.json` ברמת פרויקט — זה יגרום לכפילויות ויעבוד רק בתיקייה הספציפית.
### שרת יחיד
```json
{
"mcpServers": {
"gitea-dev": {
"command": "gitea-mcp",
"args": ["-t", "stdio", "--host", "https://gitea.example.com"],
"env": {
"GITEA_ACCESS_TOKEN": "<token>"
}
}
}
}
```
### כמה שרתים
הוסף את `GITEA_SERVERS` כ-JSON object עם שם → `{host, token, insecure}`:
```json
{
"mcpServers": {
"gitea-dev": {
"command": "gitea-mcp",
"args": ["-t", "stdio", "--host", "https://gitea.example.com"],
"env": {
"GITEA_ACCESS_TOKEN": "<default-token>",
"GITEA_SERVERS": "{\"prod\":{\"host\":\"https://gitea.prod.example.com\",\"token\":\"<prod-token>\"},\"staging\":{\"host\":\"https://staging.example.com\",\"token\":\"<staging-token>\",\"insecure\":true}}"
}
}
}
}
```
כל כלי מקבל פרמטר `server` אופציונלי:
```
list_my_repos # ברירת מחדל
list_my_repos(server: "prod") # שרת ספציפי
list_servers # הצג שרתים מוגדרים
```
## משתני סביבה
| משתנה | תיאור |
|---|---|
| `GITEA_ACCESS_TOKEN` | טוקן גישה לשרת ברירת המחדל |
| `GITEA_HOST` | כתובת שרת ברירת המחדל |
| `GITEA_SERVERS` | JSON object של שרתים נוספים |
| `GITEA_READONLY` | `true` להצגת כלי קריאה בלבד |
| `GITEA_DEBUG` | `true` למצב debug |
| `GITEA_INSECURE` | `true` לדלג על בדיקת TLS |
| `MCP_MODE` | `stdio` (ברירת מחדל) או `http` |
## כלים זמינים
השרת מספק 60+ כלי MCP:
| תחום | כלים |
|---|---|
| משתמש | `get_me`, `get_user_orgs` |
| ריפוזיטוריות | `create_repo`, `fork_repo`, `list_my_repos`, `list_org_repos`, `get_repo`, `repo_write`, `list_forks` |
| ענפים | `list_branches`, `create_branch`, `delete_branch`, `branch_protection_read/write` |
| תגיות | `list_tags`, `get_tag`, `create_tag`, `delete_tag` |
| קבצים | `get_file_contents`, `get_dir_contents`, `create_or_update_file`, `delete_file`, `get_repository_tree` |
| קומיטים | `list_commits`, `get_commit`, `get_compare` |
| Issues | `list_issues`, `issue_read`, `issue_write`, `search_issues` |
| Pull Requests | `list_pull_requests`, `pull_request_read`, `pull_request_write`, `pull_request_review_write` |
| Labels | `label_read`, `label_write` |
| Milestones | `milestone_read`, `milestone_write` |
| Releases | `list_releases`, `get_release`, `get_latest_release`, `create_release`, `delete_release` |
| Wiki | `wiki_read`, `wiki_write` |
| מעקב זמן | `timetracking_read`, `timetracking_write` |
| Actions | `actions_run_read`, `actions_run_write`, `actions_config_read`, `actions_config_write` |
| התראות | `notification_read`, `notification_write` |
| ארגונים | `org_read`, `org_write` |
| Webhooks | `webhook_read`, `webhook_write` |
| Collaborators | `collaborator_read`, `collaborator_write` |
| Deploy Keys | `deploy_key_read`, `deploy_key_write` |
| Topics | `topic_read`, `topic_write` |
| חיפוש | `search_users`, `search_repos`, `search_org_teams` |
| שרת | `get_gitea_mcp_server_version`, `list_servers` |
## פיתוח
```bash
make build # בנייה
make install # בנייה + התקנה ל-GOPATH/bin
make dev # hot reload (דורש air)
make clean # ניקוי
go test ./... # טסטים
```
## רישיון
MIT