runspec-gitlab
A read-only GitLab runnable for runspec,
ported onto the GitLab REST API (v4) — not proxying GitLab's hosted MCP
server. One runnable — gitlab — with 17 read verbs, all autonomy = "autonomous". pip install it into a venv and it's discoverable by runspec local, runspec serve (MCP), and runspec-console.
runspec serve flattens each verb into a leaf MCP tool (gitlab_get-issue, …).
Verb names are reconciled against GitLab's canonical MCP tool registry; the
extras (whoami, get-project, search-projects, list-issues, get-file,
list-tree) are useful REST reads GitLab has no MCP tool for.
Install
pip install runspec-gitlab
Verbs
| Area | Verbs |
|---|---|
| Account / project | whoami, get-project, search-projects, get-file, list-tree |
| Issues | list-issues, get-issue |
| Merge requests | list-merge-requests, get-merge-request, get-merge-request-diffs, get-merge-request-commits, get-merge-request-notes, get-merge-request-pipelines, get-merge-request-conflicts |
| Pipelines | list-pipelines, get-pipeline-jobs, get-job-log |
get-merge-request-conflicts is best-effort — GitLab has no public /api/v4
conflicts endpoint, so it relays the web-UI endpoint and returns its JSON
verbatim.
Auth — env vars only
export GITLAB_URL=https://gitlab.example.com # default https://gitlab.com
export GITLAB_TOKEN=<personal-or-project-access-token>
export GITLAB_PROJECT=group/subgroup/project # optional default
Every verb takes --env, selecting GITLAB_<ENV>_* prefixed vars. --project
accepts a numeric id or a group/project path and falls back to
GITLAB_PROJECT.
gitlab whoami
gitlab list-merge-requests --project group/app --state opened
gitlab get-job-log --project group/app --job-id 998877
Public Python API
The pure logic is in runspec-gitlab-core —
httpx-only, no runspec dependency, no entry points. Every op takes a
GitlabConfig first arg and raises GitlabError, so a private wrapper can
inject credentials and bake in a default project / env:
from runspec_gitlab_core import config_from_env, get_issue, list_merge_requests
cfg = config_from_env(env="prod")
mrs = list_merge_requests(cfg, state="opened")
Development
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
ruff check . && ruff format --check .
pytest
Metadata
Release files for runspec-gitlab 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| runspec_gitlab-0.2.1.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| runspec_gitlab-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / runspec_gitlab-0.2.1.tar.gz
| Download URL | runspec_gitlab-0.2.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73a7065074d895b14d136321e5c861b4f1cc2bab14babebeea72a5143fe4f8e6
|
|
BLAKE2b-256 checksum How to use checksums |
ceaedda2c07c1f09e387a6aaccb5bd925cf621e88ca8f0aab9be22dfae9407e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / runspec_gitlab-0.2.1-py3-none-any.whl
| Download URL | runspec_gitlab-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8639f2387fa8a5cd34c5972434bccf9bdd01b58d5a960fb9aadaa924e0f9fb47
|
|
BLAKE2b-256 checksum How to use checksums |
7760f066c583fca51bbc09417ffe071d59bb5ef0928e3fd6fe0a3f5e1fb7a8d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log