Labsco
MCP SERVER

GitHub Repository

by loglmhq

Expose one GitHub repository to an assistant as browsable MCP resources — files as plain text, directories as listings, pinned to the branch you choose.

Git Hosting & Code Review
Summary
Resources, not tools — and one repository at a time.

Because the repository is fixed by environment variable, this is a scoping tool: the assistant can read that repository and nothing else in your GitHub account. Serving files as resources rather than tool results also means a client can pull them into context without spending a tool call. The trade is that switching repositories means a second server entry.

What it is

An MCP server that fronts a single GitHub repository, configured at startup rather than passed per call. It surfaces the repository through resources instead of tools: the client lists what is there and reads a file when it wants one, using GitHub's contents API under the hood.

What you get
  • Any file in the configured repository readable by URI, served with the `text/plain` MIME type
  • Directory listings for navigating the tree, served as `application/x-directory`
  • Branch-specific access, so you can pin an assistant to a release branch instead of whatever `main` currently holds
  • URIs that follow the GitHub contents API shape: `https://api.github.com/repos/{owner}/{repo}/contents/{path}`
Requirements

A GitHub personal access token with permission to read the repository's contents. Four environment variables configure it: `GITHUB_PERSONAL_ACCESS_TOKEN`, `GITHUB_OWNER`, `GITHUB_REPO`, and an optional `GITHUB_BRANCH`. Build from source with `npm install` and `npm run build`, then point the client at `build/index.js`. Package `@loglm/mcp-server-github-repo` at 0.1.0, MIT.