gitea-mcp 0.1.1.dev0__tar.gz
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.
- gitea_mcp-0.1.1.dev0/.github/pull_request_template.md +66 -0
- gitea_mcp-0.1.1.dev0/.github/workflows/ci.yml +39 -0
- gitea_mcp-0.1.1.dev0/.github/workflows/release.yml +34 -0
- gitea_mcp-0.1.1.dev0/.gitignore +218 -0
- gitea_mcp-0.1.1.dev0/CHANGELOG.md +24 -0
- gitea_mcp-0.1.1.dev0/LICENSE +21 -0
- gitea_mcp-0.1.1.dev0/PKG-INFO +147 -0
- gitea_mcp-0.1.1.dev0/README.md +113 -0
- gitea_mcp-0.1.1.dev0/VERSIONING.md +72 -0
- gitea_mcp-0.1.1.dev0/mcp.json +11 -0
- gitea_mcp-0.1.1.dev0/pyproject.toml +74 -0
- gitea_mcp-0.1.1.dev0/scripts/smoke_live.py +187 -0
- gitea_mcp-0.1.1.dev0/setup.cfg +4 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/__init__.py +9 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/_version.py +1 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/client.py +92 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/config.py +54 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/server.py +64 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/tools/__init__.py +5 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/tools/issues.py +239 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/tools/releases.py +88 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp/tools/repos.py +95 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp.egg-info/PKG-INFO +147 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp.egg-info/SOURCES.txt +32 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp.egg-info/dependency_links.txt +1 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp.egg-info/entry_points.txt +2 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp.egg-info/requires.txt +10 -0
- gitea_mcp-0.1.1.dev0/src/gitea_mcp.egg-info/top_level.txt +1 -0
- gitea_mcp-0.1.1.dev0/tests/__init__.py +0 -0
- gitea_mcp-0.1.1.dev0/tests/conftest.py +58 -0
- gitea_mcp-0.1.1.dev0/tests/test_issues.py +328 -0
- gitea_mcp-0.1.1.dev0/tests/test_releases.py +132 -0
- gitea_mcp-0.1.1.dev0/tests/test_repos.py +151 -0
- gitea_mcp-0.1.1.dev0/tests/test_smoke.py +24 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe the change and why it is needed.
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
-
|
|
8
|
+
-
|
|
9
|
+
-
|
|
10
|
+
|
|
11
|
+
## Type of Change
|
|
12
|
+
|
|
13
|
+
- [ ] Bug fix (PATCH)
|
|
14
|
+
- [ ] New feature (MINOR)
|
|
15
|
+
- [ ] Breaking change (MAJOR)
|
|
16
|
+
- [ ] Documentation only
|
|
17
|
+
- [ ] Tests only
|
|
18
|
+
- [ ] Refactor/internal change
|
|
19
|
+
|
|
20
|
+
## Changelog
|
|
21
|
+
|
|
22
|
+
- [ ] I updated `CHANGELOG.md` under `[Unreleased]`
|
|
23
|
+
- [ ] No changelog update needed (explain why):
|
|
24
|
+
|
|
25
|
+
## Versioning Impact
|
|
26
|
+
|
|
27
|
+
Expected release impact (pick one):
|
|
28
|
+
|
|
29
|
+
- [ ] PATCH
|
|
30
|
+
- [ ] MINOR
|
|
31
|
+
- [ ] MAJOR
|
|
32
|
+
- [ ] None
|
|
33
|
+
|
|
34
|
+
Notes:
|
|
35
|
+
|
|
36
|
+
## Testing
|
|
37
|
+
|
|
38
|
+
List what you ran and key results.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pytest
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Optional additional checks:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ruff check .
|
|
48
|
+
mypy
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## MCP / API Considerations
|
|
52
|
+
|
|
53
|
+
- [ ] Tool names unchanged
|
|
54
|
+
- [ ] Tool parameter names unchanged
|
|
55
|
+
- [ ] Response shape unchanged
|
|
56
|
+
- [ ] Any breaking MCP/API behavior is documented above
|
|
57
|
+
|
|
58
|
+
## Manual Validation (if applicable)
|
|
59
|
+
|
|
60
|
+
- Gitea/Forgejo/Codeberg target tested:
|
|
61
|
+
- Example endpoint(s) exercised:
|
|
62
|
+
- Auth scope validation performed:
|
|
63
|
+
|
|
64
|
+
## Related Issues
|
|
65
|
+
|
|
66
|
+
Closes #
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0 # setuptools_scm needs full history for version derivation
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Install
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install -e ".[dev]"
|
|
31
|
+
|
|
32
|
+
- name: Lint (ruff)
|
|
33
|
+
run: ruff check .
|
|
34
|
+
|
|
35
|
+
- name: Type check (mypy)
|
|
36
|
+
run: mypy src
|
|
37
|
+
|
|
38
|
+
- name: Test (pytest)
|
|
39
|
+
run: pytest
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write # required for PyPI trusted publishing
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0 # setuptools_scm needs full history
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
|
|
25
|
+
- name: Install build tooling
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install build
|
|
29
|
+
|
|
30
|
+
- name: Build sdist + wheel
|
|
31
|
+
run: python -m build
|
|
32
|
+
|
|
33
|
+
- name: Publish to PyPI
|
|
34
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial project scaffolding.
|
|
13
|
+
- **Issue tools fully implemented:** `create_issue`, `list_issues`, `get_issue`, `update_issue`, `add_comment`. Label names are resolved to Gitea label IDs automatically (Gitea's issue API requires IDs, not names); unknown label names fail cleanly with the list of valid names. `get_issue` returns the issue object plus a `comments_list` field with the full comment thread. `update_issue` supports replace-semantics for labels and assignees, milestone clearing via `milestone=0`, and atomic partial updates of any combination of title/body/state/labels/assignees/milestone.
|
|
14
|
+
- **Repo metadata tools fully implemented:** `list_repos`, `list_labels`, `list_milestones`. `list_repos` handles three modes — authenticated-user (no owner), user-owned, or organization-owned — with automatic fallback from the user endpoint to the org endpoint on 404 so callers don't need to know which it is. `list_labels` and `list_milestones` are straightforward paginated reads.
|
|
15
|
+
- **Release tools fully implemented:** `list_releases`, `create_release`. `create_release` includes a warning in its docstring about Gitea's side-effect behavior of creating the underlying git tag even for drafts. All MVP fields supported: `tag_name`, `name`, `body`, `target_commitish`, `draft`, `prerelease`.
|
|
16
|
+
- `GiteaClient` async HTTP wrapper (PAT auth via `Authorization: token <PAT>`, httpx, raises typed errors). Supports GET, POST, PUT, PATCH, DELETE.
|
|
17
|
+
- `Config` dataclass loading from `GITEA_URL` / `GITEA_TOKEN` / `GITEA_TIMEOUT` environment variables.
|
|
18
|
+
- `gitea-mcp` console-script entry point.
|
|
19
|
+
- `setuptools_scm` tag-driven versioning.
|
|
20
|
+
- `mcp.json` template for MCP client configuration.
|
|
21
|
+
- `README.md` with quick start, configuration, and tool reference.
|
|
22
|
+
- `VERSIONING.md` documenting the semver / tag / release flow.
|
|
23
|
+
- GitHub Actions workflows: CI (lint + type-check + tests on Python 3.11/3.12/3.13) and Release (publish to PyPI on `v*` tag push).
|
|
24
|
+
- Unit test suite using `pytest-httpx` to mock the Gitea API. Issue tools have full coverage (12 tests); repo and release tools covered only by smoke tests pending Pass B-2/B-3.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sam Ware
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gitea-mcp
|
|
3
|
+
Version: 0.1.1.dev0
|
|
4
|
+
Summary: Model Context Protocol server for Gitea (and Forgejo, Codeberg).
|
|
5
|
+
Author-email: Sam Ware <samuel@waretech.services>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/werebear73/gitea-mcp
|
|
8
|
+
Project-URL: Issues, https://github.com/werebear73/gitea-mcp/issues
|
|
9
|
+
Project-URL: Source, https://github.com/werebear73/gitea-mcp
|
|
10
|
+
Keywords: mcp,gitea,forgejo,codeberg,model-context-protocol,llm,ai
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: fastmcp>=2.0.0
|
|
25
|
+
Requires-Dist: httpx>=0.27.0
|
|
26
|
+
Requires-Dist: pydantic>=2.0.0
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
31
|
+
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
32
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# gitea-mcp
|
|
36
|
+
|
|
37
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) server for [Gitea](https://gitea.io) — lets AI assistants (Claude, ChatGPT, Copilot, and anything else that speaks MCP) read, create, and manage issues, repositories, and releases on any Gitea instance you can reach.
|
|
38
|
+
|
|
39
|
+
Also works against **[Forgejo](https://forgejo.org)** and **[Codeberg](https://codeberg.org)** (API-compatible).
|
|
40
|
+
|
|
41
|
+
## Why
|
|
42
|
+
|
|
43
|
+
Self-hosted Gitea is a popular GitHub alternative for solo developers, small teams, and privacy-conscious organizations. With this MCP server installed, your AI assistant can:
|
|
44
|
+
|
|
45
|
+
- File audit findings or refactor notes as Gitea issues without you leaving the chat
|
|
46
|
+
- Triage a repo's open issues in natural language
|
|
47
|
+
- Cut a release at the end of a coding session
|
|
48
|
+
- Comment on issues across multiple repos in one pass
|
|
49
|
+
|
|
50
|
+
## Features
|
|
51
|
+
|
|
52
|
+
| Resource | Tools |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| Issues | `create_issue`, `list_issues`, `get_issue`, `update_issue`, `add_comment` |
|
|
55
|
+
| Repos | `list_repos`, `list_labels`, `list_milestones` |
|
|
56
|
+
| Releases | `list_releases`, `create_release` |
|
|
57
|
+
|
|
58
|
+
- Bearer authentication via Personal Access Token (PAT)
|
|
59
|
+
- Async HTTP via `httpx` and `FastMCP`
|
|
60
|
+
- Works with self-hosted Gitea, Forgejo, and Codeberg
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
### 1. Install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install gitea-mcp
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or with [`uv`](https://docs.astral.sh/uv/):
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
uv pip install gitea-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 2. Generate a Personal Access Token
|
|
77
|
+
|
|
78
|
+
In your Gitea instance, go to **Settings → Applications → Generate New Token** and grant at least:
|
|
79
|
+
|
|
80
|
+
- `read:repository`
|
|
81
|
+
- `write:issue`
|
|
82
|
+
- `read:user`
|
|
83
|
+
|
|
84
|
+
Add `write:repository` if you also want to create releases.
|
|
85
|
+
|
|
86
|
+
### 3. Configure your MCP client
|
|
87
|
+
|
|
88
|
+
Add `gitea-mcp` to your MCP client configuration:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"gitea": {
|
|
94
|
+
"command": "gitea-mcp",
|
|
95
|
+
"env": {
|
|
96
|
+
"GITEA_URL": "https://your-gitea-instance.example.com",
|
|
97
|
+
"GITEA_TOKEN": "your-personal-access-token"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
See [`mcp.json`](mcp.json) for a complete example. The same shape works for Claude Desktop, VS Code, Cowork, Claude Code, and any other MCP-compatible client.
|
|
105
|
+
|
|
106
|
+
## Configuration
|
|
107
|
+
|
|
108
|
+
Configuration is read from environment variables.
|
|
109
|
+
|
|
110
|
+
| Variable | Required | Default | Description |
|
|
111
|
+
| --- | --- | --- | --- |
|
|
112
|
+
| `GITEA_URL` | Yes | — | Base URL of your Gitea instance (e.g., `https://gitea.example.com`) |
|
|
113
|
+
| `GITEA_TOKEN` | Yes | — | Personal Access Token from your Gitea user settings |
|
|
114
|
+
| `GITEA_TIMEOUT` | No | `30` | HTTP request timeout in seconds |
|
|
115
|
+
|
|
116
|
+
## Compatibility
|
|
117
|
+
|
|
118
|
+
| Server | Status |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| Gitea (self-hosted) | ✅ Primary target |
|
|
121
|
+
| Forgejo | ✅ Expected to work (API-compatible) |
|
|
122
|
+
| Codeberg | ✅ Expected to work (Codeberg runs Forgejo) |
|
|
123
|
+
|
|
124
|
+
## Development
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/werebear73/gitea-mcp.git
|
|
128
|
+
cd gitea-mcp
|
|
129
|
+
pip install -e ".[dev]"
|
|
130
|
+
pytest
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Versioning
|
|
134
|
+
|
|
135
|
+
Semantic versioning, derived from git tags via `setuptools_scm`. See [`VERSIONING.md`](VERSIONING.md) for the release process.
|
|
136
|
+
|
|
137
|
+
## Contributing
|
|
138
|
+
|
|
139
|
+
Issues and pull requests welcome. For substantial changes, please open an issue first to discuss the approach.
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
[MIT](LICENSE) — use it however you like, including commercial products.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
Built by [Waretech Services](https://waretech.services).
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# gitea-mcp
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) server for [Gitea](https://gitea.io) — lets AI assistants (Claude, ChatGPT, Copilot, and anything else that speaks MCP) read, create, and manage issues, repositories, and releases on any Gitea instance you can reach.
|
|
4
|
+
|
|
5
|
+
Also works against **[Forgejo](https://forgejo.org)** and **[Codeberg](https://codeberg.org)** (API-compatible).
|
|
6
|
+
|
|
7
|
+
## Why
|
|
8
|
+
|
|
9
|
+
Self-hosted Gitea is a popular GitHub alternative for solo developers, small teams, and privacy-conscious organizations. With this MCP server installed, your AI assistant can:
|
|
10
|
+
|
|
11
|
+
- File audit findings or refactor notes as Gitea issues without you leaving the chat
|
|
12
|
+
- Triage a repo's open issues in natural language
|
|
13
|
+
- Cut a release at the end of a coding session
|
|
14
|
+
- Comment on issues across multiple repos in one pass
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
| Resource | Tools |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Issues | `create_issue`, `list_issues`, `get_issue`, `update_issue`, `add_comment` |
|
|
21
|
+
| Repos | `list_repos`, `list_labels`, `list_milestones` |
|
|
22
|
+
| Releases | `list_releases`, `create_release` |
|
|
23
|
+
|
|
24
|
+
- Bearer authentication via Personal Access Token (PAT)
|
|
25
|
+
- Async HTTP via `httpx` and `FastMCP`
|
|
26
|
+
- Works with self-hosted Gitea, Forgejo, and Codeberg
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
### 1. Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install gitea-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or with [`uv`](https://docs.astral.sh/uv/):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv pip install gitea-mcp
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Generate a Personal Access Token
|
|
43
|
+
|
|
44
|
+
In your Gitea instance, go to **Settings → Applications → Generate New Token** and grant at least:
|
|
45
|
+
|
|
46
|
+
- `read:repository`
|
|
47
|
+
- `write:issue`
|
|
48
|
+
- `read:user`
|
|
49
|
+
|
|
50
|
+
Add `write:repository` if you also want to create releases.
|
|
51
|
+
|
|
52
|
+
### 3. Configure your MCP client
|
|
53
|
+
|
|
54
|
+
Add `gitea-mcp` to your MCP client configuration:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"mcpServers": {
|
|
59
|
+
"gitea": {
|
|
60
|
+
"command": "gitea-mcp",
|
|
61
|
+
"env": {
|
|
62
|
+
"GITEA_URL": "https://your-gitea-instance.example.com",
|
|
63
|
+
"GITEA_TOKEN": "your-personal-access-token"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
See [`mcp.json`](mcp.json) for a complete example. The same shape works for Claude Desktop, VS Code, Cowork, Claude Code, and any other MCP-compatible client.
|
|
71
|
+
|
|
72
|
+
## Configuration
|
|
73
|
+
|
|
74
|
+
Configuration is read from environment variables.
|
|
75
|
+
|
|
76
|
+
| Variable | Required | Default | Description |
|
|
77
|
+
| --- | --- | --- | --- |
|
|
78
|
+
| `GITEA_URL` | Yes | — | Base URL of your Gitea instance (e.g., `https://gitea.example.com`) |
|
|
79
|
+
| `GITEA_TOKEN` | Yes | — | Personal Access Token from your Gitea user settings |
|
|
80
|
+
| `GITEA_TIMEOUT` | No | `30` | HTTP request timeout in seconds |
|
|
81
|
+
|
|
82
|
+
## Compatibility
|
|
83
|
+
|
|
84
|
+
| Server | Status |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| Gitea (self-hosted) | ✅ Primary target |
|
|
87
|
+
| Forgejo | ✅ Expected to work (API-compatible) |
|
|
88
|
+
| Codeberg | ✅ Expected to work (Codeberg runs Forgejo) |
|
|
89
|
+
|
|
90
|
+
## Development
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
git clone https://github.com/werebear73/gitea-mcp.git
|
|
94
|
+
cd gitea-mcp
|
|
95
|
+
pip install -e ".[dev]"
|
|
96
|
+
pytest
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Versioning
|
|
100
|
+
|
|
101
|
+
Semantic versioning, derived from git tags via `setuptools_scm`. See [`VERSIONING.md`](VERSIONING.md) for the release process.
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
Issues and pull requests welcome. For substantial changes, please open an issue first to discuss the approach.
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
[MIT](LICENSE) — use it however you like, including commercial products.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
Built by [Waretech Services](https://waretech.services).
|