Skip to content

fix(docs): Replace hardcoded 'latest' MCPB link with versioned URL in README #204

@polaz

Description

@polaz

Summary

README.md.in uses a hardcoded gitlab-mcp-latest.mcpb link that no longer exists. The documentation site and GitHub releases use versioned MCPB bundles (e.g., gitlab-mcp-6.43.1.mcpb), but README.md still points to the non-existent latest file.

Problem

In README.md.in (line 7):

[![Install in Claude Desktop](https://img.shields.io/badge/Claude_Desktop-Install_Extension-F97316?style=for-the-badge)](https://gitlab-mcp.sw.foundation/downloads/gitlab-mcp-latest.mcpb)

This link returns 404 because:

  1. MCPB bundles are published with version numbers: gitlab-mcp-6.43.1.mcpb
  2. There is no latest.mcpb file on the docs site
  3. The docs site uses __VERSION__ placeholder which gets replaced by inject-tool-refs.ts

Current Architecture

How docs work (correct):

  1. docs/index.md.in uses gitlab-mcp-__VERSION__.mcpb
  2. inject-tool-refs.ts replaces __VERSION__ with actual version from RELEASE_VERSION env or package.json
  3. Generated docs/index.md has correct versioned link

How README works (broken):

  1. README.md.in uses hardcoded gitlab-mcp-latest.mcpb
  2. prepare-release.sh only replaces __TOOL_COUNT__, __ENTITY_COUNT__, __READONLY_TOOL_COUNT__
  3. Generated README.md has dead link

Solution

Option A: Extend prepare-release.sh (Recommended)

Add __VERSION__ replacement to prepare-release.sh:

# Line 46-49 in prepare-release.sh
sed -e "s/__TOOL_COUNT__/${TOOL_COUNT}/g" \
    -e "s/__ENTITY_COUNT__/${ENTITY_COUNT}/g" \
    -e "s/__READONLY_TOOL_COUNT__/${READONLY_TOOL_COUNT}/g" \
    -e "s/__VERSION__/${VERSION}/g" \           # Add this line
    README.md.in > README.md

And update README.md.in line 7:

[![Install in Claude Desktop](https://img.shields.io/badge/Claude_Desktop-Install_Extension-F97316?style=for-the-badge)](https://gitlab-mcp.sw.foundation/downloads/gitlab-mcp-__VERSION__.mcpb)

Option B: Process README.md.in through inject-tool-refs

This would require restructuring since inject-tool-refs.ts only scans docs/ directory, but README.md.in is in the project root.

Files to Change

File Change
README.md.in Replace gitlab-mcp-latest.mcpb with gitlab-mcp-__VERSION__.mcpb
scripts/prepare-release.sh Add __VERSION__ replacement in sed command

Acceptance Criteria

  • README.md.in uses __VERSION__ placeholder for MCPB link
  • prepare-release.sh replaces __VERSION__ when generating README.md
  • Generated README.md has correct versioned MCPB link (e.g., gitlab-mcp-6.43.1.mcpb)
  • Link resolves to actual file on docs site after release

Testing

After changes, run locally:

./scripts/prepare-release.sh 6.43.1
grep "mcpb" README.md
# Should show: gitlab-mcp-6.43.1.mcpb

Related

  • MCPB generation: scripts/build-mcpb.sh
  • Docs generation: src/cli/inject-tool-refs.ts
  • CI workflow: .github/workflows/docs.yml (uses RELEASE_VERSION for docs)

Labels

  • bug
  • docs
  • good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions