Skip to content
MCP server
Registry

gitcleanplan MCP Server

Plan stale and merged branch cleanup: keep / review / delete per branch, with reasons.

gitcleanplan scores 66 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 1 tool. Filed under Uncategorized. GitHub shows 0 stars. Package registries report about 68 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by cloudcorprecordsMITTypeScript0 stars
Trust score
66Good
Trust score 66 of 100, Good

Good trust

66 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 66 comes from

22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "cloudcorprecords-gitcleanplan": {      "command": "npx",      "args": [        "-y",        "@reneturcios/gitcleanplan@0.1.0"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools1Tool docs quality grade D

All capabilities

About

gitcleanplan

Branch lists grow quietly. A feature lands, its branch stays; an experiment is abandoned, its branch stays too; the upstream disappears and the local copy lingers. Deleting branches on a hunch is how work gets lost, so gitcleanplan takes the middle road: you hand it the branch data, and it hands back a plan — lists first, deletes nothing.

For every branch you supply, the plan gives one of three decisions, each with the reason that produced it:

  • keep — the default branch, a protected branch, the branch currently checked out, or a branch that is simply still active.
  • review — merged but recently active, upstream gone but not merged, or stale but not merged: promising cleanup candidates that deserve a human look before anything else.
  • delete — merged and either its upstream is gone or it has been stale for at least stale_days. Only merged branches can ever land here.

Decisions follow a fixed rule order, so the reason is never ambiguous: the default branch wins over protection, protection wins over a merged-and-gone branch, being checked out wins over being merged, and "merged and upstream is gone" wins over "merged and stale". Staleness is inclusive — a branch whose last commit was exactly stale_days ago counts as stale.

Alongside the per-branch decisions, the result groups the branch names under each action, counts them, and lists one safe-delete command (git branch -d <name>) per branch planned for deletion, in name order. Those commands are listed, never run: gitcleanplan does not invoke git, open a repository, or delete anything. You read the plan, and you decide what to execute yourself.

Malformed input — a missing or empty branch list, a missing, empty, or duplicated branch name, a missing, negative, or non-integer last_commit_days_ago, a wrongly typed flag, a bad stale_days or default_branch — is a validation error naming the offending path (for example branches[1].last_commit_days_ago must be an integer >= 0), and no partial plan is produced. The computation is pure and local: no network, no configuration, no files read beyond the input you pass in.

CLI

npx @reneturcios/gitcleanplan plan --input args.json
npx @reneturcios/gitcleanplan --version

args.json contains the full arguments object:

{
  "stale_days": 90,
  "branches": [
    { "name": "main", "last_commit_days_ago": 0, "current": true },
    { "name": "shipped-feature", "merged": true, "upstream_gone": true, "last_commit_days_ago": 45 },
    { "name": "old-spike", "last_commit_days_ago": 180 }
  ]
}

merged, upstream_gone, protected, and current default to false per branch; stale_days defaults to 90; default_branch defaults to "main". The plan is printed as JSON:

{
  "branches": [
    { "name": "main", "action": "keep", "reason": "default branch" },
    { "name": "old-spike", "action": "review", "reason": "stale but not merged" },
    { "name": "shipped-feature", "action": "delete", "reason": "merged and upstream is gone" }
  ],
  "plan": {
    "delete": ["shipped-feature"],
    "review": ["old-spike"],
    "keep": ["main"]
  },
  "counts": { "delete": 1, "review": 1, "keep": 1 },
  "commands": ["git branch -d shipped-feature"]
}

Exit codes: 0 on success, 1 on a runtime error (including an unreadable or invalid input file, or invalid input), 2 on a usage error.

MCP server

npx -y @reneturcios/gitcleanplan mcp

MCP client config:

{
  "mcpServers": {
    "gitcleanplan": {
      "command": "npx",
      "args": ["-y", "@reneturcios/gitcleanplan", "mcp"]
    }
  }
}

Tools

  • plan_branch_cleanup — Plan stale and merged branch cleanup.

    • branches (array, required, at least one) — branches as {name, last_commit_days_ago, merged?, upstream_gone?, protected?, current?} objects; name is unique across the set and last_commit_days_ago is a whole-day count of at least 0
    • stale_days (integer, optional, default 90, at least 1) — a branch is stale at this many days since its last commit
    • default_branch (string, optional, default "main") — the default branch name; it is never planned for deletion

    Returns {branches, plan, counts, commands}.

Docker

docker run -i ghcr.io/cloudcorprecords/gitcleanplan
docker run --rm -v "$PWD:/w" ghcr.io/cloudcorprecords/gitcleanplan plan --input /w/args.json

Development

npm install
npm run build   # tsc -> dist/
npm test        # tsx --test test/*.test.ts (pure local, no network)
npm run dev     # run the CLI from source

License

MIT — Copyright (c) 2026 Rene Turcios

Frequently asked questions

What is gitcleanplan MCP Server?

Plan stale and merged branch cleanup: keep / review / delete per branch, with reasons.

How do I install gitcleanplan MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. gitcleanplan MCP Server runs locally from the npm package @reneturcios/gitcleanplan with the command npx -y @reneturcios/gitcleanplan@0.1.0.

Is gitcleanplan MCP Server free and open source?

Yes. gitcleanplan MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does gitcleanplan MCP Server support remote (HTTP) connections?

No remote endpoint is listed for gitcleanplan MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does gitcleanplan MCP Server provide?

gitcleanplan MCP Server provides 1 tool: plan_branch_cleanup. See the full tool list for descriptions and parameters.

How is gitcleanplan MCP Server's trust score calculated?

gitcleanplan MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server