Skip to content

v0.4.0 — lifespan, MCP Context, Resources

Choose a tag to compare

@mshegolev mshegolev released this 17 Apr 12:43
· 23 commits to main since this release

Closes the last four optional items from the /mcp-builder best-practices checklist.

  • Lifespan management — asynccontextmanager hook cleans up python-gitlab HTTP sessions and the manager cache on shutdown.
  • MCP Context integration — gitlab_pipeline_health and gitlab_get_job_log are now async def and emit ctx.info / ctx.report_progress events. Clients with progress UIs (Claude Code, Cursor) will show a progress bar while the 30-day history is being fetched.
  • MCP Resources — two URI templates for clients that prefer Resources over tools:
    • gitlab://project/info — markdown snapshot of the default project
    • gitlab://project/ci-config — raw .gitlab-ci.yml
  • Threading model documented — FastMCP auto-runs sync tools in a worker thread (anyio.to_thread.run_sync), so not converting every tool to async def is an intentional choice, not an oversight. README has a new section spelling this out.

Package health: 16 tests (9 smoke + 7 mock), ruff clean, all 23 tools + 2 resources registered.