Dead Feature-Flag & Stale Code Cleaner MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Dead Feature-Flag & Stale Code Cleaner MCP
Python AST & TypeScript MCP server combining deterministic dead-branch pruning with AI agent verification to clean stale feature flags and unreachable code.
Server MCP (Model Context Protocol) berbasis Python AST dan TypeScript yang menggabungkan pemangkasan cabang mati (dead-branch pruning) secara deterministik dengan verifikasi agen AI untuk membersihkan feature flag usang.
Features / Fitur Utama
Deterministic Python AST Pruner (
flag_cleaner/ast_pruner.py):Mendeteksi pola feature flag umum:
FLAGS["flag"],FLAGS.get("flag"),is_enabled("flag"),feature_enabled("flag"), dan versi negasinya (not ...).Memangkas blok
if / elif / elsemaupun ekspresi ternary (a if FLAGS["x"] else b) ke cabang pemenang secara aman menggunakanast.NodeTransformerdanast.unparse.
Stdio JSON-RPC 2.0 MCP Server (
flag_cleaner/mcp_server.py):Mengekspos tool
scan_flagsdanprune_flagagar agen AI (Claude Desktop, Cursor, Antigravity, dll.) dapat memindai dan memangkas flag usang secara terstruktur.
TypeScript MCP Manifest & Types (
src/mcp-manifest.ts):Skema JSON-RPC tool manifest dan tipe TypeScript untuk integrasi klien MCP.
Zero External Python Dependencies: 100% Python Standard Library.
Related MCP server: genpark-codebase-dead-code-unreachable-pruner-skill
Installation / Instalasi
Pastikan Python 3.10+ terpasang (untuk sisi TypeScript opsional Node.js 20+).
git clone https://github.com/nazaa-arch/dead-feature-flag-cleaner-mcp.git
cd dead-feature-flag-cleaner-mcpUsage / Cara Penggunaan
1. CLI Mode
# Pindai semua feature flag di direktori
python -m flag_cleaner.cli scan ./path/to/code
# Pangkas flag tertentu (misal dianggap selalu True)
python -m flag_cleaner.cli prune ./app.py --flag new_checkout --value true
# Jalankan MCP stdio server
python -m flag_cleaner.cli serve2. MCP Tools
scan_flags: Memindai kode Python (string atau direktori) dan mengembalikan daftar flag beserta nomor barisnya.prune_flag: Memangkas cabang mati untukflag_nametertentu berdasarkan nilai booleanflag_value(true/false) dan mengembalikan kode hasil refactor.
Running Tests / Menjalankan Tes
python -m unittest discover -s tests -vLicense
MIT License — Copyright (c) 2026 Muhammad Naza Firmansyah
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Codebase intelligence for AI agents — dead code, blast radius, ownership.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Finds deprecated SDK calls in JS/TS (Stripe, OpenAI, Next.js and more), with fixes and sources.
1
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables coding agents to perform safe, project-wide Python refactoring (rename, move, extract, inline, change signature, organize imports, etc.) with a dry-run safety contract and LSP-coordinate addressing.15MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables coding agents to run deterministic, zero-dependency AST static analysis over source code, building call graphs and dependency metrics to find orphaned functions, unreachable methods, breaking API surface diffs, and token-bloat clusters, then return a structured refactoring plan. It plugs into MCP clients like Claude Desktop, Cursor, and Windsurf via a single Python entrypoint.-
- AlicenseBqualityCmaintenanceEnables AI agents to build a structured model of a Python codebase and query it over stdio JSON-RPC: dependency-mapped component stats, ranked blast-radius predictions for a target file, natural-language change planning with suggested tests, and design decisions mined from git history.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to audit git diffs, scan for leaked secrets and unsafe APIs, detect breaking changes, triage issues, generate changelogs, and assess repository hygiene through native stdio JSON-RPC tools.7Apache 2.0