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

Capabilities

Features and capabilities supported by this server

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

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/hareeshbounteous/github-mcp'

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