repopeek-mcp
Provides read-only tools to browse and search allowed GitHub repositories: listing repositories and files, reading one or multiple files, and grepping contents via git, including optional cloning/fetching and secret-file filtering.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
repopeek-mcp
A read-only MCP server that lets an AI client browse and search GitHub
repositories through git. Every tool result, errors included, is plain type: "text" content, so it works with
clients such as Gemini's custom MCP connector, which drop file bodies sent as MCP resource blocks.
Five tools, no writes:
list_repos,list_files,read_file,read_files,grep.Read-only through git: every read is
git ls-tree/cat-file/grepagainst a bare clone or an existing repository, never a working tree, always with argument arrays (no shell).Deny by default: an empty
ALLOWED_REPOSrefuses every repository; secret-looking files are hidden.Remote MCP: Streamable HTTP at
/mcp(stateless),GET /health, Bearer auth plus OAuth 2.1 for web connectors.
Docs: tool contract, architecture and data flow, deploy example.
Quick start (Docker Compose)
git clone https://github.com/kitepon/repopeek-mcp.git && cd repopeek-mcp
TOKEN=$(openssl rand -base64 32) # the Bearer token; keep it in your password manager
cat > docker-compose.override.yml <<EOF
services:
repopeek-mcp:
environment:
- ALLOWED_REPOS=octocat/Hello-World
- REPOPEEK_TOKEN_SHA256=$(printf %s "$TOKEN" | sha256sum | cut -d' ' -f1)
- REPOPEEK_STORE_KEY=$(openssl rand -base64 32)
EOF
docker compose up -d --build
curl -s http://127.0.0.1:39230/health # {"status":"ok","service":"repopeek-mcp"}The server listens on 127.0.0.1:39230 and refuses to start without REPOPEEK_TOKEN_SHA256. Only the token's
SHA-256 goes into the config; clients send Authorization: Bearer $TOKEN. docker-compose.override.yml is
gitignored; docker-compose.override.yml.example lists every option.
Without Docker (Node.js 20+ and git on PATH):
npm ci && npm run build
export REPOPEEK_TOKEN_SHA256=$(printf %s "$TOKEN" | sha256sum | cut -d' ' -f1)
export REPOPEEK_STORE_KEY=$(openssl rand -base64 32) ALLOWED_REPOS=octocat/Hello-World
npm start # http://0.0.0.0:39230/mcpTo reach it from a hosted client (Gemini and other web connectors), put it behind HTTPS on a public host name and
set REPOPEEK_PUBLIC_URL; deploy/ has a Compose + Caddy example and an ssh deploy script.
Related MCP server: repobase-mcp
Configuration
Environment variables (all read at start):
Variable | Default | Meaning |
| required | SHA-256 hex of the shared Bearer token. The server exits without it |
| empty (refuse all) | comma-separated |
|
| public origin advertised in OAuth metadata |
|
| HTTP port |
|
| OAuth store, wrapped store key, clones and mirrors |
| unset | base64 of 32 bytes; encrypts the OAuth store when no auth module is used |
| unset | github mode credential for private repositories; unset = public only |
| empty | comma-separated |
|
| github fetch and module re-sync period; |
| empty | extra comma-separated secret-file patterns ( |
| unset | Cloudflare Access team domain ( |
| unset | Access application AUD tag |
| empty | optional comma-separated e-mail allow-list on top of the Access policy |
| unset | auth-module caller socket (module mode and module-wrapped store key) |
| unset | auth-module wrap key name, needed for the first wrap |
| empty | comma-separated |
|
|
|
|
|
|
|
|
|
|
| hard max for |
|
|
|
|
| hard max for |
|
|
|
Source modes
Each allowed repository is served from one source:
Public clone (github mode, default):
git clone --bareover HTTPS intoREPOPEEK_DATA_DIR/reposon first use, refreshed bygit fetcheveryREPOPEEK_FETCH_INTERVAL_SEC. No credentials needed.Private repositories, standalone: set
GITHUB_TOKENto a read-only token (a fine-grained PAT with Contents: read on the repositories you allow). It is passed togitthrough environment config for clone and fetch only, never in argv, the stored remote URL or tool output.Local repositories:
REPOPEEK_LOCAL_REPOS=owner/name=/pathserves a bare repository or checkout you mount or keep on disk. It is never fetched; history, branches and tags are whatever that repository has.Auth module (optional): for setups where no credential may enter RepoPeek at all. A separate process holds the GitHub token and exposes a unix socket (
REPOPEEK_AUTH_SOCKET) that takes one JSON request per connection:wrap/unwrap(used to protect the OAuth store key) andhttp(a GET tohttps://api.github.com/repos/<owner>/..., to which the module adds the credential). For owners listed inREPOPEEK_MODULE_ITEMS, RepoPeek rebuilds a local bare mirror from the GitHub git-data API and verifies every object id. The protocol is the one of the BellTeam auth-mediation module; see docs/architecture.md for the exact requests. Limits: only the latest commit of each ref is mirrored (no history, soHEAD~1is not found), and a file larger than the module's answer limit cannot be mirrored (the sync fails with the reason).
Security model
Read-only: there are no write tools. The only disk writes are clones/fetches and module mirrors inside
REPOPEEK_DATA_DIR/repos, and the encrypted OAuth store.Allowlist:
ALLOWED_REPOSempty or unset refuses everything.Secret-file hiding: any path segment matching
.env,.env.*,*.pem,*.key,*secret*,id_rsa*,id_ed25519*,*.p12,*.pfx,credentials.jsonor aREPOPEEK_SECRET_PATTERNSentry is absent fromlist_filesandgrep, and refused byread_file/read_files. This is a safety net, not a substitute for keeping secrets out of the repositories you allow.Input checks: refs starting with
-or containing:are refused (aref:pathtree-ish could otherwise bypass the secret filter);..segments, absolute paths and pathspec magic in globs are refused.Authentication:
/mcpneedsAuthorization: Bearer; the server stores only the token's SHA-256. Web connectors use OAuth 2.1 with dynamic client registration (DCR) and PKCE S256; issued tokens live in an AES-256-GCM encrypted store. The/authorizelogin page asks for the Bearer token, or, whenREPOPEEK_ACCESS_TEAM_DOMAINandREPOPEEK_ACCESS_AUDare set, requires a valid Cloudflare Access JWT instead (fail closed). Put only/authorizebehind Access;/mcp,/token,/registerand/.well-knownmust stay reachable for the client.
Use with Gemini
Deploy RepoPeek on an HTTPS host and set
REPOPEEK_PUBLIC_URL=https://<your-host>.In Gemini, add a custom MCP connector with the URL
https://<your-host>/mcp.Gemini registers itself (DCR) and opens the authorize page. Log in: with Cloudflare Access in front of
/authorize, pass the Access login (e.g. one-time PIN to your e-mail); otherwise enter the Bearer token.Try it: "call list_repos", then
list_files,read_fileandgrepon one of the listed repositories.
Other MCP clients that send a static header can skip OAuth and use Authorization: Bearer <token> directly.
Development
npm ci
npm run typecheck
npm testLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for the GitCore API, enabling AI agents to interact with GitCore repositories, issues, pull requests, and more.
Free, source-checked directory of AI agent tools, MCP servers and skills, with read-only search.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRead-only GitHub MCP server that lets assistants search and read repositories, issues, pull requests, commits, and file contents, scoped to the user's personal access token.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for indexing and searching Git repositories with AI. Enables tools like listing repos, semantic search, file globbing, and regex grep.3 npm18MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server for AI coding agents to inspect repositories, audit code quality, route engineering skills, and plan safe issue/PR workflows.1MIT
- FlicenseNot gradedqualityDmaintenanceA read-only MCP server that exposes GitHub user profiles, repository info, and search via tools for AI assistants like Claude.-