Skip to content

feat(docs): use versioned MCPB download links with __VERSION__ placeholder#200

Merged
polaz merged 6 commits intomainfrom
fix/#199-versioned-mcpb-downloads
Jan 25, 2026
Merged

feat(docs): use versioned MCPB download links with __VERSION__ placeholder#200
polaz merged 6 commits intomainfrom
fix/#199-versioned-mcpb-downloads

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 25, 2026

Summary

  • Add __VERSION__ placeholder support to inject-tool-refs.ts for versioned download URLs
  • Convert docs/clients/claude-desktop.md to template (.md.in) for dynamic version injection
  • Add download attribute to MCPB links to bypass Vue Router interception
  • Update docs.yml workflow to pass RELEASE_VERSION from latest GitHub release tag

Problem

MCPB download links were:

  1. Using gitlab-mcp-latest.mcpb which doesn't indicate the actual version
  2. Getting intercepted by Vue Router (SPA navigation) instead of triggering download

Solution

Links now use versioned filenames like gitlab-mcp-6.43.0.mcpb:

  • __VERSION__ placeholder replaced at docs build time
  • Version sourced from RELEASE_VERSION env (CI) or package.json (fallback)
  • download attribute ensures browser downloads file directly

Test plan

  • Unit tests pass for inject-tool-refs.ts (58 tests)
  • Build succeeds
  • Lint passes
  • Verify docs deploy generates correct versioned URLs
  • Verify MCPB download works without Vue Router interception

Fixes #199

…older

- Add __VERSION__ placeholder to inject-tool-refs.ts
- Version sourced from RELEASE_VERSION env (CI) or package.json (fallback)
- Convert docs/clients/claude-desktop.md to template (.md.in)
- Add download attribute to prevent Vue Router interception
- Update docs.yml to pass RELEASE_VERSION from latest GitHub release

Fixes #199
Copilot AI review requested due to automatic review settings January 25, 2026 03:01
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 25, 2026

Test Coverage Report

Overall Coverage: 93.78%

Metric Percentage
Statements 93.28%
Branches 85.03%
Functions 83.32%
Lines 93.78%

View detailed coverage report

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements versioned MCPB download links by introducing a __VERSION__ placeholder system that gets replaced at documentation build time with the actual version from GitHub release tags or package.json.

Changes:

  • Added getVersion() function to extract version from RELEASE_VERSION env var (set by CI) or fall back to package.json
  • Renamed replaceCountPlaceholders() to replacePlaceholders() and added __VERSION__ support alongside existing count placeholders
  • Converted three documentation files to .md.in templates that use the __VERSION__ placeholder for MCPB download links
  • Updated CI workflow to extract version from latest GitHub release tag and pass it via RELEASE_VERSION env var
  • Added download attribute to all MCPB links to prevent Vue Router interception
  • Updated VitePress config's ignoreDeadLinks pattern to match versioned filenames

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/cli/inject-tool-refs.ts Added getVersion() function and expanded placeholder replacement to support __VERSION__
tests/unit/cli/inject-tool-refs.test.ts Added comprehensive tests for getVersion() and updated existing tests for renamed function and version placeholder
docs/index.md.in Converted to template with versioned MCPB link and download attribute
docs/guide/installation/claude-desktop.md.in Converted to template with versioned MCPB links and download attribute
docs/clients/claude-desktop.md.in Converted to template with versioned MCPB link and download attribute
docs/.vitepress/config.mts Updated ignoreDeadLinks regex to match versioned filenames pattern
.github/workflows/docs.yml Reordered steps to extract version before generating docs, passing it via RELEASE_VERSION env var

Log the selected MCPB version when falling back to package.json,
matching the logging pattern used for GitHub release versions.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

polaz added 2 commits January 25, 2026 05:20
Change button label from "Download gitlab-mcp.mcpb (v__VERSION__)"
to "Download gitlab-mcp-__VERSION__.mcpb" to match actual filename.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Add nullish coalescing fallback to return "0.0.0" when package.json
exists but lacks a version field. Add test for this edge case.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@polaz polaz merged commit 68b284f into main Jan 25, 2026
22 checks passed
@polaz polaz deleted the fix/#199-versioned-mcpb-downloads branch January 25, 2026 03:41
sw-release-bot bot pushed a commit that referenced this pull request Jan 25, 2026
## [6.44.0](v6.43.1...v6.44.0) (2026-01-25)

### Features

* **docs:** use versioned MCPB download links with __VERSION__ placeholder ([#200](#200)) ([68b284f](68b284f)), closes [#199](#199)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.44.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use versioned MCPB download links instead of 'latest'

2 participants