github-readme-mcp
Allows fetching and analyzing README files from public GitHub repositories by providing a repository URL, using the GitHub REST API to retrieve the default branch's README.
Optional integration that uses OpenAI's chat models to polish generated text, such as improved README drafts, intro rewrites, and suggestions, with graceful fallback to deterministic rules.
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-readme-mcp Review README from my project repo."
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-readme-mcp
Give every README a clear score, a punchy intro, and a copy-paste improvement plan—no LLM required.
github-readme-mcp is a small Model Context Protocol (MCP) server that reviews README files using transparent, deterministic rules. Paste markdown, point at a local file, pass a GitHub repo URL, or hand it a raw URL—it returns scores, missing sections, concrete issues, and an improved draft. Optional OpenAI polish kicks in only when you set OPENAI_API_KEY; if the key is missing or the call fails, everything still works.
Try the demo (about 30 seconds)
git clone <repo-url> && cd github-readme-mcp && npm installRun a scored review on the intentionally weak sample README (no build step required):
npm run demoYou should see a low overall score, missing sections (install, usage, license, etc.), and concrete suggestions.
Compare weak vs strong examples side by side:
npm run demo:compareSame analysis as JSON:
npm run demo:json | headOptional:
npm run buildthen usenode dist/cli.js …(see below).
Related MCP server: MCP GitHub README Generator
Why it exists
Great READMEs reduce support load and speed up adoption, but most teams lack a consistent checklist. This project encodes a practical rubric (title, value prop, install, usage, features, demo, badges, contributing, license, support) into MCP tools and a tiny CLI so you can run reviews locally, wire them into an agent, or demo the idea in minutes.
Features
Deterministic analysis — weighted 0–100 score with per-dimension breakdown (title, clarity, install, usage, features, demo, badges, contributing/contact, license).
Multiple inputs — inline markdown, local path,
https://github.com/owner/repo, or any rawhttps://markdown URL (with basic safety checks).Five MCP tools — analyze, grouped suggestions, intro rewrites, full improved README, before/after comparison.
Optional LLM polish —
OPENAI_API_KEY/OPENAI_BASE_URL/OPENAI_MODEL; graceful fallback to rule-based text.CLI —
analyze,improve, andcomparewith--jsonor markdown output.Tests + linting — Vitest, ESLint, Prettier.
Quickstart
git clone <your-fork-or-url>
cd github-readme-mcp
npm install
npm run build # optional until you run dist/ or publishMCP server (stdio)
Use dist/server.js for hosts like Cursor (single-purpose entry, easy to reason about):
npm start
# same as:
node dist/server.jsThe github-readme-mcp npm bin points at dist/cli.js: with no arguments it also starts the stdio MCP server, so npx github-readme-mcp works the same way after a build.
CLI commands
During development (TypeScript via tsx, no build):
npm run dev -- analyze ./README.md
npm run dev -- analyze https://github.com/modelcontextprotocol/servers --json
npm run dev -- improve ./examples/weak-readme.md
npm run dev -- compare ./examples/weak-readme.md ./examples/strong-readme.mdAfter npm run build:
node dist/cli.js analyze ./README.md
node dist/cli.js serve # MCP stdio (explicit)Flags: --json for machine-readable output; --markdown / --md for human-readable (default for analyze/improve/compare).
npm scripts
Script | What it runs |
|
|
|
|
|
|
|
|
| Analyze |
| Same, JSON |
| Weak vs strong fixtures |
| Vitest |
| ESLint |
| Prettier write |
MCP tools overview
Tool | Purpose |
| Full report: |
| Same inputs; |
|
|
| Scaffold missing sections, optional badges/contributing; optional OpenAI polish. |
|
|
Input shape (resolve one source):
content?: string— raw markdownfilePath?: string— local pathrepoUrl?: string— GitHub repository URLrawUrl?: string— direct raw markdown URL
rewrite_intro requires content. compare_before_after requires original and improved.
Example outputs
See examples/sample-analyze-output.json for the JSON shape returned by analyze_readme (illustrative scores).
Markdown CLI output lists section scores, detected vs missing sections, quick wins, tagline ideas, a deterministic intro rewrite, and issues with severities.
Cursor / MCP configuration
Point command/args at dist/server.js after npm run build (adjust the absolute path):
{
"mcpServers": {
"github-readme-mcp": {
"command": "node",
"args": ["/absolute/path/to/github-readme-mcp/dist/server.js"]
}
}
}Optional OpenAI polish:
{
"mcpServers": {
"github-readme-mcp": {
"command": "node",
"args": ["/absolute/path/to/github-readme-mcp/dist/server.js"],
"env": {
"OPENAI_API_KEY": "sk-...",
"OPENAI_MODEL": "gpt-4o-mini"
}
}
}
}Architecture
flowchart LR
subgraph inputs [Inputs]
C[content]
F[filePath]
G[repoUrl]
R[rawUrl]
end
L[loaders] --> A[analysis + scoring]
A --> T[MCP tools / CLI]
P[providers/openai optional] --> T
inputs --> Lsrc/loaders/— Resolve markdown from the four input types; GitHub uses the REST API fordefault_branchplus raw fallbacks; raw URLs are fetched with size and content-type guards.src/analysis/— Section detection, heuristics, andbuildAnalyzeResult(single pipeline for scores + issues).src/scoring/— Weighted rubric; overall score is the weighted mean of per-dimension 0–100 scores.src/rewrite/— Deterministic intro and full README scaffolding;comparereuses analysis.src/providers/— Optional OpenAI chat calls for polish only.src/tools/— MCP tool handlers shared with the CLI where applicable.src/server.ts— stdio MCP server.src/cli.ts— Subcommands; with no subcommand, starts the same MCP server (npmbinentry).
Development
npm install
npm run typecheck
npm run lint
npm run format
npm test
npm run buildNode 20+ recommended.
Environment — copy
.env.exampleto.envlocally if you use a key; the server does not load.envby itself (set vars in your MCP host or shell).
Roadmap
Configurable rubric weights via a small JSON file.
Additional hosts (GitLab raw URLs, self-hosted GitHub).
Localization hints for non-English READMEs.
Optional
read_lintsstyle tool that only lists issues without scores.
Contributing
Issues and PRs are welcome. Please run npm test and npm run lint before submitting. Keep changes focused; match existing TypeScript style and avoid new dependencies unless there is a clear win.
License
MIT — see LICENSE.
GitHub About copy (pick one)
MCP server + CLI that scores READMEs, finds missing sections, and drafts improvements—deterministic by default, OpenAI optional.
README reviewer for developers: GitHub URL, raw URL, or local path → scores, issues, improved markdown over MCP.
Ship clearer OSS docs: weighted README rubric, quick wins, and copy-paste scaffolds via Model Context Protocol.
Suggested GitHub topics
readme documentation mcp model-context-protocol github developer-tools markdown lint oss typescript nodejs
Launch post (short)
Ship READMEs that pass the “5-second skim.” I open-sourced github-readme-mcp—an MCP server + CLI that scores your README, lists missing sections, suggests badges and taglines, and drafts an improved version. It runs fully offline with deterministic rules; add an OpenAI key only if you want extra polish. Try npm run demo on the included weak README, or point it at any GitHub repo URL. MIT licensed—stars and feedback welcome.
Available Tools
2 toolscompare_before_afterB
Compare two README markdown strings and summarize improvements vs remaining gaps.
Inputs: improved (required), original (required).
suggest_readme_improvementsC
Same inputs as analyze_readme. Returns grouped recommendations (mustFix / shouldImprove / niceToHave) with rationale and optional example text.
Inputs: rawUrl, content, repoUrl, filePath.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have distinct inputs and outputs (compare vs. suggest), but the reference to a non-existent 'analyze_readme' tool in the suggest tool's description creates ambiguity about the intended workflow.
Both tools follow a consistent verb_noun pattern with snake_case, but the missing 'analyze_readme' tool referenced in the description is a minor inconsistency.
With only 2 tools, the server feels incomplete for its stated purpose of README analysis. A typical set would include at least 3-5 tools for a well-scoped domain.
The server lacks a basic 'analyze_readme' tool that is referenced in the suggest tool's description, and the surface only covers comparison and suggestion, missing standalone analysis and likely other operations.
Related MCP Connectors
An MCP server that automatically collects feedback on your MCP server.
Scores any MCP server before you trust it: free quick check, full paid report, 2-5 way compare.
Independent trust scores, tool surfaces and change history for MCP servers.
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that automates code reviews through linting, testing, and git diff analysis. It also generates conventional commit messages and detailed pull request descriptions based on file changes and code patterns.ISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server that analyzes GitHub repositories and automatically generates README.md files. Supports multiple AI providers and offers web, MCP tool, and n8n workflow modes.1Creative Commons Zero v1.0 Universal
- AlicenseAqualityDmaintenanceAn MCP server that performs automated code reviews by analyzing git diffs against configurable review standards with custom reviewer personas.72MIT
- AlicenseAqualityDmaintenanceMCP server for automated GitHub repository quality management, enabling review, README generation, cleanup, and monitoring.6MIT