@mokoconsulting/mcp-mokogitea-api 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +94 -0
- package/.gitmessage +9 -0
- package/.mokogitea/ISSUE_TEMPLATE/adr.md +110 -0
- package/.mokogitea/ISSUE_TEMPLATE/bug_report.md +48 -0
- package/.mokogitea/ISSUE_TEMPLATE/config.yml +18 -0
- package/.mokogitea/ISSUE_TEMPLATE/documentation.md +52 -0
- package/.mokogitea/ISSUE_TEMPLATE/enterprise_support.md +85 -0
- package/.mokogitea/ISSUE_TEMPLATE/feature_request.md +51 -0
- package/.mokogitea/ISSUE_TEMPLATE/firewall-request.md +190 -0
- package/.mokogitea/ISSUE_TEMPLATE/mcp_api_integration.md +48 -0
- package/.mokogitea/ISSUE_TEMPLATE/mcp_connection_issue.md +67 -0
- package/.mokogitea/ISSUE_TEMPLATE/mcp_tool_request.md +49 -0
- package/.mokogitea/ISSUE_TEMPLATE/question.md +82 -0
- package/.mokogitea/ISSUE_TEMPLATE/rfc.md +126 -0
- package/.mokogitea/ISSUE_TEMPLATE/security.md +51 -0
- package/.mokogitea/ISSUE_TEMPLATE/version.md +24 -0
- package/.mokogitea/auto-assign.yml +76 -0
- package/.mokogitea/auto-dev-issue.yml +207 -0
- package/.mokogitea/auto-release.yml +337 -0
- package/.mokogitea/branch-protection.yml +251 -0
- package/.mokogitea/changelog-validation.yml +101 -0
- package/.mokogitea/codeql-analysis.yml +115 -0
- package/.mokogitea/copilot-agent.yml +44 -0
- package/.mokogitea/deploy-demo.yml +734 -0
- package/.mokogitea/deploy-dev.yml +700 -0
- package/.mokogitea/enterprise-firewall-setup.yml +758 -0
- package/.mokogitea/manifest.xml +25 -0
- package/.mokogitea/mcp-auto-release.yml +278 -0
- package/.mokogitea/mcp-build-test.yml +65 -0
- package/.mokogitea/mcp-sdk-check.yml +109 -0
- package/.mokogitea/mcp-tool-inventory.yml +61 -0
- package/.mokogitea/pr-branch-check.yml +90 -0
- package/.mokogitea/repository-cleanup.yml +525 -0
- package/.mokogitea/standards-compliance.yml +2614 -0
- package/.mokogitea/sync-version-on-merge.yml +133 -0
- package/.mokogitea/workflows/auto-assign.yml +76 -0
- package/.mokogitea/workflows/auto-bump.yml +66 -0
- package/.mokogitea/workflows/auto-dev-issue.yml +207 -0
- package/.mokogitea/workflows/auto-release.yml +341 -0
- package/.mokogitea/workflows/branch-cleanup.yml +48 -0
- package/.mokogitea/workflows/cascade-dev.yml +10 -0
- package/.mokogitea/workflows/changelog-validation.yml +101 -0
- package/.mokogitea/workflows/ci-generic.yml +204 -0
- package/.mokogitea/workflows/cleanup.yml +87 -0
- package/.mokogitea/workflows/codeql-analysis.yml +115 -0
- package/.mokogitea/workflows/copilot-agent.yml +44 -0
- package/.mokogitea/workflows/deploy-manual.yml +126 -0
- package/.mokogitea/workflows/enterprise-firewall-setup.yml +758 -0
- package/.mokogitea/workflows/gitleaks.yml +96 -0
- package/.mokogitea/workflows/issue-branch.yml +73 -0
- package/.mokogitea/workflows/mcp-auto-release.yml +280 -0
- package/.mokogitea/workflows/mcp-build-test.yml +65 -0
- package/.mokogitea/workflows/mcp-sdk-check.yml +109 -0
- package/.mokogitea/workflows/mcp-tool-inventory.yml +61 -0
- package/.mokogitea/workflows/notify.yml +70 -0
- package/.mokogitea/workflows/npm-publish.yml +51 -0
- package/.mokogitea/workflows/pr-check.yml +508 -0
- package/.mokogitea/workflows/pre-release.yml +11 -0
- package/.mokogitea/workflows/repo-health.yml +711 -0
- package/.mokogitea/workflows/repository-cleanup.yml +525 -0
- package/.mokogitea/workflows/security-audit.yml +82 -0
- package/.mokogitea/workflows/standards-compliance.yml +2614 -0
- package/.mokogitea/workflows/sync-version-on-merge.yml +130 -0
- package/.mokogitea/workflows/update-server.yml +312 -0
- package/CHANGELOG.md +145 -0
- package/CLAUDE.md +43 -0
- package/CONTRIBUTING.md +161 -0
- package/README.md +286 -0
- package/SECURITY.md +91 -0
- package/automation/ci-issue-reporter.sh +237 -0
- package/config.example.json +13 -0
- package/dist/client.d.ts +15 -0
- package/dist/client.js +104 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.js +48 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1119 -0
- package/dist/types.d.ts +20 -0
- package/dist/types.js +16 -0
- package/package.json +34 -0
- package/scripts/setup.mjs +40 -0
- package/src/client.ts +120 -0
- package/src/config.ts +58 -0
- package/src/index.ts +1712 -0
- package/src/types.ts +37 -0
- package/tsconfig.json +19 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Contributing to Moko Consulting Projects
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing. All Moko Consulting repositories follow this universal workflow and version policy.
|
|
4
|
+
|
|
5
|
+
## Branching Workflow
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge──> main
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Step by step
|
|
12
|
+
|
|
13
|
+
1. **Create a feature branch** from `dev`:
|
|
14
|
+
```bash
|
|
15
|
+
git checkout dev && git pull
|
|
16
|
+
git checkout -b feature/my-change
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **Work and commit** on your feature branch. Push to origin.
|
|
20
|
+
|
|
21
|
+
3. **Open a PR**: `feature/my-change` → `dev`. After review and checks, merge it.
|
|
22
|
+
|
|
23
|
+
4. **When ready for release**, open a **draft PR**: `dev` → `main`.
|
|
24
|
+
- This automatically renames the source branch to `rc` (release candidate)
|
|
25
|
+
- An RC pre-release is built and uploaded
|
|
26
|
+
|
|
27
|
+
5. **Alpha and beta branches** are created by manually renaming the branch before the RC stage:
|
|
28
|
+
- Rename `dev` to `alpha` for early testing → alpha pre-release is built
|
|
29
|
+
- Rename `alpha` to `beta` for feature-complete testing → beta pre-release is built
|
|
30
|
+
- When the draft PR is created, the branch is renamed to `rc`
|
|
31
|
+
|
|
32
|
+
6. **Once PR checks pass** on the `rc` branch, mark the PR as ready and merge to `main`.
|
|
33
|
+
|
|
34
|
+
7. **Merging to main** triggers the stable release pipeline:
|
|
35
|
+
- Minor version bump (e.g., `02.09.xx` → `02.10.00`)
|
|
36
|
+
- Stability suffix stripped (clean version)
|
|
37
|
+
- Gitea release created with ZIP/tar.gz packages
|
|
38
|
+
- `updates.xml` updated (Joomla extensions)
|
|
39
|
+
- `dev` branch recreated from `main`
|
|
40
|
+
|
|
41
|
+
### Branch summary
|
|
42
|
+
|
|
43
|
+
| Branch | Purpose | Created by |
|
|
44
|
+
|--------|---------|-----------|
|
|
45
|
+
| `feature/*` | New features and fixes | Developer |
|
|
46
|
+
| `dev` | Integration branch | Auto-recreated after release |
|
|
47
|
+
| `alpha` | Alpha pre-release testing | Manual rename from `dev` |
|
|
48
|
+
| `beta` | Beta pre-release testing | Manual rename from `alpha` |
|
|
49
|
+
| `rc` | Release candidate | Auto-renamed on draft PR to main |
|
|
50
|
+
| `main` | Stable releases | Protected, merge only |
|
|
51
|
+
| `version/XX.YY.ZZ` | Archived release snapshots | Auto-created by CI |
|
|
52
|
+
|
|
53
|
+
### Protected branches
|
|
54
|
+
|
|
55
|
+
| Branch | Direct push | Merge via |
|
|
56
|
+
|--------|------------|-----------|
|
|
57
|
+
| `main` | Blocked (CI bot whitelisted) | PR merge only |
|
|
58
|
+
| `dev` | Blocked (CI bot whitelisted) | PR merge from feature/* |
|
|
59
|
+
| `rc` | Blocked (CI bot whitelisted) | Auto-created on draft PR |
|
|
60
|
+
| `alpha` | Blocked (CI bot whitelisted) | Manual rename |
|
|
61
|
+
| `beta` | Blocked (CI bot whitelisted) | Manual rename |
|
|
62
|
+
| `feature/*` | Open | N/A (source branch) |
|
|
63
|
+
|
|
64
|
+
## Version Policy
|
|
65
|
+
|
|
66
|
+
### Format
|
|
67
|
+
|
|
68
|
+
All versions use `XX.YY.ZZ` — three two-digit segments, zero-padded:
|
|
69
|
+
|
|
70
|
+
- **XX** — Major version (breaking changes)
|
|
71
|
+
- **YY** — Minor version (new features, bumped on release to main)
|
|
72
|
+
- **ZZ** — Patch version (auto-incremented on every push to dev/feature branches)
|
|
73
|
+
|
|
74
|
+
Rollover: patch `99` → `00` increments minor; minor `99` → `00` increments major.
|
|
75
|
+
|
|
76
|
+
### Stability suffixes
|
|
77
|
+
|
|
78
|
+
Each branch appends a suffix to indicate stability:
|
|
79
|
+
|
|
80
|
+
| Branch | Suffix | Example |
|
|
81
|
+
|--------|--------|---------|
|
|
82
|
+
| `main` | (none) | `02.09.00` |
|
|
83
|
+
| `dev` | `-dev` | `02.09.01-dev` |
|
|
84
|
+
| `feature/*` | `-dev` | `02.09.01-dev` |
|
|
85
|
+
| `alpha` | `-alpha` | `02.09.01-alpha` |
|
|
86
|
+
| `beta` | `-beta` | `02.09.01-beta` |
|
|
87
|
+
| `rc` | `-rc` | `02.09.01-rc` |
|
|
88
|
+
|
|
89
|
+
### Auto version bump
|
|
90
|
+
|
|
91
|
+
On every push to `dev`, `feature/*`, or `patch/*`:
|
|
92
|
+
|
|
93
|
+
1. Patch version incremented
|
|
94
|
+
2. Stability suffix `-dev` applied
|
|
95
|
+
3. All version-bearing files updated (manifests, CHANGELOG, PHP headers, etc.)
|
|
96
|
+
4. Commit created with `[skip ci]` to avoid loops
|
|
97
|
+
|
|
98
|
+
### Release version flow
|
|
99
|
+
|
|
100
|
+
Version bumps happen at specific release events:
|
|
101
|
+
|
|
102
|
+
| Event | Bump | Example |
|
|
103
|
+
|-------|------|---------|
|
|
104
|
+
| Feature merged to dev | Patch bump after dev release | `02.09.01-dev` → release → `02.09.02-dev` |
|
|
105
|
+
| Dev promoted to RC | Minor bump | `02.09.02-dev` → `02.10.00-rc` |
|
|
106
|
+
| RC merged to main | Minor bump | `02.10.00-rc` → `02.11.00` (stable) |
|
|
107
|
+
| Dev recreated from main | Patch bump | `02.11.00` → `02.11.01-dev` |
|
|
108
|
+
|
|
109
|
+
### Release stream copies
|
|
110
|
+
|
|
111
|
+
When a higher-stability release is published, copies are created for all lesser streams with the same base version:
|
|
112
|
+
|
|
113
|
+
- **RC `02.10.00-rc`** also creates: `02.10.00-dev`, `02.10.00-alpha`, `02.10.00-beta`
|
|
114
|
+
- **Stable `02.11.00`** also creates: `02.11.00-dev`, `02.11.00-alpha`, `02.11.00-beta`, `02.11.00-rc`
|
|
115
|
+
|
|
116
|
+
This ensures Joomla sites on ANY stability channel see the update (Joomla only shows versions higher than what's installed).
|
|
117
|
+
|
|
118
|
+
### Version files
|
|
119
|
+
|
|
120
|
+
The version tools update all files containing version stamps:
|
|
121
|
+
|
|
122
|
+
- `.mokogitea/manifest.xml` (canonical source)
|
|
123
|
+
- Joomla XML manifests (`<version>` tag)
|
|
124
|
+
- `README.md`, `CHANGELOG.md` (`VERSION:` pattern)
|
|
125
|
+
- `package.json`, `pyproject.toml`
|
|
126
|
+
- Any text file with a `VERSION: XX.YY.ZZ` label
|
|
127
|
+
|
|
128
|
+
Files synced from other repos (with a `# REPO:` header) are not touched.
|
|
129
|
+
|
|
130
|
+
## Code Standards
|
|
131
|
+
|
|
132
|
+
- **PHP**: PSR-12, tabs for indentation
|
|
133
|
+
- **Copyright**: all files must include the Moko Consulting copyright header
|
|
134
|
+
- **License**: SPDX identifier `GPL-3.0-or-later` (or as specified per repo)
|
|
135
|
+
- **Attribution**: use `Authored-by: Moko Consulting` in commits, not individual names
|
|
136
|
+
|
|
137
|
+
## Commit Messages
|
|
138
|
+
|
|
139
|
+
Use conventional commit format:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
type(scope): short description
|
|
143
|
+
|
|
144
|
+
Optional body with context.
|
|
145
|
+
|
|
146
|
+
Authored-by: Moko Consulting
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `test`, `ci`
|
|
150
|
+
|
|
151
|
+
Special flags in commit messages:
|
|
152
|
+
- `[skip ci]` — skip all CI workflows
|
|
153
|
+
- `[skip bump]` — skip auto version bump only
|
|
154
|
+
|
|
155
|
+
## Reporting Issues
|
|
156
|
+
|
|
157
|
+
Use the repository's issue tracker with the appropriate template.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
*Moko Consulting <hello@mokoconsulting.tech>*
|
package/README.md
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<!-- Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
2
|
+
SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
|
+
DEFGROUP: gitea-api-mcp.Documentation
|
|
4
|
+
REPO: https://git.mokoconsulting.tech/MokoConsulting/gitea-api-mcp
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# gitea-api-mcp
|
|
8
|
+
|
|
9
|
+
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
10
|
+
[](https://modelcontextprotocol.io)
|
|
11
|
+
[](https://nodejs.org)
|
|
12
|
+
[](https://www.typescriptlang.org)
|
|
13
|
+
|
|
14
|
+
> MCP server for Gitea REST API v1 operations -- 61 tools for complete Gitea instance management from Claude Code and other MCP clients.
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
|
|
18
|
+
- [Background](#background)
|
|
19
|
+
- [Install](#install)
|
|
20
|
+
- [Configuration](#configuration)
|
|
21
|
+
- [Usage](#usage)
|
|
22
|
+
- [Tools](#tools)
|
|
23
|
+
- [Contributing](#contributing)
|
|
24
|
+
- [License](#license)
|
|
25
|
+
- [Revision History](#revision-history)
|
|
26
|
+
|
|
27
|
+
## Background
|
|
28
|
+
|
|
29
|
+
`gitea-api-mcp` is a Model Context Protocol (MCP) server that exposes 61 tools for interacting with the Gitea REST API v1. It supports multiple named connections, allowing you to manage several Gitea instances from a single server. Authentication uses Gitea's native `Authorization: token` header format.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
|
|
35
|
+
- Node.js >= 20.0.0
|
|
36
|
+
- A Gitea instance with API access
|
|
37
|
+
- A Gitea access token (Settings > Applications > Generate Token)
|
|
38
|
+
|
|
39
|
+
### Build from Source
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
git clone https://git.mokoconsulting.tech/MokoConsulting/gitea-api-mcp.git
|
|
43
|
+
cd gitea-api-mcp
|
|
44
|
+
npm install
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Configuration
|
|
49
|
+
|
|
50
|
+
Create `~/.gitea-api-mcp.json`:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"defaultConnection": "moko",
|
|
55
|
+
"connections": {
|
|
56
|
+
"moko": {
|
|
57
|
+
"baseUrl": "https://git.mokoconsulting.tech",
|
|
58
|
+
"token": "your-gitea-access-token",
|
|
59
|
+
"insecure": false
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Config Fields
|
|
66
|
+
|
|
67
|
+
| Field | Type | Required | Description |
|
|
68
|
+
|-------|------|----------|-------------|
|
|
69
|
+
| `baseUrl` | string | Yes | Base URL of your Gitea instance |
|
|
70
|
+
| `token` | string | Yes | Gitea API access token |
|
|
71
|
+
| `insecure` | boolean | No | Skip TLS verification (self-signed certs) |
|
|
72
|
+
|
|
73
|
+
Override the config path with the `GITEA_API_MCP_CONFIG` environment variable.
|
|
74
|
+
|
|
75
|
+
### Multi-Connection Example
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"defaultConnection": "moko",
|
|
80
|
+
"connections": {
|
|
81
|
+
"moko": {
|
|
82
|
+
"baseUrl": "https://git.mokoconsulting.tech",
|
|
83
|
+
"token": "token-for-moko-gitea"
|
|
84
|
+
},
|
|
85
|
+
"github-mirror": {
|
|
86
|
+
"baseUrl": "https://gitea.example.com",
|
|
87
|
+
"token": "token-for-mirror"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Usage
|
|
94
|
+
|
|
95
|
+
### Claude Code Registration
|
|
96
|
+
|
|
97
|
+
Add to your Claude Code MCP config (`~/.claude/claude_desktop_config.json` or project-level `.mcp.json`):
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"gitea-moko": {
|
|
103
|
+
"command": "node",
|
|
104
|
+
"args": ["/path/to/gitea-api-mcp/dist/index.js"]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Multi-Connection Usage in Claude Code
|
|
111
|
+
|
|
112
|
+
When using multiple connections, pass the `connection` parameter to any tool:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Use gitea_repo_get with connection "github-mirror" to get owner/repo details.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
If `connection` is omitted, the `defaultConnection` is used.
|
|
119
|
+
|
|
120
|
+
## Tools
|
|
121
|
+
|
|
122
|
+
### User / Auth (3 tools)
|
|
123
|
+
|
|
124
|
+
| Tool | Description |
|
|
125
|
+
|------|-------------|
|
|
126
|
+
| `gitea_me` | Get the authenticated user info |
|
|
127
|
+
| `gitea_user_orgs` | List organizations the authenticated user belongs to |
|
|
128
|
+
| `gitea_user_repos` | List repositories owned by the authenticated user |
|
|
129
|
+
|
|
130
|
+
### Repositories (8 tools)
|
|
131
|
+
|
|
132
|
+
| Tool | Description |
|
|
133
|
+
|------|-------------|
|
|
134
|
+
| `gitea_repo_get` | Get repository details |
|
|
135
|
+
| `gitea_repo_create` | Create a new repository |
|
|
136
|
+
| `gitea_repo_delete` | Delete a repository |
|
|
137
|
+
| `gitea_repo_edit` | Edit repository settings |
|
|
138
|
+
| `gitea_repo_fork` | Fork a repository |
|
|
139
|
+
| `gitea_repo_search` | Search repositories |
|
|
140
|
+
| `gitea_org_repos` | List repositories in an organization |
|
|
141
|
+
| `gitea_list_connections` | List configured Gitea connections |
|
|
142
|
+
|
|
143
|
+
### File Contents (5 tools)
|
|
144
|
+
|
|
145
|
+
| Tool | Description |
|
|
146
|
+
|------|-------------|
|
|
147
|
+
| `gitea_file_get` | Get file contents from a repository |
|
|
148
|
+
| `gitea_dir_get` | Get directory contents (file listing) from a repository |
|
|
149
|
+
| `gitea_file_create_or_update` | Create or update a file in a repository |
|
|
150
|
+
| `gitea_file_delete` | Delete a file from a repository |
|
|
151
|
+
| `gitea_tree_get` | Get the git tree for a repository (recursive file listing) |
|
|
152
|
+
|
|
153
|
+
### Branches (4 tools)
|
|
154
|
+
|
|
155
|
+
| Tool | Description |
|
|
156
|
+
|------|-------------|
|
|
157
|
+
| `gitea_branches_list` | List branches in a repository |
|
|
158
|
+
| `gitea_branch_get` | Get a specific branch |
|
|
159
|
+
| `gitea_branch_create` | Create a new branch |
|
|
160
|
+
| `gitea_branch_delete` | Delete a branch |
|
|
161
|
+
|
|
162
|
+
### Commits (2 tools)
|
|
163
|
+
|
|
164
|
+
| Tool | Description |
|
|
165
|
+
|------|-------------|
|
|
166
|
+
| `gitea_commits_list` | List commits in a repository |
|
|
167
|
+
| `gitea_commit_get` | Get a specific commit |
|
|
168
|
+
|
|
169
|
+
### Issues (7 tools)
|
|
170
|
+
|
|
171
|
+
| Tool | Description |
|
|
172
|
+
|------|-------------|
|
|
173
|
+
| `gitea_issues_list` | List issues in a repository |
|
|
174
|
+
| `gitea_issue_get` | Get a single issue by number |
|
|
175
|
+
| `gitea_issue_create` | Create a new issue |
|
|
176
|
+
| `gitea_issue_update` | Update an issue |
|
|
177
|
+
| `gitea_issue_comments_list` | List comments on an issue |
|
|
178
|
+
| `gitea_issue_comment_create` | Add a comment to an issue |
|
|
179
|
+
| `gitea_issue_search` | Search issues across all repositories |
|
|
180
|
+
|
|
181
|
+
### Labels (2 tools)
|
|
182
|
+
|
|
183
|
+
| Tool | Description |
|
|
184
|
+
|------|-------------|
|
|
185
|
+
| `gitea_labels_list` | List labels in a repository |
|
|
186
|
+
| `gitea_label_create` | Create a label |
|
|
187
|
+
|
|
188
|
+
### Milestones (2 tools)
|
|
189
|
+
|
|
190
|
+
| Tool | Description |
|
|
191
|
+
|------|-------------|
|
|
192
|
+
| `gitea_milestones_list` | List milestones in a repository |
|
|
193
|
+
| `gitea_milestone_create` | Create a milestone |
|
|
194
|
+
|
|
195
|
+
### Pull Requests (6 tools)
|
|
196
|
+
|
|
197
|
+
| Tool | Description |
|
|
198
|
+
|------|-------------|
|
|
199
|
+
| `gitea_pulls_list` | List pull requests |
|
|
200
|
+
| `gitea_pull_get` | Get a single pull request |
|
|
201
|
+
| `gitea_pull_create` | Create a pull request |
|
|
202
|
+
| `gitea_pull_merge` | Merge a pull request |
|
|
203
|
+
| `gitea_pull_files` | List files changed in a pull request |
|
|
204
|
+
| `gitea_pull_review_create` | Create a pull request review |
|
|
205
|
+
|
|
206
|
+
### Releases (5 tools)
|
|
207
|
+
|
|
208
|
+
| Tool | Description |
|
|
209
|
+
|------|-------------|
|
|
210
|
+
| `gitea_releases_list` | List releases |
|
|
211
|
+
| `gitea_release_get` | Get a single release by ID |
|
|
212
|
+
| `gitea_release_latest` | Get the latest release |
|
|
213
|
+
| `gitea_release_create` | Create a new release |
|
|
214
|
+
| `gitea_release_delete` | Delete a release |
|
|
215
|
+
|
|
216
|
+
### Tags (3 tools)
|
|
217
|
+
|
|
218
|
+
| Tool | Description |
|
|
219
|
+
|------|-------------|
|
|
220
|
+
| `gitea_tags_list` | List tags |
|
|
221
|
+
| `gitea_tag_create` | Create a tag |
|
|
222
|
+
| `gitea_tag_delete` | Delete a tag |
|
|
223
|
+
|
|
224
|
+
### Actions (2 tools)
|
|
225
|
+
|
|
226
|
+
| Tool | Description |
|
|
227
|
+
|------|-------------|
|
|
228
|
+
| `gitea_actions_runs_list` | List workflow runs for a repository |
|
|
229
|
+
| `gitea_actions_run_get` | Get a specific workflow run |
|
|
230
|
+
|
|
231
|
+
### Organizations (3 tools)
|
|
232
|
+
|
|
233
|
+
| Tool | Description |
|
|
234
|
+
|------|-------------|
|
|
235
|
+
| `gitea_org_get` | Get organization details |
|
|
236
|
+
| `gitea_org_teams_list` | List teams in an organization |
|
|
237
|
+
| `gitea_org_members_list` | List members of an organization |
|
|
238
|
+
|
|
239
|
+
### Users (2 tools)
|
|
240
|
+
|
|
241
|
+
| Tool | Description |
|
|
242
|
+
|------|-------------|
|
|
243
|
+
| `gitea_user_get` | Get a user profile |
|
|
244
|
+
| `gitea_users_search` | Search users |
|
|
245
|
+
|
|
246
|
+
### Webhooks (2 tools)
|
|
247
|
+
|
|
248
|
+
| Tool | Description |
|
|
249
|
+
|------|-------------|
|
|
250
|
+
| `gitea_webhooks_list` | List webhooks for a repository |
|
|
251
|
+
| `gitea_webhook_create` | Create a webhook |
|
|
252
|
+
|
|
253
|
+
### Wiki (2 tools)
|
|
254
|
+
|
|
255
|
+
| Tool | Description |
|
|
256
|
+
|------|-------------|
|
|
257
|
+
| `gitea_wiki_pages_list` | List wiki pages |
|
|
258
|
+
| `gitea_wiki_page_get` | Get a wiki page |
|
|
259
|
+
|
|
260
|
+
### Notifications (2 tools)
|
|
261
|
+
|
|
262
|
+
| Tool | Description |
|
|
263
|
+
|------|-------------|
|
|
264
|
+
| `gitea_notifications_list` | List notifications for the authenticated user |
|
|
265
|
+
| `gitea_notifications_read` | Mark all notifications as read |
|
|
266
|
+
|
|
267
|
+
### Generic (2 tools)
|
|
268
|
+
|
|
269
|
+
| Tool | Description |
|
|
270
|
+
|------|-------------|
|
|
271
|
+
| `gitea_api_request` | Make a raw API request to any Gitea v1 endpoint |
|
|
272
|
+
| `gitea_list_connections` | List configured Gitea connections |
|
|
273
|
+
|
|
274
|
+
## Contributing
|
|
275
|
+
|
|
276
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
|
|
277
|
+
|
|
278
|
+
## License
|
|
279
|
+
|
|
280
|
+
[GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html) -- Copyright (C) 2026 Moko Consulting
|
|
281
|
+
|
|
282
|
+
## Revision History
|
|
283
|
+
|
|
284
|
+
| Version | Date | Description |
|
|
285
|
+
|---------|------|-------------|
|
|
286
|
+
| 0.0.1 | 2026-05-07 | Initial release with 61 tools |
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!-- Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
2
|
+
SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
|
+
DEFGROUP: gitea-api-mcp.Documentation
|
|
4
|
+
REPO: https://git.mokoconsulting.tech/MokoConsulting/gitea-api-mcp
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Security Policy
|
|
8
|
+
|
|
9
|
+
## Supported Versions
|
|
10
|
+
|
|
11
|
+
| Version | Supported |
|
|
12
|
+
|---------|-----------|
|
|
13
|
+
| 0.0.x | Yes |
|
|
14
|
+
|
|
15
|
+
## Reporting a Vulnerability
|
|
16
|
+
|
|
17
|
+
To report a security vulnerability, please email **hello@mokoconsulting.tech** with the subject line `[SECURITY] gitea-api-mcp`. Do not open a public issue for security vulnerabilities.
|
|
18
|
+
|
|
19
|
+
We will acknowledge receipt within 48 hours and provide an initial assessment within 5 business days.
|
|
20
|
+
|
|
21
|
+
## Token Storage Security
|
|
22
|
+
|
|
23
|
+
### Configuration File
|
|
24
|
+
|
|
25
|
+
The config file `~/.gitea-api-mcp.json` stores Gitea API tokens in plaintext. Follow these practices to protect your tokens:
|
|
26
|
+
|
|
27
|
+
#### File Permissions
|
|
28
|
+
|
|
29
|
+
Set restrictive permissions on the config file so only your user can read it:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
chmod 600 ~/.gitea-api-mcp.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
On Windows, ensure the file is only readable by your user account through the file properties security tab.
|
|
36
|
+
|
|
37
|
+
#### What to Avoid
|
|
38
|
+
|
|
39
|
+
- **Never** commit `~/.gitea-api-mcp.json` or any file containing tokens to version control
|
|
40
|
+
- **Never** share config files containing real tokens
|
|
41
|
+
- **Never** log or print token values in debug output
|
|
42
|
+
- **Never** store tokens in environment variables visible to other processes if avoidable
|
|
43
|
+
|
|
44
|
+
#### Token Scope
|
|
45
|
+
|
|
46
|
+
When generating Gitea access tokens, follow the principle of least privilege:
|
|
47
|
+
|
|
48
|
+
- Only grant the scopes (permissions) your workflow requires
|
|
49
|
+
- Use separate tokens for separate purposes or environments
|
|
50
|
+
- Rotate tokens periodically
|
|
51
|
+
- Revoke tokens that are no longer needed
|
|
52
|
+
|
|
53
|
+
#### Token Generation
|
|
54
|
+
|
|
55
|
+
1. Navigate to your Gitea instance Settings > Applications
|
|
56
|
+
2. Under "Manage Access Tokens," enter a token name
|
|
57
|
+
3. Select only the required scopes
|
|
58
|
+
4. Click "Generate Token"
|
|
59
|
+
5. Copy the token immediately -- it will not be shown again
|
|
60
|
+
|
|
61
|
+
### Network Security
|
|
62
|
+
|
|
63
|
+
#### TLS Verification
|
|
64
|
+
|
|
65
|
+
By default, the client verifies TLS certificates. The `insecure: true` option disables certificate verification for self-signed certificates. Use this only for:
|
|
66
|
+
|
|
67
|
+
- Local development instances
|
|
68
|
+
- Internal instances with self-signed certificates where the network is trusted
|
|
69
|
+
|
|
70
|
+
**Never** use `insecure: true` for production instances accessible over the public internet.
|
|
71
|
+
|
|
72
|
+
#### API Prefix
|
|
73
|
+
|
|
74
|
+
All requests are sent to `/api/v1` endpoints with:
|
|
75
|
+
|
|
76
|
+
- `Authorization: token <your-token>` header
|
|
77
|
+
- `Content-Type: application/json` header
|
|
78
|
+
- 30-second request timeout
|
|
79
|
+
|
|
80
|
+
### MCP Transport Security
|
|
81
|
+
|
|
82
|
+
This server uses stdio transport, meaning it communicates through standard input/output with the MCP client (e.g., Claude Code). The token is never exposed through network ports or HTTP endpoints by the MCP server itself.
|
|
83
|
+
|
|
84
|
+
## Security Checklist
|
|
85
|
+
|
|
86
|
+
- [ ] Config file permissions set to `600` (Unix) or user-only (Windows)
|
|
87
|
+
- [ ] Tokens scoped to minimum required permissions
|
|
88
|
+
- [ ] Config file excluded from version control (`.gitignore`)
|
|
89
|
+
- [ ] `insecure` flag only used for trusted internal instances
|
|
90
|
+
- [ ] Tokens rotated on a regular schedule
|
|
91
|
+
- [ ] Unused tokens revoked promptly
|