LABSCO 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/plainMIME 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
maincurrently 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.
Setup effort
Build from source
USE CASES
01
Letting an assistant read one repository and no others
Pin owner and repo in the environment so the token's wider reach is not exposed through this connection.
02
Answering questions against a release branch
Set the branch variable so the files being read match what is deployed, not what is on main.
03
Working through a private repository
The token supplies the access, so internal code is browsable the same way a public repository would be.
BEFORE YOU INSTALL
What to know first
Requires
GITHUB_PERSONAL_ACCESS_TOKEN in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
TERMINAL
git clone https://github.com/loglmhq/mcp-server-github-repo
cd mcp-server-github-repo
npm install
npm run buildMCP Clients
Claude Desktop
CLAUDE DESKTOP · JSON
{
"mcpServers": {
"mcp-server-github-repo": {
"command": "<YOUR_PATH_TO_MCP_SERVER_GITHUB_REPO>/build/index.js",
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>",
"GITHUB_OWNER": "<YOUR_GITHUB_OWNER>",
"GITHUB_REPO": "<YOUR_GITHUB_REPO>"
}
}
}
}<YOUR_PATH_TO_MCP_SERVER_GITHUB_REPO> is the folder you cloned and built, <YOUR_GITHUB_PERSONAL_ACCESS_TOKEN> a GitHub personal access token that can read the repository, and <YOUR_GITHUB_OWNER> / <YOUR_GITHUB_REPO> name the repository to expose. Add GITHUB_BRANCH to pin a branch.