github-stars-mcp
Provides tools for organizing and managing GitHub starred repositories, including offline concept search, health audits, tech-stack recommendations, catalog generation, and live synchronization with native GitHub Star Lists via GraphQL.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@github-stars-mcp search my stars for a local embedding model"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub Stars MCP (github-stars-mcp)
A production-grade, context-window-aware Model Context Protocol (MCP) server that organizes your GitHub starred repositories using AI agents, creates curated markdown catalogs with non-destructive merge, and synchronizes directly with native GitHub Star Lists.
💡 Why This Exists: The "Star Graveyard"
Most developers have dozens or hundreds of starred repositories on GitHub that sit completely unused:
No Search by Concept: GitHub search only matches exact words. Searching for "local embedding model" won't find a repo titled "fast-sentence-bert".
Context Window Exhaustion: Trying to feed 70+ full README files directly into an LLM blows past context limits and incurs heavy token costs.
Data Loss on Updates: Re-running generic organization scripts often wipes personal notes, destroys custom tags, or creates duplicate lists.
Rate-Limiting & Drift: Fast concurrent API calls hit GitHub secondary rate limits (HTTP 403/429) or suffer from index drift when new stars are added mid-run.
GitHub Stars MCP solves all of these problems with an enterprise-grade, resilient Map-Reduce pipeline.
Related MCP server: star-knowledge-base
⚡ Key Features
🔍 Local Concept & Problem-to-Solution Search Engine: Zero-dependency local hybrid BM25 with multi-field weighted scoring (
name1.5x,tags2.0x,category1.2x,elevator_pitch1.8x,distilled_readme1.0x) and phrase boost. Discovers repositories by conceptual need (e.g. "fast decision engine" ->NandhaKishorM/laya, "screen tracker" ->codetesla51/screentime) in < 5ms completely offline.🩺 Repository Health & Staleness Audit Engine: Comprehensive freshness categorization (
ACTIVE<60d,SLOW60-180d,STALE180-365d,DEAD_ABANDONED>1y,ARCHIVED), legal licensing assessment (Permissive, Copyleft, Unlicensed), and composite 0-100 normalized Health Score.🤖 AI Agent Tech-Stack Recommender: Ingests task descriptions or project briefs, filters out archived/dead tools, and outputs tailored recommendations with copy-paste installation commands (
go install,pip install,cargo add,npm install) and rationale.💻 Unified Standalone Terminal CLI (
github-stars): Rungithub-stars search,github-stars audit,github-stars recommend,github-stars sync, andgithub-stars catalogdirectly in your terminal with colored dashboards and JSON piping.🧠 Multi-Agent Map-Reduce Pipeline: Freezes an immutable snapshot of all starred repos at initialization (
github_orchestrate_workers), slices them into deterministic worker chunks (github_get_worker_chunk), and collects results into a unified session (github_submit_worker_digest) with zero pagination drift.🧹 Semantic README Distillation: Cleanses raw documentation by stripping badges, images, SVGs, license blocks, and tables while strictly preserving centered hero text, elevator pitches, and core architectural concepts.
⚡ Two-Tier Caching (Memory + Disk): L1 in-memory + L2 disk cache. Incremental runs process newly starred repositories in milliseconds, consuming zero API rate limits for existing stars.
🛡️ Non-Destructive Smart Merge: Automatically detects existing
GITHUB_STARS.mdfiles. Appends new stars, updates table-of-contents badges, and strictly preserves user manual notes (> **User Note:**) and custom annotations.🔄 Live GitHub Star Lists Synchronization: Directly interacts with GitHub's GraphQL API to create canonical category lists on
github.com/stars/<user>/listsand assign repositories to them with atomic batch mutations.🛡️ Production Resilience Layer:
Exponential Backoff with Jitter: Automatically catches and retries transient HTTP 403, 429, and socket reset errors.
Empty / Missing README Fallback: Synthesizes structured context from repository descriptions, languages, and topics if a repository lacks a README.
Windows Atomic File Writes: Uses temporary files with atomic rename and retry backoff to eliminate Windows
EBUSYfile locking errors under concurrent sub-agent access.Security Hardening: Strict workspace sandboxing (CWE-22 path traversal defense) and prototype collision protection (CWE-1321).
📐 Architecture & Flow
flowchart TD
subgraph GitHub["GitHub Platform"]
G1["User Starred Repositories"]
G2["Live GitHub Star Lists (GraphQL)"]
end
subgraph Server["github-stars-mcp Server"]
S1["fetchAllStarsSnapshot()"]
S2["Two-Tier Cache (L1 Memory / L2 Disk)"]
S3["Semantic Distiller (distillReadme)"]
S4["Multi-Agent Orchestrator"]
S5["Taxonomy Normalizer (Sørensen-Dice)"]
S6["Smart Merge Exporter"]
end
subgraph Agents["AI Agent Layer (Antigravity / Claude / Cursor)"]
A1["Primary Planner Agent"]
A2["Worker Sub-Agent 1"]
A3["Worker Sub-Agent 2"]
A4["Worker Sub-Agent N"]
end
subgraph Output["Artifacts"]
O1["GITHUB_STARS.md (Dual TOC Anchors)"]
end
G1 --> S1
S1 --> S2
S2 -- Miss --> S3
S3 --> S4
S4 --> A1
A1 --> A2 & A3 & A4
A2 & A3 & A4 --> S5
S5 --> S6
S6 --> O1
S6 --> G2🚀 Quickstart & Installation
1. Prerequisites
Node.js: v18.0.0 or higher
GitHub Authentication: Either the GitHub CLI (
gh) authenticated withuserscope:gh auth login -s user,repoOR a personal access token set in your environment:
export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_yourTokenHere" # On Windows PowerShell: $env:GITHUB_PERSONAL_ACCESS_TOKEN="ghp_yourTokenHere"
2. Clone and Install Dependencies
git clone https://github.com/SalAkBuK/github-stars-mcp.git
cd github-stars-mcp
npm install🔌 Connecting to AI Coding Assistants
Claude Desktop
Add this to your claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"github-stars": {
"command": "node",
"args": ["/absolute/path/to/github-stars-mcp/index.js"]
}
}
}Antigravity / Cursor / Cline (mcp_config.json)
{
"mcpServers": {
"github-stars": {
"command": "node",
"args": ["/absolute/path/to/github-stars-mcp/index.js"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_yourTokenHere"
}
}
}
}🛠️ MCP Tool Reference
Tool Name | Type | Description |
| Search | Instant offline concept & problem-to-solution discovery (< 5ms) via local hybrid BM25 and weighted field scoring. |
| Audit | Analyzes repository freshness (active/slow/stale/abandoned/archived), license safety, and calculates composite 0-100 Health Score. |
| Recommendation | AI Agent Stack Recommender: matches project briefs to vetted starred tools with copy-paste install commands. |
| Orchestration | Freezes a static star snapshot, computes optimal chunk sizes, and returns prompt plans for parallel workers. |
| Worker | Returns an assigned slice of repositories with pre-distilled READMEs and token budgets. |
| Worker | Ingests analyzed repositories, normalizes category names, and updates the orchestration session. |
| Monitoring | Checks completion status, active worker state machines, and catalog progress. |
| Resilience | Reassigns failed workers or forces compilation from completed chunks if a worker times out. |
| Catalog | Generates or merges |
| Live Sync | Fetches native user star lists from |
| Live Sync | Creates a new native GitHub Star List via GraphQL mutation. |
| Live Sync | Assigns repositories to one or more GitHub Star Lists on github.com. |
| Batch Read | Fetches a batch of starred repos with distilled READMEs for single-agent workflows. |
| Read | Fetches and distills a single repository's README. |
| Read | Lists starred repositories with pagination, stars count, and topics. |
| Info | Returns authenticated username and total star count. |
| Maintenance | Flushes in-memory and disk caches. |
💻 Standalone Terminal CLI (github-stars)
You can use github-stars as a fast terminal tool completely independent of an active AI assistant:
# Instant conceptual search (< 5ms offline)
npx github-stars search "fast decision engine"
npx github-stars search "screen tracker" --limit 5
# Repository health and license audit
npx github-stars audit
npx github-stars audit --filter stale
npx github-stars audit --filter unlicensed --json
# AI agent tech-stack recommendation
npx github-stars recommend "screen time tracker daemon in Go" --language Go
# Live synchronization with GitHub Star Lists
npx github-stars sync
# Catalog export and merge
npx github-stars catalog --mode mergeCLI Options Reference
Option | Command(s) | Description |
|
| Filter search scope to a specific category. |
|
| Maximum number of results to return (default: 10 for search, 5 for recommend). |
|
| Minimum BM25 similarity score threshold (default: 0.1). |
|
| Filter audit report: |
|
| Minimum composite health score threshold (0-100). |
|
| Constrain stack recommendations by programming language (e.g. |
|
| Export mode: |
| All | Path to custom |
|
| Refresh live repository metadata from GitHub API into local cache. |
| All | Output results in clean, machine-readable JSON format. |
📂 Canonical Baseline Taxonomy
The default taxonomy is calibrated to cover software development domains without category explosion:
AI & Agent Infrastructure: Agent harnesses, LLM toolkits, MCP servers, and prompt frameworks.Developer Tools & CLI: Terminals, build tools, editors, and modern developer utilities.System Design & Backend Architecture: Distributed systems, network proxies, games, and backend engines.Frontend & UI Libraries: Component libraries, design systems, icons, and UI primitives.Databases & Data Engineering: Embedded databases, SQL engines, and analytical storage.Security & Reverse Engineering: Decompilers, secret scanners, static analyzers, and offensive tooling.Educational & Roadmaps: CS fundamentals, interview guides, and engineering primers.Inspiration & Creative Ideas: Creative experiments, hardware drivers, and retro simulators.
🧪 Running the Test Suite
The repository includes comprehensive unit and integration test batteries covering regression fixes, rate limiting, and atomic disk writes:
# Run core regression & audit suites
npm test
# Run multi-agent resilience & concurrency tests
npm run test:resilience
# Test live GitHub list sync script
npm run sync📜 License
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
17 toolsgithub_assign_repo_to_listsA
Assign or update a repository's membership in native GitHub Star Lists (requires token with 'user' scope).
Inputs: list_ids (required), repo_node_id (required).
github_audit_stars_healthA
Audit health, maintenance freshness, and licensing safety across starred repositories. Detects dead abandonware, stale projects, and unmaintained dependencies with composite 0-100 health scoring.
Inputs: filter, refresh, min_health_score.
github_batch_get_starred_with_readmeB
High-performance batch tool: fetches starred repositories + distilled READMEs with dynamic token budgeting, local caching, and speculative next-batch prefetching.
Inputs: page, sort, distill, profile, +5 more.
github_clear_cacheB
Clear memory and disk caches for GitHub stars and READMEs.
Inputs: no named parameters.
github_create_user_listA
Create a new native GitHub Star List on github.com (requires token with 'user' scope).
Inputs: name (required), is_private, description.
github_export_catalogB
Save or update an organized Markdown catalog file (e.g. GITHUB_STARS.md) grouping repositories by category with summaries and tags.
Inputs: mode, file_path, categories, catalog_title, +1 more.
github_force_reduce_sessionA
Resilience Tool: Force-reduces an orchestration session when a worker is orphaned, times out, or fails. Can proceed with available repos or reassign missing chunks.
Inputs: session_id (required), missing_worker_policy (required).
github_get_orchestration_statusB
Inspect current progress, completed workers, worker state machine, and compiled categories of an orchestration session.
Inputs: session_id (required).
github_get_readmeB
Fetch the README markdown for a repository with semantic distillation, ETag caching (24h TTL), and context budget controls.
Inputs: repo (required), owner (required), distill, profile, +2 more.
github_get_user_infoA
Get authenticated GitHub user details and total count of starred repositories (cached with 15min TTL).
Inputs: refresh.
github_get_user_listsB
Get all native GitHub Star Lists created by the authenticated user along with their current items and IDs.
Inputs: refresh.
github_get_worker_chunkA
Worker Tool: Fetches the exact frozen snapshot chunk assigned to this worker by session_id and worker_id, including pre-distilled READMEs.
Inputs: worker_id (required), session_id (required), profile.
github_list_starredB
Fetch a paginated list of starred repositories with details (cached with 10min TTL).
Inputs: page, sort, refresh, per_page, +1 more.
github_orchestrate_workersA
Map-Reduce Step 1: Takes an immutable frozen snapshot of all starred repos (eliminating mid-run mutation drift), extracts baseline taxonomy, and generates balanced worker chunk plans.
Inputs: profile, session_id, num_workers, custom_categories.
github_recommend_stackB
AI Agent Tech-Stack Recommender: recommends vetted starred tools and libraries for a project brief or task description, with copy-paste installation commands and rationale.
Inputs: task_description (required), language, max_recommendations.
github_search_starsB
Instant offline concept & problem-to-solution discovery across starred repositories. Powered by zero-dependency local hybrid BM25 and weighted field scoring (< 5ms).
Inputs: query (required), limit, category, min_score.
github_submit_worker_digestA
Map-Reduce Step 2: Allows sub-agents to submit their distilled category & pitch digest. Validates against baseline taxonomy, prevents reassigned worker race conditions, and handles GraphQL list sync fallback.
Inputs: worker_id (required), session_id (required), analyzed_repos (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools have clear, distinct responsibilities, especially the orchestration pipeline steps. However, list_starred and batch_get_starred_with_readme overlap significantly in retrieving starred repos, and get_readme also overlaps with the batch tool's README fetching, creating potential confusion.
All tools follow a consistent github_verb_noun pattern in snake_case. Even longer names like batch_get_starred_with_readme and assign_repo_to_lists fit the convention, making the set highly predictable.
At 17 tools, the set is slightly above the ideal 3-15 range but each tool serves a defined purpose—the orchestration group alone accounts for 5. The count feels heavy but not bloated for the breadth of features offered.
The server covers star retrieval, README reading, list management, catalog export, health auditing, and search. Notable gaps include no way to remove a star/unstar, no delete or rename for user lists, and list membership only being add/update without explicit removal functionality.
Maintenance
Related MCP Connectors
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Read-it-later for AI agents. Save links, bookmarks, notes, and videos as Markdown and search them.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables managing GitHub starred repositories with semantic search and RAG-based Q&A, along with optional Gitea backup.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to search and retrieve information from your GitHub starred repositories via semantic matching, turning your stars into a searchable personal code toolbox.1-
- AlicenseAqualityBmaintenanceExposes a locally indexed, Chinese-and-English searchable knowledge base of your starred GitHub repositories as MCP tools, letting agents search by what a project does, fetch full records, view statistics, sync new stars, and rebuild the index.3MIT
- FlicenseNot gradedqualityCmaintenanceExposes a local SQLite catalog of your GitHub stars — READMEs, licenses, topics, tags, notes, and fit scores — as fifteen read and write tools for a coding agent over stdio, with spend-limited live GitHub search, refresh, and sweep calls. It lets agents search and annotate the library and rescore repositories without ever acting on GitHub.-