@boringstudio_org/gitea-mcp 1.6.1 → 1.8.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.
@@ -1,43 +1,34 @@
1
- name: Release
1
+ name: Release and Publish
2
2
 
3
3
  on:
4
4
  push:
5
- branches:
6
- - main
5
+ tags:
6
+ - 'v*'
7
7
 
8
8
  jobs:
9
- release:
9
+ publish:
10
10
  runs-on: ubuntu-latest
11
- if: "!contains(github.event.head_commit.message, 'chore(release)')"
12
11
  steps:
13
12
  - name: Checkout
14
13
  uses: actions/checkout@v4
15
14
  with:
16
15
  fetch-depth: 0
17
- token: ${{ secrets.RELEASE_TOKEN }}
18
16
 
19
- - name: Checkout branch
17
+ - name: Verify tag is on main
20
18
  run: |
21
- git checkout main
22
- git pull origin main
19
+ git fetch origin main
20
+ git merge-base --is-ancestor HEAD origin/main
23
21
 
24
22
  - name: Setup Node.js
25
23
  uses: actions/setup-node@v4
26
24
  with:
27
25
  node-version: '24'
28
-
29
- - name: Configure Git
30
- run: |
31
- git config user.name "Gitea Actions"
32
- git config user.email "sgmakgg@gmail.com"
26
+ registry-url: 'https://registry.npmjs.org'
33
27
 
34
28
  - name: Install dependencies
35
29
  run: npm ci
36
30
 
37
- - name: Run standard-version
38
- run: npm run release
39
-
40
- - name: Push changes
41
- run: git push --follow-tags origin main
31
+ - name: Publish to NPM
32
+ run: npm publish
42
33
  env:
43
- GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
34
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -2,68 +2,98 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.6.1](https://git.boringstudio.by/BoringStudio/mcp-gitea/compare/v1.6.0...v1.6.1) (2026-01-15)
5
+ <<<<<<< HEAD
6
+ ## [1.8.0](https://github.com/boringstudio-org/mcp-gitea/compare/v1.7.0...v1.8.0) (2026-01-17)
7
+ =======
8
+ ### [1.7.1](https://git.boringstudio.by/BoringStudio/mcp-gitea/compare/v1.7.0...v1.7.1) (2026-01-15)
6
9
 
7
- ## [1.6.0](https://git.boringstudio.by/BoringStudio/mcp-gitea/compare/v1.4.1...v1.6.0) (2026-01-15)
10
+ ## [1.7.0](https://git.boringstudio.by/BoringStudio/mcp-gitea/compare/v1.6.1...v1.7.0) (2026-01-15)
11
+ >>>>>>> main
8
12
 
9
13
 
10
14
  ### Features
11
15
 
12
- * enhance security and optimization ([#5](https://git.boringstudio.by/BoringStudio/mcp-gitea/issues/5)) ([f9f7055](https://git.boringstudio.by/BoringStudio/mcp-gitea/commit/f9f70556240482149ac245357f23f1160e873e5c))
16
+ * add project files (v1.4.0) ([01ae6c1](https://github.com/boringstudio-org/mcp-gitea/commit/01ae6c10b4f5ec17d606db69da0d9d9cd0ea82ec))
17
+ * enhance security and optimization ([72d3a8a](https://github.com/boringstudio-org/mcp-gitea/commit/72d3a8ac8b3c590025e43f00578a167906ee2e0f))
18
+ * update readme with security details ([650ffde](https://github.com/boringstudio-org/mcp-gitea/commit/650ffde4e25c0b7b472b7a9b20c5bd4da695e0e2))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **ci:** add .versionrc to skip ci on release commits ([4a8856b](https://github.com/boringstudio-org/mcp-gitea/commit/4a8856bc93215f98aa7eb0637a449601b1c96bd9))
24
+ * **ci:** checkout main branch before release ([d85bd5c](https://github.com/boringstudio-org/mcp-gitea/commit/d85bd5c57982d25d4cc2145f41ae21c75e91f97a))
25
+ * **ci:** use admin email for release workflow ([9fb8e1d](https://github.com/boringstudio-org/mcp-gitea/commit/9fb8e1d14a2ca30bb4e81d6587c1aed6f4541d03))
26
+ * **ci:** use correct bot email for release workflow ([c4899e4](https://github.com/boringstudio-org/mcp-gitea/commit/c4899e46e32e621273ebdde9f783d3ff29f9a251))
27
+
28
+ ## [1.7.0](https://github.com/boringstudio-org/mcp-gitea/compare/v1.6.1...v1.7.0) (2026-01-15)
29
+
30
+
31
+ ### Features
32
+
33
+ * update readme with security details ([#7](https://github.com/boringstudio-org/mcp-gitea/issues/7)) ([9c719bb](https://github.com/boringstudio-org/mcp-gitea/commit/9c719bbf6f4e46bcba98f3656f899c9e11fd1e5e))
34
+
35
+ ### [1.6.1](https://github.com/boringstudio-org/mcp-gitea/compare/v1.6.0...v1.6.1) (2026-01-15)
36
+
37
+ ## [1.6.0](https://github.com/boringstudio-org/mcp-gitea/compare/v1.4.1...v1.6.0) (2026-01-15)
38
+
39
+
40
+ ### Features
41
+
42
+ * enhance security and optimization ([#5](https://github.com/boringstudio-org/mcp-gitea/issues/5)) ([f9f7055](https://github.com/boringstudio-org/mcp-gitea/commit/f9f70556240482149ac245357f23f1160e873e5c))
13
43
 
14
44
  ### 1.4.1 (2026-01-14)
15
45
 
16
- ### [1.3.6](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.3.5...v1.3.6) (2026-01-14)
46
+ ### [1.3.6](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.3.5...v1.3.6) (2026-01-14)
17
47
 
18
- ### [1.3.5](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.3.4...v1.3.5) (2026-01-14)
48
+ ### [1.3.5](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.3.4...v1.3.5) (2026-01-14)
19
49
 
20
50
 
21
51
  ### Bug Fixes
22
52
 
23
- * Update start script to use global package and load env ([#20](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/issues/20)) ([c4598fc](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/c4598fce2bbfcd9acc48599fe0eddde013ecedb5))
53
+ * Update start script to use global package and load env ([#20](https://github.com/boringstudio-org/mcp-gitea-proxy/issues/20)) ([c4598fc](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/c4598fce2bbfcd9acc48599fe0eddde013ecedb5))
24
54
 
25
- ### [1.3.4](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.3.3...v1.3.4) (2026-01-14)
55
+ ### [1.3.4](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.3.3...v1.3.4) (2026-01-14)
26
56
 
27
57
 
28
58
  ### Features
29
59
 
30
- * Native Node.js Google Search implementation ([#19](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/issues/19)) ([555f44a](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/555f44a9bd9017d2cd01351efe19b5b2c766b442))
60
+ * Native Node.js Google Search implementation ([#19](https://github.com/boringstudio-org/mcp-gitea-proxy/issues/19)) ([555f44a](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/555f44a9bd9017d2cd01351efe19b5b2c766b442))
31
61
 
32
- ### [1.3.3](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.3.2...v1.3.3) (2026-01-14)
62
+ ### [1.3.3](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.3.2...v1.3.3) (2026-01-14)
33
63
 
34
64
 
35
65
  ### Bug Fixes
36
66
 
37
- * Silence npx output, map Google ID, add start script and update docs ([#18](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/issues/18)) ([7c36bdc](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/7c36bdcedd5c29281a1562a7a801c3d0ac6d3256))
67
+ * Silence npx output, map Google ID, add start script and update docs ([#18](https://github.com/boringstudio-org/mcp-gitea-proxy/issues/18)) ([7c36bdc](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/7c36bdcedd5c29281a1562a7a801c3d0ac6d3256))
38
68
 
39
- ### [1.3.2](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.3.1...v1.3.2) (2026-01-14)
69
+ ### [1.3.2](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.3.1...v1.3.2) (2026-01-14)
40
70
 
41
71
 
42
72
  ### Bug Fixes
43
73
 
44
- * Add ~/.local/bin to PATH for uvx discovery ([#16](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/issues/16)) ([b2a25d5](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/b2a25d5fa5ec6d5d9fface87d48eb431ff9fd175))
74
+ * Add ~/.local/bin to PATH for uvx discovery ([#16](https://github.com/boringstudio-org/mcp-gitea-proxy/issues/16)) ([b2a25d5](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/b2a25d5fa5ec6d5d9fface87d48eb431ff9fd175))
45
75
 
46
- ### [1.3.1](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.3.0...v1.3.1) (2026-01-14)
76
+ ### [1.3.1](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.3.0...v1.3.1) (2026-01-14)
47
77
 
48
78
 
49
79
  ### Bug Fixes
50
80
 
51
- * Remove hardcoded env from npm config and update docs ([9842c48](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/9842c48e07e91a0d5b79d547782aa0aa9b6d9390))
81
+ * Remove hardcoded env from npm config and update docs ([9842c48](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/9842c48e07e91a0d5b79d547782aa0aa9b6d9390))
52
82
 
53
- ## [1.3.0](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/compare/v1.2.0...v1.3.0) (2026-01-13)
83
+ ## [1.3.0](https://github.com/boringstudio-org/mcp-gitea-proxy/compare/v1.2.0...v1.3.0) (2026-01-13)
54
84
 
55
85
  ## 1.2.0 (2026-01-13)
56
86
 
57
87
 
58
88
  ### Features
59
89
 
60
- * add create_pull_request and list_branches tools (Closes [#3](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/issues/3)) ([465d4ed](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/465d4ed1738cf7e54d2b67b7a8c5f2df70194cfe))
61
- * add list_labels and update_issue with labels support (Closes [#2](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/issues/2)) ([9006385](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/9006385ce82cd5adc5f7af9bdbf5e28c89789816))
62
- * add memory schema docs and update project structure ([841b0d6](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/841b0d6075c9e9b501a7d76a7cfa10a1f228a2bb))
63
- * add secure shell execution and full Gitea integration ([d22d48c](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/d22d48cb99de046b560313995b08d1c67955fb41))
64
- * upgrade to v1.4.0 with Resources and Prompts ([1510e9e](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/1510e9e7e1b3d682c011a7fdc56ae2b26435c086))
90
+ * add create_pull_request and list_branches tools (Closes [#3](https://github.com/boringstudio-org/mcp-gitea-proxy/issues/3)) ([465d4ed](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/465d4ed1738cf7e54d2b67b7a8c5f2df70194cfe))
91
+ * add list_labels and update_issue with labels support (Closes [#2](https://github.com/boringstudio-org/mcp-gitea-proxy/issues/2)) ([9006385](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/9006385ce82cd5adc5f7af9bdbf5e28c89789816))
92
+ * add memory schema docs and update project structure ([841b0d6](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/841b0d6075c9e9b501a7d76a7cfa10a1f228a2bb))
93
+ * add secure shell execution and full Gitea integration ([d22d48c](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/d22d48cb99de046b560313995b08d1c67955fb41))
94
+ * upgrade to v1.4.0 with Resources and Prompts ([1510e9e](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/1510e9e7e1b3d682c011a7fdc56ae2b26435c086))
65
95
 
66
96
 
67
97
  ### Bug Fixes
68
98
 
69
- * Add fallback for uvx path ([dba4e21](https://git.boringstudio.by/BoringStudio/mcp-gitea-proxy/commit/dba4e213790c91a8d031c37cac9a0eaf8724664a))
99
+ * Add fallback for uvx path ([dba4e21](https://github.com/boringstudio-org/mcp-gitea-proxy/commit/dba4e213790c91a8d031c37cac9a0eaf8724664a))
package/README.md CHANGED
@@ -12,6 +12,11 @@ This package is designed to be used as a standalone server or imported by a gate
12
12
  * **Analysis:** Analyze issues with AI prompts.
13
13
  * **Shell:** Execute safe git commands in WSL (`run_safe_shell`).
14
14
 
15
+ ## 🔒 Security
16
+
17
+ * **Allowed Paths:** Restricted via `MCP_ALLOWED_PATHS` environment variable.
18
+ * **Git Safety:** Only whitelisted git subcommands are allowed. Global flags are blocked.
19
+
15
20
  ## 📦 Installation
16
21
 
17
22
  ```bash
@@ -24,9 +29,14 @@ npm install @boringstudio_org/gitea-mcp
24
29
  ```bash
25
30
  # Configure environment variables
26
31
  export GITEA_TOKEN=your_token
27
- # Optional: Defaults to https://git.boringstudio.by/api/v1
32
+ # Optional: Defaults to https://git.your-instance.com/api/v1
28
33
  export GITEA_API_URL=https://git.your-instance.com/api/v1
29
34
 
35
+ # Cloudflare Access (Optional)
36
+ # If your Gitea instance is behind Cloudflare Zero Trust
37
+ export CF_ID=your_cf_client_id
38
+ export CF_SECRET=your_cf_client_secret
39
+
30
40
  # Run
31
41
  npx @boringstudio_org/gitea-mcp
32
42
  ```
@@ -37,7 +47,11 @@ npx @boringstudio_org/gitea-mcp
37
47
  npm install
38
48
 
39
49
  # Configure .env
40
- echo "Gitea_TOKEN=..." > .env
50
+ echo "GITEA_TOKEN=..." > .env
51
+ echo "GITEA_API_URL=..." >> .env
52
+ # Optional: Cloudflare Access
53
+ echo "CF_ID=..." >> .env
54
+ echo "CF_SECRET=..." >> .env
41
55
 
42
56
  # Run
43
57
  node index.js
package/RELEASE.md ADDED
@@ -0,0 +1,61 @@
1
+ # Release Process
2
+
3
+ This project follows a semi-automated release process using `standard-version` and Gitea Actions.
4
+
5
+ ## Prerequisites
6
+
7
+ * **NPM Token**: Ensure `NPM_TOKEN` is set in the repository secrets for automated publishing.
8
+ * **Permissions**: You need permission to push tags to the repository.
9
+
10
+ ## Steps to Release
11
+
12
+ Since direct pushes to `main` are forbidden, we use a Pull Request workflow.
13
+
14
+ 1. **Prepare the Release (Branch)**
15
+ Create a new branch for the release (e.g., `release/v1.7.2`).
16
+ Run the release script **without tagging** to bump the version and update the changelog.
17
+ ```bash
18
+ npm run release -- --skip.tag
19
+ ```
20
+
21
+ 2. **Push & Merge**
22
+ Push the branch and open a Pull Request to `main`.
23
+ ```bash
24
+ git push origin release/v1.7.2
25
+ ```
26
+ Merge the Pull Request into `main`.
27
+
28
+ 3. **Tag & Deploy**
29
+ After the code is successfully merged into `main`:
30
+ 1. Switch to `main` and pull the latest changes.
31
+ ```bash
32
+ git checkout main
33
+ git pull origin main
34
+ ```
35
+ 2. Create the tag on the merge commit.
36
+ ```bash
37
+ git tag v1.7.2
38
+ ```
39
+ 3. Push the tag to trigger the deployment.
40
+ ```bash
41
+ git push origin v1.7.2
42
+ ```
43
+
44
+ The Gitea Action workflow will trigger:
45
+ * Verify the tag is on `main`
46
+ * Install dependencies
47
+ * Publish the package to NPM
48
+
49
+ ## Troubleshooting
50
+
51
+ * **Tag not triggering build?** Ensure the tag format matches `v*` (e.g., `v1.0.0`).
52
+ * **Workflow failed on "Verify tag is on main"?** This usually happens if you tagged a commit on a feature branch that was subsequently "Squashed" when merging. Always tag the commit *after* it lands on `main`.
53
+ * **Publish failed?** Check the Gitea Actions logs and verify the `NPM_TOKEN` validity.
54
+
55
+ ## Security & History Cleaning
56
+
57
+ If sensitive data (tokens, keys, .env files) is accidentally committed, **do not** just delete the file. You must remove it from the git history to prevent leaks.
58
+
59
+ **Recommended Tools:**
60
+ * [BFG Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/)
61
+ * [git-filter-repo](https://github.com/newren/git-filter-repo)
package/index.js CHANGED
@@ -7,6 +7,10 @@ import dotenv from "dotenv";
7
7
  import path from "path";
8
8
  import { fileURLToPath } from 'url';
9
9
  import { spawn } from "child_process";
10
+ import { createRequire } from "module";
11
+
12
+ const require = createRequire(import.meta.url);
13
+ const pkg = require("./package.json");
10
14
 
11
15
  // Load .env from the current working directory
12
16
  dotenv.config({ path: path.join(process.cwd(), ".env"), quiet: true });
@@ -14,11 +18,11 @@ dotenv.config({ path: path.join(process.cwd(), ".env"), quiet: true });
14
18
  export async function runGiteaServer() {
15
19
  const server = new McpServer({
16
20
  name: "gitea-proxy-agent",
17
- version: "1.5.0",
21
+ version: pkg.version,
18
22
  });
19
23
 
20
24
  const GITEA_TOKEN = process.env.GITEA_TOKEN;
21
- const BASE_URL = process.env.GITEA_API_URL || "https://git.boringstudio.by/api/v1";
25
+ const BASE_URL = process.env.GITEA_API_URL;
22
26
 
23
27
  if (!GITEA_TOKEN) {
24
28
  console.error("❌ Error: GITEA_TOKEN not found.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boringstudio_org/gitea-mcp",
3
- "version": "1.6.1",
3
+ "version": "1.8.0",
4
4
  "description": "A Gitea MCP Server for interacting with repositories, issues, and more.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -20,7 +20,7 @@
20
20
  "license": "MIT",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://git.boringstudio.by/BoringStudio/mcp-gitea.git"
23
+ "url": "https://github.com/boringstudio-org/mcp-gitea.git"
24
24
  },
25
25
  "keywords": [
26
26
  "mcp",
@@ -1,28 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
- workflow_dispatch:
8
-
9
- jobs:
10
- publish:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout
14
- uses: actions/checkout@v4
15
-
16
- - name: Setup Node.js
17
- uses: actions/setup-node@v4
18
- with:
19
- node-version: '24'
20
- registry-url: 'https://registry.npmjs.org'
21
-
22
- - name: Install dependencies
23
- run: npm ci
24
-
25
- - name: Publish
26
- run: npm publish
27
- env:
28
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}