{"passport":{"unfragile":{"@version":"1.0","version":"2026-05","artifact":{"id":"npm_npm-mcp-pre-commit","slug":"npm-mcp-pre-commit","name":"mcp-pre-commit","type":"mcp","url":"https://www.npmjs.com/package/mcp-pre-commit","page_url":"https://unfragile.ai/npm-mcp-pre-commit","categories":["mcp-servers"],"tags":["mcp","git","pre-commit","hooks","model-context-protocol","developer-tools","automation","code-quality","linting","formatting"],"pricing":{"model":"open_source","free":true,"starting_price":null},"status":"active","verified":false},"capabilities":[{"id":"npm_npm-mcp-pre-commit__cap_0","uri":"capability://tool.use.integration.git.repository.state.inspection","name":"git-repository-state-inspection","description":"Inspects and reports the current state of git repositories including staged/unstaged changes, branch information, commit history, and file status. Works by executing git commands (git status, git log, git diff) through the MCP tool interface and parsing their output into structured data that LLM clients can consume and reason about.","intents":["I need to understand what files have changed in my repository before running pre-commit hooks","I want to check the current branch and recent commits to inform my development decisions","I need to see which files are staged vs unstaged to understand my working directory state"],"best_for":["LLM-powered code review agents","AI assistants integrated into development workflows","Automated CI/CD systems that need repository context"],"limitations":["Requires a valid git repository initialized in the target directory","Performance degrades on repositories with very large histories (>10k commits) due to git log parsing","Cannot inspect submodules or worktrees without additional configuration"],"requires":["git 2.0+","Node.js 14+","MCP client compatible with tool-calling protocol"],"input_types":["repository path (string)","optional git command flags (string)"],"output_types":["structured JSON with file status","commit metadata","diff summaries"],"categories":["tool-use-integration","data-processing-analysis"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm_npm-mcp-pre-commit__cap_1","uri":"capability://automation.workflow.pre.commit.hook.execution.and.management","name":"pre-commit-hook-execution-and-management","description":"Manages and executes pre-commit hooks defined in .pre-commit-config.yaml files through MCP tool calls. Parses hook configurations, resolves hook dependencies, executes hooks against staged files, and reports pass/fail status with detailed output. Integrates with the pre-commit framework by invoking pre-commit CLI commands and capturing structured results.","intents":["I want to run pre-commit hooks on my staged changes to catch issues before committing","I need to see which pre-commit hooks are configured and what they do","I want to run specific hooks (e.g., only linters, not formatters) without running the full suite"],"best_for":["Development teams using pre-commit framework for code quality gates","LLM agents that need to validate code changes before suggesting commits","CI/CD pipelines that want to delegate hook execution to MCP servers"],"limitations":["Requires .pre-commit-config.yaml file to exist in repository root","Hook execution time depends on hook complexity; some hooks (e.g., type checkers) may timeout on large codebases","Cannot modify hook behavior or skip hooks programmatically — only executes as configured","Requires pre-commit Python package installed in the environment"],"requires":["pre-commit Python package (pip install pre-commit)","Python 3.6+",".pre-commit-config.yaml in repository root","git 2.0+"],"input_types":["repository path (string)","optional hook filter (string, e.g., 'linting' or specific hook id)","optional file paths to run hooks against (array of strings)"],"output_types":["hook execution results (pass/fail per hook)","detailed error messages and diffs","structured JSON with hook metadata and output"],"categories":["automation-workflow","tool-use-integration"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm_npm-mcp-pre-commit__cap_2","uri":"capability://data.processing.analysis.staged.file.filtering.and.targeting","name":"staged-file-filtering-and-targeting","description":"Identifies and filters staged files in a git repository by file type, path pattern, or hook scope. Uses git ls-files --cached and git diff --cached to determine which files are staged, then applies pattern matching (glob, regex, or file extension filters) to target specific subsets. Enables selective hook execution and analysis on only the files that changed.","intents":["I want to run hooks only on Python files I've staged, not on all staged files","I need to identify which files in a specific directory have been modified and staged","I want to exclude certain file patterns (e.g., generated code, migrations) from hook execution"],"best_for":["Monorepo environments where different file types need different hooks","Teams with selective code quality enforcement (e.g., strict rules for core, lenient for tests)","LLM agents that need to understand which files are in scope for a given operation"],"limitations":["Pattern matching is limited to file paths and extensions; cannot filter by file content or semantic properties","Performance degrades with very large staged changesets (>1000 files)","Requires git index to be up-to-date; doesn't detect unstaged changes"],"requires":["git 2.0+","valid git repository"],"input_types":["repository path (string)","filter pattern (string, glob or regex)","optional file type filter (string, e.g., '.py', '.js')"],"output_types":["array of staged file paths (strings)","file metadata (size, type, change type)"],"categories":["data-processing-analysis","tool-use-integration"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm_npm-mcp-pre-commit__cap_3","uri":"capability://data.processing.analysis.hook.configuration.parsing.and.inspection","name":"hook-configuration-parsing-and-inspection","description":"Parses .pre-commit-config.yaml files and exposes hook metadata (hook id, language, entry point, stages, files pattern, exclude pattern) as queryable MCP tool results. Uses YAML parsing to extract configuration and normalizes it into a structured format that LLM clients can inspect and reason about without needing to understand YAML syntax or pre-commit configuration semantics.","intents":["I want to see what hooks are configured in my project and what they do","I need to understand which files each hook targets based on its configuration","I want to check if a specific hook (e.g., 'black' formatter) is enabled in my project"],"best_for":["LLM agents that need to understand project code quality policies","Onboarding tools that explain pre-commit setup to new developers","Configuration audit tools that verify hook consistency across teams"],"limitations":["Only reads static configuration; cannot detect runtime hook behavior or custom hook implementations","Does not validate hook configuration correctness (e.g., missing dependencies, invalid patterns)","Cannot inspect hooks defined in additional_dependencies or custom_hooks without executing them"],"requires":[".pre-commit-config.yaml file in repository root","YAML parser (typically built into Node.js MCP runtime)"],"input_types":["repository path (string)"],"output_types":["structured JSON array of hook configurations","hook metadata (id, language, entry, stages, files, exclude, additional_dependencies)"],"categories":["data-processing-analysis","memory-knowledge"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm_npm-mcp-pre-commit__cap_4","uri":"capability://data.processing.analysis.hook.failure.diagnosis.and.reporting","name":"hook-failure-diagnosis-and-reporting","description":"Captures and structures hook execution failures, including error messages, exit codes, and affected files. Parses hook output (stdout/stderr) to extract actionable error information and formats it for LLM consumption. Distinguishes between different failure modes (syntax errors, type errors, formatting issues) based on hook type and output patterns.","intents":["I want to understand why a hook failed and what I need to fix","I need to see which files caused a hook to fail","I want to get structured error information that an LLM can use to suggest fixes"],"best_for":["LLM-powered code fix agents that need to understand and remediate hook failures","Developer tools that provide intelligent error explanations","CI/CD systems that need to report hook failures in a structured format"],"limitations":["Error parsing is heuristic-based and may not capture all failure modes, especially for custom hooks","Cannot provide fixes for all hook types; some hooks (e.g., security scanners) require manual review","Failure diagnosis depends on hook output format; poorly formatted hook output may not be parsed correctly"],"requires":["hook execution to have completed (failed or passed)","access to hook stdout/stderr output"],"input_types":["hook execution result object (structured data)","hook configuration metadata"],"output_types":["structured failure report (JSON)","affected files list","error message summaries","suggested remediation steps (when available)"],"categories":["data-processing-analysis","planning-reasoning"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm_npm-mcp-pre-commit__cap_5","uri":"capability://tool.use.integration.mcp.tool.schema.generation.for.git.operations","name":"mcp-tool-schema-generation-for-git-operations","description":"Generates and exposes MCP tool schemas that define the interface for git and pre-commit operations. Implements the MCP tool protocol by defining tool names, descriptions, input schemas (JSON Schema), and output formats. Allows MCP clients to discover available operations and understand their parameters without hardcoding tool knowledge.","intents":["I want to discover what git and pre-commit operations are available through this MCP server","I need to understand the parameters and return types for each operation","I want to validate my tool calls against the schema before executing them"],"best_for":["MCP client implementations that need to dynamically discover server capabilities","LLM agents that use tool calling with schema validation","Development tools that provide autocomplete or documentation for MCP operations"],"limitations":["Schema generation is static and reflects only the operations implemented by this server","Cannot express complex conditional logic or dependencies between parameters in JSON Schema","Schema updates require server restart; cannot dynamically add new tools at runtime"],"requires":["MCP client that supports tool schema discovery","JSON Schema validator (typically built into MCP runtime)"],"input_types":["none (schema is generated by server)"],"output_types":["MCP tool schema (JSON Schema format)","tool metadata (name, description, input/output types)"],"categories":["tool-use-integration","memory-knowledge"],"confidence":0.5,"matches":0,"success_rate":0},{"id":"npm_npm-mcp-pre-commit__cap_6","uri":"capability://data.processing.analysis.commit.message.context.extraction","name":"commit-message-context-extraction","description":"Extracts contextual information from recent commits (commit messages, authors, timestamps, changed files) to provide LLM agents with repository history context. Parses git log output and structures commit metadata into a format suitable for LLM reasoning about code changes and development patterns. Enables agents to understand the intent and scope of recent work.","intents":["I want to understand the context of recent changes to inform my code review or suggestions","I need to see what files were changed in recent commits to understand the scope of work","I want to extract commit messages to understand developer intent and reasoning"],"best_for":["LLM-powered code review agents that need historical context","Commit message suggestion tools that learn from project history","Development analytics tools that analyze commit patterns"],"limitations":["Limited to commit metadata; cannot analyze commit diffs or code changes without additional git operations","Performance degrades on repositories with very large histories (>10k commits)","Commit message quality varies; poorly written messages provide limited context"],"requires":["git 2.0+","valid git repository with commit history"],"input_types":["repository path (string)","optional number of commits to retrieve (integer, default 10)","optional branch name (string, default 'HEAD')"],"output_types":["structured array of commit metadata","commit messages (strings)","author information","changed files per commit"],"categories":["data-processing-analysis","memory-knowledge"],"confidence":0.5,"matches":0,"success_rate":0}],"trust":{"score":28,"verified":false,"data_access_risk":"high","permissions":["git 2.0+","Node.js 14+","MCP client compatible with tool-calling protocol","pre-commit Python package (pip install pre-commit)","Python 3.6+",".pre-commit-config.yaml in repository root","valid git repository",".pre-commit-config.yaml file in repository root","YAML parser (typically built into Node.js MCP runtime)","hook execution to have completed (failed or passed)"],"failure_modes":["Requires a valid git repository initialized in the target directory","Performance degrades on repositories with very large histories (>10k commits) due to git log parsing","Cannot inspect submodules or worktrees without additional configuration","Requires .pre-commit-config.yaml file to exist in repository root","Hook execution time depends on hook complexity; some hooks (e.g., type checkers) may timeout on large codebases","Cannot modify hook behavior or skip hooks programmatically — only executes as configured","Requires pre-commit Python package installed in the environment","Pattern matching is limited to file paths and extensions; cannot filter by file content or semantic properties","Performance degrades with very large staged changesets (>1000 files)","Requires git index to be up-to-date; doesn't detect unstaged changes","builder identity is not verified yet","no observed match outcomes yet"],"rank_breakdown":{"adoption":0.05,"quality":0.24,"ecosystem":0.5000000000000001,"match_graph":0.25,"freshness":0.6,"weights":{"adoption":0.25,"quality":0.25,"ecosystem":0.15,"match_graph":0.23,"freshness":0.12}},"observed_outcomes":{"matches":0,"success_rate":0,"avg_confidence":0,"top_intents":[],"last_matched_at":null},"maintenance":{"status":"active","updated_at":"2026-05-24T12:16:23.903Z","last_scraped_at":"2026-04-22T08:11:33.876Z","last_commit":null},"community":{"stars":null,"forks":null,"weekly_downloads":null,"model_downloads":null,"model_likes":null}},"distribution":{"claim_url":"https://unfragile.ai/submit?claim=npm-mcp-pre-commit","compare_url":"https://unfragile.ai/compare?artifact=npm-mcp-pre-commit"}},"signature":"sTVtL+Gq402y3QYMc5EToroUIGiNVDWCtgXR27+ILi6x2GdGhsHFagMmgJIO16KxQ4EO1UGgJMj7qazgcJU8AQ==","signedAt":"2026-06-21T22:04:52.191Z","signedBy":"unfragile.ai","version":1},"_links":{"self":"https://unfragile.ai/api/v1/passport/npm-mcp-pre-commit","artifact":"https://unfragile.ai/npm-mcp-pre-commit","verify":"https://unfragile.ai/api/v1/verify?slug=npm-mcp-pre-commit","publicKey":"https://unfragile.ai/api/v1/trust-passport-public-key","spec":"https://unfragile.ai/trust","schema":"https://unfragile.ai/schema.json","docs":"https://unfragile.ai/docs"}}