Skip to main content
Glama

GitHub URL MCP Server

GitHub URL MCP Server

An MCP (Model Context Protocol) server for handling GitHub URLs with validation and parsing capabilities.

This server provides tools to convert between GitHub repository information and URLs, with intelligent validation to distinguish between public repositories, private repositories, and non-existent repositories.

Background

This tool was created to solve the problem where LLMs often struggle to properly handle GitHub-related tasks and fail to appropriately call MCP tools for GitHub operations. Many LLMs have difficulty constructing correct GitHub URLs from repository information, parsing GitHub URLs to extract meaningful components, or knowing when to use available MCP tools for GitHub-related requests. This server provides specialized tools that make these operations reliable and consistent for AI applications.

Note: This issue might be specific to the LLMs I commonly use, but providing dedicated tools ensures consistent behavior across different AI systems. Or perhaps I should just quietly invest a fortune in Claude Code's max plan instead.

Features

  • URL Building: Convert owner/repo pairs to properly formatted GitHub URLs
  • URL Parsing: Extract owner, repository, and path information from GitHub URLs
  • Smart Repository Validation: Distinguish between public, private, and non-existent repositories
  • Private Repository Detection: Identify when a repository exists but is private
  • Comprehensive Status Reporting: Clear status indicators for repository accessibility
  • Error Handling: Detailed error messages for invalid inputs
  • No Authentication Required: Works without GitHub API tokens
  • Timeout Protection: Network requests have built-in timeouts

Tools

github/build_url

Converts GitHub owner and repository name into a properly formatted GitHub URL with validation.

Parameters:

  • owner (string): GitHub username or organization name
  • repo (string): Repository name

Example:

{ "owner": "microsoft", "repo": "vscode" }

Returns:

  • https://github.com/microsoft/vscode (for public repositories)
  • https://github.com/owner/repo + 🔒 Note (for private repositories)
  • https://github.com/owner/repo + ⚠️ Warning (for non-existent repositories)
  • https://github.com/owner/repo + ❌ Error (for validation errors)

github/parse_url

Parses a GitHub URL to extract owner, repository name, and additional path information with validation.

Parameters:

  • url (string): GitHub URL to parse

Example:

{ "url": "https://github.com/microsoft/vscode/tree/main/src" }

Returns:

{ "owner": "microsoft", "repo": "vscode", "url": "https://github.com/microsoft/vscode", "additionalPath": "tree/main/src", "status": "public", "accessible": true }

Status Values:

  • "public": Repository is publicly accessible
  • "private": Repository exists but is private
  • "not_found": Repository does not exist
  • "error": Validation error occurred

Additional Fields:

  • accessible: Boolean indicating if the repository is publicly accessible
  • note: Information message for private repositories
  • warning: Warning message for non-existent repositories
  • error: Error message for validation failures

Development

Setup

npm install

Start the server

npm run start

Development mode with CLI interaction

npm run dev

Testing

npm run test

Linting and formatting

npm run lint npm run format

Build

npm run build
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP (Model Context Protocol) server for handling GitHub URLs with validation and parsing capabilities.

This server provides tools to convert between GitHub repository information and URLs, with intelligent validation to distinguish between public repositories, private repositories, and non-exist

  1. Background
    1. Features
      1. Tools
        1. github/build_url
        2. github/parse_url
      2. Development
        1. Setup
        2. Start the server
        3. Development mode with CLI interaction
        4. Testing
        5. Linting and formatting
        6. Build

      Related MCP Servers

      • A
        security
        F
        license
        A
        quality
        MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
        Last updated -
        18
        1
        4
        TypeScript
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        An MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.
        Last updated -
        3
        TypeScript
        MIT License
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        An MCP server that enables Git repository operations and GitHub PR workflows, allowing users to manage repositories, create branches, commit changes, and create pull requests through natural language.
        Last updated -
        1
        Python

      View all related MCP servers

      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/kongyo2/GitHub-URL-MCP'

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