Skip to main content
Glama

ghcr_login_guide

Authenticate to GitHub Container Registry for Docker operations by providing step-by-step login instructions and credential setup guidance.

Instructions

Guide through GHCR authentication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The complete implementation of the 'ghcr_login_guide' tool, including registration to the MCP server, input schema (github_username), and the handler function that returns a detailed text guide for authenticating with GitHub Container Registry (GHCR). The handler provides step-by-step instructions for creating PATs, logging in via Docker CLI, and using in GitHub Actions.
      "ghcr_login_guide",
      "Guide through GHCR authentication",
      { github_username: { type: "string", description: "Your GitHub username" } },
      async ({ github_username }) => {
        return {
          content: [{
            type: "text",
            text: `GITHUB CONTAINER REGISTRY (GHCR) LOGIN GUIDE
    
    Step 1: Create a Personal Access Token (PAT)
    --------------------------------------------
    1. Go to: https://github.com/settings/tokens/new
    2. Give it a name like "GHCR Push Token"
    3. Select scopes:
       [x] write:packages
       [x] read:packages
       [x] delete:packages (optional)
    4. Click "Generate token"
    5. COPY THE TOKEN NOW (you won't see it again!)
    
    Step 2: Login to GHCR
    ---------------------
    Option A - Interactive (paste token when prompted):
      docker login ghcr.io -u ${github_username}
    
    Option B - Using environment variable:
      export CR_PAT=your_token_here
      echo $CR_PAT | docker login ghcr.io -u ${github_username} --password-stdin
    
    Step 3: Verify Login
    --------------------
      docker pull ghcr.io/github/super-linter:latest
      (If this works, you're logged in!)
    
    FOR CI/CD (GitHub Actions):
    ---------------------------
    Use the built-in GITHUB_TOKEN:
      - name: Login to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: \${{ github.actor }}
          password: \${{ secrets.GITHUB_TOKEN }}`
          }]
        };
      }
    );
  • src/index.js:456-502 (registration)
    MCP server.tool() call that registers the 'ghcr_login_guide' tool with name, description, schema, and handler.
      "ghcr_login_guide",
      "Guide through GHCR authentication",
      { github_username: { type: "string", description: "Your GitHub username" } },
      async ({ github_username }) => {
        return {
          content: [{
            type: "text",
            text: `GITHUB CONTAINER REGISTRY (GHCR) LOGIN GUIDE
    
    Step 1: Create a Personal Access Token (PAT)
    --------------------------------------------
    1. Go to: https://github.com/settings/tokens/new
    2. Give it a name like "GHCR Push Token"
    3. Select scopes:
       [x] write:packages
       [x] read:packages
       [x] delete:packages (optional)
    4. Click "Generate token"
    5. COPY THE TOKEN NOW (you won't see it again!)
    
    Step 2: Login to GHCR
    ---------------------
    Option A - Interactive (paste token when prompted):
      docker login ghcr.io -u ${github_username}
    
    Option B - Using environment variable:
      export CR_PAT=your_token_here
      echo $CR_PAT | docker login ghcr.io -u ${github_username} --password-stdin
    
    Step 3: Verify Login
    --------------------
      docker pull ghcr.io/github/super-linter:latest
      (If this works, you're logged in!)
    
    FOR CI/CD (GitHub Actions):
    ---------------------------
    Use the built-in GITHUB_TOKEN:
      - name: Login to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: \${{ github.actor }}
          password: \${{ secrets.GITHUB_TOKEN }}`
          }]
        };
      }
    );
  • Input schema for the ghcr_login_guide tool, requiring an optional github_username parameter.
    { github_username: { type: "string", description: "Your GitHub username" } },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Guide through' suggests an interactive or instructional process, but the description doesn't specify whether this tool performs authentication actions, provides instructions only, requires user input, or has any side effects. This leaves significant behavioral uncertainty for a tool that presumably involves authentication processes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just four words, which is appropriate for a tool with no parameters. It's front-loaded with the essential information (it's a guide for GHCR authentication) without unnecessary elaboration. Every word earns its place in conveying the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is an authentication-related tool with no annotations and no output schema, the description is insufficiently complete. Authentication tools often involve permissions, side effects, or specific prerequisites, but the description provides none of this context. It doesn't explain what 'guide through' entails operationally or what the user can expect from using this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema description coverage, so the baseline score is 4. The description doesn't need to explain any parameters, and it appropriately doesn't mention any since there are none to document.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Guide through GHCR authentication' states the tool's purpose as providing guidance for GitHub Container Registry authentication, which is clear but somewhat vague. It specifies the resource (GHCR) and action (guide through authentication), but doesn't distinguish it from sibling tools like 'ghcr_push' or 'azure_acr_setup' that might involve similar authentication concepts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools related to authentication and setup (e.g., 'azure_setup_guide', 'github_secrets_guide', 'dev_onboarding_check'), but the description doesn't indicate when this specific GHCR authentication guide is appropriate versus other authentication or setup tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rideRTD/RTD-DevOps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server