GitHub_MCP_Server CLAUDE.md

Project instructions for a GitHub MCP server, an MCP service that lets an AI agent access GitHub documentation and files through the GitHub API.

In plain words
What is it for?
Listing repositories, finding documentation folders, reading files, and searching documentation across GitHub organizations.
Why use it?
They explain how to set up and run the server and what documentation searches and file-reading operations it provides.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/sperekrestova/github_mcp_server/claude-md
Clone the repo
git clone --depth 1 https://github.com/SPerekrestova/GitHub_MCP_Server
Per session 676 This file is loaded in full into every session.
When invoked 676 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00676 $0.00676
Opus 5 $0.00338 $0.00338
Sonnet 5 $0.00135 $0.00135
Haiku 4.5 $0.00068 $0.00068

Measured 2d ago against content hash f97472b8eaec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

GitHub_MCP_Server CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

GitHub MCP Server - A Model Context Protocol (MCP) server that provides GitHub API access for fetching and searching documentation in /doc folders across GitHub organizations. Built with Gradio for Hugging Face Spaces deployment.

Development Commands

# Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env  # Add GITHUB_TOKEN

# Run locally (starts Gradio server with MCP support)
python main.py
# Server runs on http://localhost:7860
# MCP endpoint: http://localhost:7860/gradio_api/mcp/

Architecture

Single-file MCP server (main.py) using Gradio with MCP support:

  1. MCP Tools (exposed via gr.Interface with mcp_server=True):

    • get_org_repos_tool - List repos with /doc folder detection (uses Search API first, falls back to listing all)
    • get_repo_docs_tool - Get documentation files from repo's /doc folder
    • get_file_content_tool - Fetch and decode file content (handles base64)
    • search_documentation_tool - Search docs across org using GitHub Code Search API
  2. Business Logic Functions (async, testable):

    • get_org_repos(), get_repo_docs(), get_file_content(), search_documentation()
    • Tool functions are async wrappers with error handling
  3. Gradio Interface:

    • gr.TabbedInterface combining 4 tool interfaces
    • Each tool has its own gr.Interface for web UI access
    • MCP tools auto-exposed at /gradio_api/mcp/

Key Implementation Details

  • GitHub API strategy: Search API first for efficiency, fallback to paginated list + check each repo
  • Supported doc types: .md, .mmd, .mermaid, .svg, .yml, .yaml, .json
  • Content decoding: Base64 content from GitHub API is automatically decoded
  • Error handling: All tools return JSON with {"error": "..."} on failure
  • MCP Schema: Available at /gradio_api/mcp/schema

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 72 lines · 676 tokens per session scan A f97472b8eaec

Subscribe to this mod's changes

GitHub_MCP_Server CLAUDE.md is an instructions file published in the GitHub repository SPerekrestova/GitHub_MCP_Server (0 stars, last pushed 4mo ago), licensed MIT. It adds 676 tokens to every session, about $0.0034 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

arxiv-mcp-server CLAUDE.md

Instructions for blazickjp/arxiv-mcp-server, covering claude.md, project, setup and validation, architecture and tool groups.

blazickjp/arxiv-mcp-server · 831 tokens

mcp-server-excel llm-testing-philosophy.instructions.md

Instructions for sbroenne/mcp-server-excel, covering llm testing philosophy, what are llm tests?, the golden rule, what never belongs in a test and ❌ xfail or skip markers.

sbroenne/mcp-server-excel · 3,451 tokens

mcp-server-excel readme-management.instructions.md

Instructions for sbroenne/mcp-server-excel, covering readme management - quick reference, core entry documents, feature documentation, critical rules and tool & action counts must match.

sbroenne/mcp-server-excel · 2,648 tokens

mcp-server-excel development-workflow.instructions.md

Instructions for sbroenne/mcp-server-excel, covering development workflow, branch protection, development process, pr review comment workflow and retrieve inline code review comments using github cli.

sbroenne/mcp-server-excel · 1,518 tokens

mcp-server-excel extension-development.instructions.md

Instructions for sbroenne/mcp-server-excel, covering vs code extension development instructions, extension overview, changelog and changesets (critical), version management and automatic version management (unified release workflow).

sbroenne/mcp-server-excel · 1,427 tokens

mcp-server-excel copilot-instructions.md

Instructions for sbroenne/mcp-server-excel, covering github copilot instructions - excelmcp, repository map, environment, working rules and build and validation.

sbroenne/mcp-server-excel · 1,206 tokens