Skip to main content
Glama
hareeshbounteous

GitHub Code MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GITHUB_REPONoDefault repository name.nexpose
MAX_FILE_KBNoMaximum file size in KB that can be fetched.500
GITHUB_OWNERNoDefault owner for repository operations.anands-bounteous
GITHUB_TOKENNoGitHub personal access token. Optional for reading public repos, required for search_code.
HTTP_TIMEOUTNoHTTP timeout in seconds.30
MCP_HTTP_HOSTNoHost for HTTP transport.127.0.0.1
MCP_HTTP_PORTNoPort for HTTP transport.8082
FRAGMENT_BACKENDNoFragment backend: tree-sitter, regex, or auto.auto
HTTP_MAX_RETRIESNoMaximum number of HTTP retries on rate limit or 5xx.4
GITHUB_DEFAULT_REFNoDefault git ref (branch or SHA) to use when none specified.
GITHUB_API_BASE_URLNoBase URL for GitHub API, overridable for GitHub Enterprise Server.https://api.github.com
FRAGMENT_CONTEXT_LINESNoNumber of context lines around a match when falling back to context window.20

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_codeA

Search code in the repo for a query string; returns matching files with highlighted fragments showing exactly where the match occurs. Requires GITHUB_TOKEN.

get_file_contentsB

Fetch a file's contents, or a 1-indexed inclusive line range of it.

list_symbolsA

List the classes/interfaces/enums/records/methods/constructors declared in a Java file, with their line ranges — use this to find a symbol name to pass to get_code_fragment.

get_code_fragmentB

Extract one named class/method/constructor body from a Java file.

Uses AST-accurate parsing when tree-sitter-java is installed, else a regex-based heuristic; falls back to a plain text-context window (match_type="context_window") if the symbol isn't a recognisable Java declaration.

list_directoryB

List the files and subdirectories at a path in the repo (default: repo root).

get_repository_infoC

Fetch repository metadata: description, default branch, language, topics.

get_readmeA

Fetch the repository's README as plain text.

list_branchesB

List branches with their latest commit sha.

list_commitsA

List recent commits, optionally scoped to a single file path.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a distinct resource and action: search_code queries, get_file_contents retrieves file content, list_symbols lists declarations, get_code_fragment extracts a symbol body, list_directory navigates, get_repository_info and get_readme provide different repo overview types, and list_branches/list_commits cover history. The related pairs (list_symbols/get_code_fragment, get_repository_info/get_readme) are clearly complementary with no functional overlap.

Naming Consistency5/5

All tool names follow the same snake_case verb_noun pattern with a predictable verb choice: get_* for fetching single items, list_* for enumerating collections, and search_code for querying. This consistent structure makes the tool set easy to navigate.

Tool Count5/5

Nine tools is well within the ideal 3-15 range for a focused code exploration server. Each tool has a clear purpose and collectively they cover the core aspects of reading and navigating a repository without redundancy.

Completeness4/5

The surface covers search, file contents, symbol extraction, directory listing, repo metadata, README, branches, and commits. Minor gaps exist, such as no direct diff viewing or fetching a file at a specific commit, but these are not critical blockers for typical code navigation workflows.

Maintenance

ActivitySlowing
ResponsivenessNo issues