Lean GitHub MCP

Lean GitHub MCP

lean-github-mcp•bynoushad999

A Model Context Protocol server that connects Claude directly to the GitHub API, letting users manage GitHub workflows through natural conversation with token-efficient responses.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides 19 tools for repositories, issues, pull requests, branches, commits, files, code search, comments, releases, and GitHub Actions workflows.
  • •Trims and caches GitHub API responses to reduce token usage, stripping nulls and limiting response size.
  • •Supports merging pull requests with merge, squash, or rebase strategies and creating releases with notes.
  • •Can trigger GitHub Actions workflow dispatch events with optional inputs.

BEST FOR

  • •Developers who want to manage GitHub issues, pull requests, branches, and releases through Claude conversations.
  • •Teams wanting token-efficient GitHub API interactions to preserve Claude's context window.
  • •Automating GitHub workflows such as triaging issues and merging PRs without switching to a browser.

ABOUT LEAN-GITHUB-MCP

Lean GitHub MCP is cataloged as an MCP server attributed to noushad999. A Model Context Protocol server that connects Claude directly to the GitHub API, letting users manage GitHub workflows through natural conversation with token-efficient responses. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Lean GitHub MCP are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

上游原版 README

在 GitHub 查看同一版本原文

README.md · b2eec4ddb6e0 · 采集于 2026-11-13 13:13:27 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Lean GitHub MCP

Control GitHub entirely through Claude — in plain English.

Create PRs, manage issues, trigger workflows, cut releases, review diffs — without touching a browser.

GitHub MCP Server demo

26x smaller responses than the official GitHub MCP — your Claude context window goes further.

npm CI MCP Compatible TypeScript License: MIT Tests Tools


What is this?

This is a Model Context Protocol (MCP) server that connects Claude directly to the GitHub API. Once installed, you can manage your entire GitHub workflow through natural conversation — no GUI, no copy-pasting URLs, no context switching.

You type this in Claude:

Merge PR #47 with squash, delete the branch, then create a release v2.1.0 with those changes

Claude does all of it. Three API calls. Done.


Why this instead of the official GitHub MCP?

This ServerOfficial GitHub MCP
Setupnpm install + tokenDocker required
Response size~320 avg tokens2000+ tokens (raw API)
Token efficiencyNull stripping, compactifyRaw JSON passthrough
Caching120s in-memory cacheNo cache
Tools19 tools~30 tools
Default branchAuto-detectedHard-coded main
Error messagesStatus codes includedGeneric messages
LicenseMIT — use anywhereMIT

Bottom line: This server was built to be lean. Every response is stripped of nulls, truncated intelligently, and cached where it makes sense. Your Claude context window is treated as a precious resource.


60-Second Setup

Option 1 — Run with npx (no install needed):

GITHUB_TOKEN=ghp_your_token npx @noushad999/lean-github-mcp

Option 2 — Install globally from npm:

npm install -g @noushad999/lean-github-mcp
lean-github-mcp

Option 3 — Docker (coming soon):

docker run -e GITHUB_TOKEN=ghp_your_token ghcr.io/noushad999/lean-github-mcp

Option 4 — Clone from source:

git clone https://github.com/noushad999/lean-github-mcp.git
cd lean-github-mcp
npm install && npm run build
echo "GITHUB_TOKEN=ghp_your_token" > .env

Claude Desktop — edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (Mac):

Using npx (easiest — no install needed):

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@noushad999/lean-github-mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Using local build:

{
  "mcpServers": {
    "github": {
      "command": "node",
      "args": ["C:/absolute/path/to/lean-github-mcp/dist/index.js"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Claude Code (CLI):

claude mcp add github -- node /absolute/path/to/lean-github-mcp/dist/index.js

Restart Claude. You're done.


Token Permissions Required

Go to github.com/settings/tokens?type=beta → Fine-grained token:

PermissionLevelUsed by
ContentsRead & Writeget_file, create_branch, delete_branch
IssuesRead & Writelist_issues, create_issue, assign_issue, add_comment
Pull requestsRead & Writelist_prs, create_pr, merge_pr, get_pr_diff
ActionsRead & Writelist_workflows, trigger_workflow
MetadataReadlist_repos, get_repo

Available Tools

Repositories

list_repos

List repositories for any user or organization.

"Show me all of vercel's public repos sorted by recent activity"
ParamTypeRequiredDefault
ownerstringyes—
typeowner | membernoowner

get_repo

Get detailed stats for a specific repository.

"Tell me about facebook/react — stars, forks, language, open issues"
ParamTypeRequired
ownerstringyes
repostringyes

Issues

list_issues

List issues with labels and assignees.

"Show all open bugs in my repo"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
stateopen | closed | allnoopen

create_issue

Create a new issue with labels.

"Create an issue titled 'Login crashes on Safari' with labels bug and priority"
ParamTypeRequired
ownerstringyes
repostringyes
titlestringyes
bodystringno
labelsstring[]no

assign_issue

Add or remove assignees on an issue or PR.

"Assign issue #42 to alice and bob"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
issue_numbernumberyes—
assigneesstring[]yes—
actionadd | removenoadd

Pull Requests

list_prs

List pull requests by state.

"What PRs are currently open in vercel/next.js?"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
stateopen | closed | allnoopen

create_pr

Create a pull request. Automatically detects the repo's default branch if base is omitted.

"Create a PR from feat/dark-mode to main titled 'Add dark mode support'"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
titlestringyes—
bodystringno—
headstringyes—
basestringnorepo default

get_pr_diff

Get the unified diff of a pull request — up to 200 lines.

"Show me the diff for PR #88"
ParamTypeRequired
ownerstringyes
repostringyes
pull_numbernumberyes

merge_pr

Merge with your chosen strategy.

"Squash-merge PR #47 with title 'feat: dark mode'"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
pull_numbernumberyes—
methodmerge | squash | rebasenomerge
commit_titlestringno—

Branches

create_branch

Create a branch from any base. Auto-detects default branch.

"Create branch fix/header-overflow from main"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
branchstringyes—
basestringnorepo default

delete_branch

Delete a branch — typically after merging.

"Delete the feat/dark-mode branch, it's been merged"
ParamTypeRequired
ownerstringyes
repostringyes
branchstringyes

Commits & Files

list_commits

View recent commit history with authors and timestamps.

"Show the last 5 commits on the main branch"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
branchstringnorepo default
per_page1–10no10

get_file

Read file content from any branch. Files over 100 lines are truncated.

"Show me the contents of src/auth.ts on the dev branch"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
pathstringyes—
branchstringnorepo default

search_code

Search code across GitHub.

"Find all TypeScript files using useAuth hook"
ParamTypeRequiredDefault
querystringyes—
per_page1–10no10

GitHub's code search API requires authentication and has a rate limit of ~10 requests/minute. Results are cached for 120s.


Comments

add_comment

Comment on any issue or pull request.

"Add a comment to PR #55 saying the deployment is ready for testing"
ParamTypeRequired
ownerstringyes
repostringyes
issue_numbernumberyes
bodystringyes

Releases

get_release

Get the latest release or look up a specific tag.

"What's the latest release of vercel/next.js?"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
tagstringnolatest

create_release

Publish a new release with release notes.

"Create release v2.1.0 on the main branch with the changelog I'll paste"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
tag_namestringyes—
namestringnotag name
bodystringno—
draftbooleannofalse
prereleasebooleannofalse
target_commitishstringnorepo default

GitHub Actions

list_workflows

List all workflows in a repository.

"What GitHub Actions workflows does this repo have?"
ParamTypeRequired
ownerstringyes
repostringyes

trigger_workflow

Trigger a workflow dispatch event with optional inputs.

"Trigger the deploy.yml workflow on the staging branch"
ParamTypeRequiredDefault
ownerstringyes—
repostringyes—
workflow_idstring | numberyes—
refstringnorepo default
inputsobjectno{}

How It Works

You (natural language)
        │
        ▼
   Claude AI
        │  MCP Protocol (stdio)
        ▼
┌──────────────────────────────────┐
│        lean-github-mcp           │
│                                  │
│  ┌─────────────────────────┐     │
│  │   19 Tool Handlers      │     │
│  └────────┬────────────────┘     │
│           │                      │
│  ┌────────▼─────┐  ┌──────────┐  │
│  │  Token Guard │  │  Cache   │  │
│  │  4000 char   │  │  120s    │  │
│  │  null strip  │  │  200 max │  │
│  └────────┬─────┘  └────┬─────┘  │
│           └──────┬───────┘        │
│                  ▼                │
│      ┌──────────────────┐         │
│      │  GitHub Client   │         │
│      │  Axios + Auth    │         │
│      │  Status codes    │         │
│      └──────────────────┘         │
└──────────────┬───────────────────┘
               │ HTTPS
               ▼
        api.github.com

Token Efficiency — Why It Matters

Every response the MCP server sends consumes your Claude context window. Bloated responses mean Claude forgets earlier parts of your conversation faster. This server aggressively minimizes response size:

Raw GitHub API response for a single repository:

{
  "id": 1296269,
  "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
  "name": "Hello-World",
  "full_name": "octocat/Hello-World",
  "private": false,
  "owner": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "...",
    ... 20 more owner fields
  },
  "html_url": "https://github.com/octocat/Hello-World",
  "description": "This your first repo!",
  ... 80+ more fields, mostly null
}

~2,400 tokens

This server's response:

{
  "name": "Hello-World",
  "full_name": "octocat/Hello-World",
  "description": "This your first repo!",
  "stars": 2045,
  "forks": 1731,
  "language": "JavaScript",
  "open_issues": 12,
  "updated_at": "2024-01-15T10:30:00Z",
  "html_url": "https://github.com/octocat/Hello-World"
}

~90 tokens — 26x smaller


Real-World Example Conversations

Full PR workflow:

You: Show me open PRs in my-org/my-repo

Claude: Found 3 open PRs:
  #88 — "Add OAuth2 support" by sarah_dev
  #91 — "Fix memory leak in worker" by john_k
  #94 — "Upgrade to Node 22" by bot

You: Show me the diff for #91

Claude: [shows unified diff of the memory leak fix]

You: Looks good. Merge it with squash, then delete the branch

Claude: Done — squash merged PR #91 (sha: a3f9c21), deleted branch fix/memory-leak

You: Now create a release v3.2.1 from main with changelog: "Fixed memory leak in background workers"

Claude: Release v3.2.1 published — https://github.com/my-org/my-repo/releases/tag/v3.2.1

Four separate GitHub operations. One conversation.


Automated triage:

You: List open issues in my-org/api-server, assign the ones labeled "bug" to me

Claude: Found 4 open issues. 2 have the "bug" label (#34, #41).
  Assigned #34 and #41 to you.

Testing

npm run build
npx tsx tests/simulate-10-users.ts

Expected output:

╔══════════════════════════════════════════════════════════╗
║     GitHub MCP Server - 10 User Deployment Test        ║
║          19 Tools · Full Coverage Simulation           ║
╚══════════════════════════════════════════════════════════╝
...
║  Total Tests:        49                  ║
║  Passed:             49                  ║
║  Failed:             0                   ║
║  Pass Rate:          100.0          %    ║
║  Null Fields Found:  0                   ║
║  Avg Response:       319            tokens ║
╚══════════════════════════════════════════╝
🎉 ALL TESTS PASSED! Ready for production.

You can also inspect live with the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js

Project Structure

lean-github-mcp/
├── src/
│   ├── index.ts                  # MCP server entry, tool registration
│   ├── github-client.ts          # Axios client + getDefaultBranch helper
│   ├── middleware/
│   │   └── tokenGuard.ts         # Response trimmer: null strip, compactify, 4000 char limit
│   ├── utils/
│   │   └── cache.ts              # 120s TTL in-memory cache, max 200 entries
│   └── tools/                    # 19 tool handlers (one file each)
│       ├── list_repos.ts
│       ├── get_repo.ts
│       ├── list_issues.ts
│       ├── create_issue.ts
│       ├── assign_issue.ts
│       ├── list_prs.ts
│       ├── create_pr.ts
│       ├── get_pr_diff.ts
│       ├── merge_pr.ts
│       ├── create_branch.ts
│       ├── delete_branch.ts
│       ├── list_commits.ts
│       ├── get_file.ts
│       ├── search_code.ts
│       ├── add_comment.ts
│       ├── get_release.ts
│       ├── create_release.ts
│       ├── list_workflows.ts
│       └── trigger_workflow.ts
├── tests/
│   └── simulate-10-users.ts      # Full simulation test, 49 assertions
├── dist/                         # Compiled JS (after npm run build)
├── package.json
├── tsconfig.json
└── .env.example

Troubleshooting

GITHUB_TOKEN not set

cat .env    # make sure GITHUB_TOKEN=ghp_... is there

GitHub API (403): Rate limited or insufficient permissions

  • Fine-grained tokens need explicit repository access — check the permissions table above
  • Code search has a stricter limit (~10 req/min) — wait 60s and retry

GitHub API (404): Resource not found

  • Double-check the owner and repo spelling
  • Private repos need your token to have access to them

GitHub API (422): Unprocessable

  • Usually means a PR already exists for that branch, or a branch name is invalid

Command not found: node in Claude Desktop

  • Use the full path: C:\Program Files\nodejs\node.exe (Windows) or run which node on Mac/Linux

Contributing

Contributions are welcome — see CONTRIBUTING.md for a step-by-step guide to adding new tools, code conventions, and the PR checklist.


Roadmap

  • list_workflow_runs — view CI status for a branch
  • get_commit — detailed single commit with files changed
  • compare_branches — diff between two branches
  • update_file — commit a file change directly
  • add_label / remove_label — label management

Open an issue if you want something added.


License

MIT — do whatever you want with it.


Built for developers who'd rather talk to Claude than click through GitHub.

Report a bug · Request a feature

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Lean GitHub MCP from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/lean-github-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools