Skip to main content
Glama
ritesh31

GitHub MCP Server

by ritesh31

GitHub MCP Server

MCP (Model Context Protocol) server exposing GitHub repository data as tools, a resource, and a prompt. Backed by GitHub's REST API via httpx.

Setup

  1. Install deps:

    uv sync
  2. Copy env template and fill in your token:

    cp .env.example .env

    Generate a token at https://github.com/settings/tokens (needs repo scope for private repos, no scope needed for public read-only).

Related MCP server: github-repo-mcp-server

Run

Start the MCP server (stdio transport):

uv run python server.py

Run the sample client (spawns the server and calls a tool):

uv run python client.py

Tools

Tool

Description

get_repository(owner, repo)

Repo summary — stars, forks, open issues, language

search_issues(owner, repo, state="open")

List issues (excludes PRs)

list_pull_requests(owner, repo, state="open")

List pull requests

search_repository_issues(owner, repo, keyword)

Keyword search over repo issues

Resource

github://repo/{owner}/{repo} — repository details as text.

Prompt

review_repository(owner, repo) — generates a prompt to analyze repo health (issues, PRs, activity, risks).

Project layout

  • server.py — MCP server, all tools/resource/prompt

  • client.py — sample MCP client exercising the server over stdio

  • github_service.py, test_github.py — early prototype scratch, superseded by server.py (kept commented for reference)

Giving this to a colleague

No manual clone needed — uv fetches and runs the server directly from the git repo. Each person still runs their own local copy with their own token; nothing is centrally hosted.

  1. Register the server with Claude Code (one command, no clone/install step):

    claude mcp add github-assistant --scope local -- uvx --from git+https://github.com/ritesh31/github-mcp github-mcp

    Replace the URL with this repo's actual location once pushed. uv caches the repo behind the scenes on first run — no visible clone step. --scope local keeps it private to their machine.

  2. Provide GITHUB_TOKEN. Since there's no local clone, there's no .env file to edit — pass the token as an environment variable on the claude mcp add command instead:

    claude mcp add github-assistant --scope local -e GITHUB_TOKEN=ghp_yourColleaguesOwnTokenHere -- uvx --from git+https://github.com/ritesh31/github-mcp github-mcp

    Each person uses their own token (generate at https://github.com/settings/tokens — read-only, fine-grained, scoped to needed repos).

  3. Verify:

    claude mcp list

    Should show github-assistant as Connected. Open a Claude Code session and run /mcp to confirm all 4 tools, the resource, and the prompt are discovered.

  4. Test: ask Claude something like "what's the star count on <owner>/<repo>?" — it should pick the get_repository tool on its own.

Available Tools

4 tools
get_repositoryC

Get information about a GitHub repository.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes

TDQS

C2.4/5.0
Behavior2/5

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

Annotations are absent, so the description carries the full burden of behavioral disclosure. The word 'get' implies a read-only operation, but no further details are given—no mention of authentication, rate limits, return format, or whether the full repository object is returned. This is minimal and insufficient for a tool with zero annotation coverage.

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

Conciseness3/5

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

The description is a single sentence with no wasted words, so it is concise in length. However, it lacks substance—there is no key information to front-load because the content is a generic statement. It is appropriately sized but does not structure or prioritize any meaningful details.

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

Completeness1/5

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

Given the tool's simplicity (2 required parameters, no output schema, no annotations), this description is severely incomplete. It does not explain what 'information' is returned, does not describe parameter semantics, and does not provide any operational context. An agent would have to guess or rely on external knowledge to call this tool correctly.

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

Parameters1/5

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

The schema has 0% description coverage, and the description does not mention the owner or repo parameters at all. It adds no meaning beyond the schema's type definitions. An agent must infer that owner is the GitHub owner and repo is the repository name, but there is no explicit guidance, leaving the parameters effectively undocumented.

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

Purpose4/5

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

The description clearly states a specific action ('Get information about a GitHub repository') with a clear resource. It is distinct from sibling tools (search_issues, list_pull_requests, search_repository_issues) which focus on issues/PRs, so the purpose is unambiguous. However, it does not explicitly differentiate itself from these siblings, and 'information' is vague, leaving what exactly is returned unspecified.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention that this is for repository metadata, nor does it discuss when to use search_issues or list_pull_requests instead. The distinction is implied by the sibling names but not stated explicitly.

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

list_pull_requestsC

List pull requests in a GitHub repository.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
stateNoopen

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
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. It does not mention that this is a read-only operation, nor does it disclose pagination, rate limits, or any side effects. The description only states the basic action without operational context.

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

Conciseness3/5

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

The description is a single, concise sentence without redundancy. However, it is under-specified, lacking structure or front-loading of critical constraints. While it is not bloated, it does not provide enough substance to be considered well-structured.

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 the presence of an output schema, the description need not detail return values, but it should still clarify usage context. It omits important details like default state, pagination, sorting, and when to use this tool over issue search. The description is insufficient for an agent to fully understand the tool's capabilities.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must compensate by explaining the parameters. However, it does not mention owner, repo, or state at all. The description adds no meaning beyond what the schema already shows, which is minimal (field names and types only).

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

Purpose5/5

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

The description clearly states the action (list) and resource (pull requests in a GitHub repository). It is distinct from siblings which focus on issues and repository metadata, so an agent can easily differentiate.

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?

No guidance is provided on when to use this tool versus alternatives like search_issues or search_repository_issues. There is no mention of filtering, sorting, or other selection criteria beyond the basic state parameter.

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

search_issuesC

List issues in a GitHub repository.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
stateNoopen

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
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. It only states 'List issues' without mentioning pagination, default state (though the schema has a default of 'open'), whether pull requests are included, or any read-only implications. This leaves significant behavioral ambiguity.

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

Conciseness3/5

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

The description is a single sentence, so it is concise without wasted words. However, it is overly terse and lacks structure, such as front-loading key information about default behavior or usage context. While not verbose, it fails to provide a well-rounded definition.

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?

The output schema exists, so return format is covered. However, the description omits critical context: the default state (open), whether pull requests are included (GitHub issues vs PRs), and how this tool differs from 'search_repository_issues'. For a tool with three parameters and sibling overlap, this is incomplete.

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

Parameters1/5

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

The description offers no parameter information whatsoever. The schema contains only titles, no descriptions, and schema description coverage is 0%. The agent must infer the meaning of 'owner', 'repo', and 'state' solely from names, which is inadequate. The description should have clarified parameter roles and constraints but does not.

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

Purpose4/5

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

The description states a clear action (list) and resource (issues) within a GitHub repository, making the primary purpose unambiguous. However, it does not differentiate from the sibling 'search_repository_issues', which likely has overlapping functionality. The verb 'list' also conflicts with the tool name 'search_issues', potentially confusing an agent about the exact capability.

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?

There is no guidance on when to use this tool versus its siblings. The description does not mention filtering, search capabilities, or conditions under which 'search_repository_issues' or 'list_pull_requests' would be more appropriate. An agent receives no context for selection.

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

search_repository_issuesC

Search issues in a repository.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
keywordYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior1/5

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

No annotations are provided, so the description bears the full responsibility for disclosing behavior. It only states the action without mentioning read-only nature, output format, pagination, or any side effects. This is a significant gap for a search operation.

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 a single, concise sentence that front-loads the core purpose. It is not verbose and avoids tautology. However, its brevity comes at the cost of missing critical context, but from a pure conciseness standpoint it is well-structured.

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?

For a tool with three required parameters and no annotations, this description is severely incomplete. It does not explain how to construct a search, any limitations, or when to use this tool instead of siblings. The presence of an output schema does not offset the lack of usage guidance and behavioral context.

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

Parameters1/5

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

The schema has 0% description coverage, meaning no parameter descriptions exist. The tool description does not compensate by explaining the meaning, format, or constraints of 'owner', 'repo', or 'keyword'. Although the names are intuitive, the description adds no value beyond what the parameter names imply.

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

Purpose4/5

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

The description clearly states the action (search) and resource (issues in a repository), which is specific and understandable. However, it does not differentiate from the sibling tool 'search_issues', which likely performs a broader search. The agent must infer that this tool is scoped to a repository, but this distinction is not explicit.

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 like 'search_issues' or 'list_pull_requests'. It does not mention any prerequisites, context, or exclusion conditions. An agent has no basis to choose this tool over its siblings beyond the name.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedget_repository
    • First observedlist_pull_requests
    • First observedsearch_issues
    • First observedsearch_repository_issues

TDQS

C2.5/5.0

Scored across 4 tools

Disambiguation2/5

The issue-focused tools are confusingly similar: search_issues actually lists issues, while search_repository_issues searches them, making it hard for an agent to know which to select. get_repository and list_pull_requests are distinct, but the two issue tools create real ambiguity.

Naming Consistency3/5

All tool names use snake_case and a verb_noun pattern, but search_issues is a misleading name for a listing operation and search_repository_issues redundantly adds 'repository' while search_issues does not. This creates a somewhat consistent yet semantically muddled naming scheme.

Tool Count3/5

Four tools is not excessive, but for a server called 'GitHub MCP Server' the count feels thin and narrowly scoped. It is above the 1-2 tool borderline but still underrepresents the expected breadth of a GitHub integration.

Completeness2/5

The surface only covers repository information, issue listing/searching, and pull request listing. Core GitHub operations like creating or updating issues, creating or merging pull requests, and fetching individual items are missing, which will likely cause agent failures for common workflows.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to discover and interact with GitHub repositories through standardized MCP tools, allowing exploration and retrieval of project information without direct API calls.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to query GitHub repositories, issues, pull requests, CI status, and discover trending repos via natural language. Provides MCP tools, resources, and prompts for GitHub data access.
    14
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables natural-language analysis of GitHub repositories by exposing repository metadata, source code retrieval, search, and file reading as MCP tools, with answers grounded in the actual repository content.
    -