PC-Fixer MCP Server
This MCP server lets you diagnose and autonomously repair local PC, developer environment, and codebase issues with safe rollback.
Run deep diagnostics across workspace, OS, virtualenvs, Git, build configs, AST syntax, and CWE vulnerabilities.
Auto-heal defects with dry-run support and atomic rollback via transaction ID.
Check hardware health, disk space, WSL2 vhdx growth, memory-heavy processes, and dev port conflicts.
Audit code for OWASP/CWE issues such as command injection, SQL injection, path traversal, and hardcoded secrets.
Kill processes blocking developer ports like 3000, 5000, 8000, and 8080.
Clean stale Git lock files that block Git operations.
Repairs Dockerfiles and generates .dockerignore files to support container build hygiene.
Migrates hardcoded secrets into .env files and replaces them with os.environ.get() lookups.
Cleans stale Git lock files such as index.lock and HEAD.lock, rescues detached HEAD states, and generates .gitattributes for cross-platform line ending normalization.
Outputs SARIF v2.1.0 reports compatible with the GitHub Security tab for code scanning.
Generates GitHub Actions CI quality workflows so diagnostics and healing checks can run automatically.
Audits and repairs Nginx reverse proxy configuration files, including issues such as missing semicolons.
Scans Python AST code for OWASP/CWE vulnerabilities such as CWE-78, CWE-89, CWE-22, and CWE-798.
Installs a Git pre-commit hook that enforces zero-leak and syntax quality gates before commits.
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., "@PC-Fixer MCP Server run a full workspace diagnostic and auto-fix any issues it finds"
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.
🩺 T-Zero PC-Fixer & Codebase Doctor
Autonomous Self-Healing Operating System & Codebase Doctor (12,650+ Lines Master Edition)
🌟 Executive Overview
T-Zero PC-Fixer & Codebase Doctor is an encyclopedic, industrial-grade autonomous self-healing engine and Model Context Protocol (MCP) server. It diagnoses and fixes computer environments, developer toolchains, virtual environments, Git version control issues, AST syntax errors, PEP 517 packaging conflicts, and OWASP/CWE security vulnerabilities with zero external dependencies and $0.00 cloud cost.
Available as both a single-file monolithic executable (tzero_pc_fixer.py, 12,657 lines) and a modular Python package (tzero_fixer/), it delivers surgical repair recipes with full transactional rollback safety.
Related MCP server: aiganak-aiops-mcp
🏗 System Architecture
flowchart TD
subgraph Presentation ["Presentation & Interfaces"]
CLI["CLI: pc-fixer / tzero-doctor"]
MCP["MCP Server: pc-fixer-mcp (Claude / Cursor / Windsurf)"]
TUI["Interactive ANSI Cockpit TUI"]
end
subgraph Orchestrator ["Sovereign Orchestration Core"]
ORCH["FixerOrchestrator"]
TX["Transactional Backup & Rollback (.tzero/fixer_backups)"]
CONV["Multi-Pass Convergence Engine"]
end
subgraph Specialists ["Surgical Healers & Diagnostics"]
OS["OS & Hardware Doctor\n(RAM, Registry, S.M.A.R.T., WSL2, Dev Ports)"]
VENV["Virtualenv & ABI Surgeon\n(pyvenv.cfg, PEP 517, dist-info)"]
GIT["Git Advanced Surgeon\n(index.lock, detached HEAD, submodules)"]
AST["AST Syntax Healer\n(Colons, delimiters, indents, docstrings)"]
SEC["100% Zero-Leak Security Guard\n(CWE-78, CWE-89, CWE-798, .env migrator)"]
POLY["Polyglot Build Healer\n(Dockerfiles, Makefiles, Nginx confs)"]
end
CLI --> ORCH
MCP --> ORCH
TUI --> ORCH
ORCH --> TX
ORCH --> CONV
CONV --> OS
CONV --> VENV
CONV --> GIT
CONV --> AST
CONV --> SEC
CONV --> POLY🚀 Key Capabilities
AST Syntax & Delimiter Surgical Healer: Automatically detects and repairs missing colons, unbalanced brackets/parentheses, indentation errors, and unclosed quotes.
Virtual Environment & ABI Doctor: Detects corrupted
pyvenv.cfg, resolves conflicting or duplicate.dist-infodirectories in site-packages, and handles PEP 517/621 build-backend injection.Git VCS Advanced Surgeon: Cleans stale
.git/index.lockand.git/HEAD.lockafter crashes, rescues detached HEAD states into safe branches, and generates.gitattributesfor universal cross-platform line ending normalization.Dev Port & Hardware Doctor: Identifies and terminates rogue processes locking developer ports (3000, 5000, 8000, 8080), monitors physical disk partition space, and detects WSL2
.vhdxstorage expansion.100% Zero-Leak Security Guard: Scans AST code for 60+ high-entropy API key patterns (AWS, OpenAI, Anthropic, Gemini, GitHub, Stripe, DB URIs) and migrates them safely into
.envwith automaticos.environ.get()replacement.Polyglot Build & Container Healer: Repairs Makefile space-to-tab indentation traps, generates high-efficiency
.dockerignorefiles, and audits Nginx reverse proxy configurations for missing semicolons.Transactional Atomic Rollback: Backs up all modified files into
.tzero/fixer_backups/<tx_id>/before touching disk, enabling 1-second atomic rollbacks via--rollback <tx_id>.
📦 Installation
Option 1: Universal 1-Click Installer (Recommended)
Linux & macOS:
curl -fsSL https://raw.githubusercontent.com/toprakahmetaydogmus/tzero-pc-fixer/main/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/toprakahmetaydogmus/tzero-pc-fixer/main/install.ps1 | iexOption 2: Install via Pip
pip install tzero-pc-fixerOption 3: Single-File Zero-Dependency Standalone
Download the single-file masterpiece tzero_pc_fixer.py directly without installing any packages:
curl -O https://raw.githubusercontent.com/toprakahmetaydogmus/tzero-pc-fixer/main/tzero_pc_fixer.py
python tzero_pc_fixer.py --helpOption 4: From Source
git clone https://github.com/toprakahmetaydogmus/tzero-pc-fixer.git
cd tzero-pc-fixer
pip install -e .💻 Command-Line Interface (CLI)
# 1. Run complete workspace diagnostic check
pc-fixer .
# 2. Autonomously heal all detected defects with atomic backup
pc-fixer --heal
# 3. Simulate self-healing without touching files on disk
pc-fixer --heal --dry-run
# 4. Roll back any previously executed healing transaction
pc-fixer --rollback tx_1793900379_d7337d
# 5. Output reports in SARIF v2.1.0 (for GitHub Security tab) or JUnit XML
pc-fixer --format sarif --out results.sarif
pc-fixer --format junit --out results.xml
# 6. Install Git pre-commit zero-leak & syntax quality gate
pc-fixer --install-hook
# 7. Generate GitHub Actions CI quality workflow
pc-fixer --generate-ci
# 8. Run synthetic stress benchmarks
pc-fixer --benchmark🔌 Model Context Protocol (MCP) Server Setup
T-Zero PC-Fixer exposes a fully compliant JSON-RPC 2.0 stdio MCP server for AI IDEs and assistants:
1-Click Install via Smithery
To automatically install T-Zero PC-Fixer for Claude Desktop:
npx -y @smithery/cli install tzero-pc-fixer --client claudeGlama MCP Registry
Access or configure through Glama.ai. Both stdio and HTTP/SSE transports are pre-configured.
Docker Container
Run the official container directly:
docker build -t tzero-pc-fixer .
docker run -i tzero-pc-fixerClaude Desktop (Manual Config)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pc-fixer": {
"command": "python",
"args": ["-m", "tzero_fixer.mcp_server"]
}
}
}Cursor & Windsurf
Add to your workspace .cursor/mcp.json or Windsurf global config:
{
"mcpServers": {
"pc-fixer": {
"command": "pc-fixer-mcp"
}
}
}Available MCP Tools
pc_fixer_diagnose: Deep multi-tier workspace and OS diagnostics.pc_fixer_auto_heal: Autonomous surgical self-healing with rollback manifest.pc_fixer_rollback: Transactional atomic rollback using transaction UUID.pc_fixer_check_system: Hardware health, disk partition space, and dev port conflicts.pc_fixer_cwe_audit: Static AST CWE-78/89/22/798 vulnerability scanner.pc_fixer_kill_port_process: Terminate processes locking dev ports (3000, 5000, etc.).pc_fixer_clean_git_locks: Detect and safely delete stale Git lock files.
📊 Comprehensive Capability Matrix
Feature | T-Zero PC-Fixer | Ruff | Black | Bandit | Snyk |
Dependencies Required | 0 (Zero) | 1+ | 5+ | 8+ | Node/Cloud |
Cloud Cost / Subscriptions | $0.00 Free | Free | Free | Free | Paid |
AST Syntax Error Repair | Yes | No | No | No | No |
Virtualenv & pyvenv.cfg Repair | Yes | No | No | No | No |
Git Stale Lock Removal | Yes | No | No | No | No |
Dev Port Conflict Termination | Yes | No | No | No | No |
CWE / OWASP Vulnerability Check | Yes | Partial | No | Yes | Yes |
Zero-Leak Secret Migration to .env | Yes | No | No | No | No |
Transactional Atomic Rollback | Yes | No | No | No | No |
Native MCP Server Support | Yes | No | No | No | No |
🔒 100% Zero-Leak Security & Privacy Policy
Zero External Data Transmission: 100% of all diagnostics, AST parsing, and code repairs run locally offline on your device.
Zero Paid Cloud API Calls: No external LLM credits, subscriptions, or API tokens are required.
No Secret Telemetry: No user analytics, metrics, or logs are transmitted to any external server.
🧪 Running Tests
# Run all unit and integration tests
python -m unittest discover -s tests -p "test_*.py" -v📄 License
Distributed under the MIT License. See LICENSE for details.
Crafted with passion by Toprak Ahmet Aydogmus & Siber Akademi T-Zero R&D Team.
Available Tools
7 toolspc_fixer_auto_healA
Autonomously heal detected codebase and environment defects with automatic backup and atomic rollback manifest. Safe with dry-run verification mode.
Inputs: path, dry_run, category.
pc_fixer_check_systemC
Check physical hardware health, disk partitions space, WSL2 vhdx growth, high-memory consumer processes, and active developer port conflicts (3000, 5000, 8000, etc.).
Inputs: ports.
pc_fixer_clean_git_locksA
Find and remove stale Git lock files (.git/index.lock, .git/HEAD.lock, refs locks) that block git operations after crashes or aborted commands.
Inputs: path.
pc_fixer_cwe_auditB
Execute local AST static security vulnerability scan against OWASP Top 10 and CWE catalog (CWE-78 Command Injection, CWE-89 SQL Injection, CWE-22 Path Traversal, CWE-798 Hardcoded Secrets).
Inputs: path.
pc_fixer_diagnoseC
Run deep multi-tier diagnostics across workspace code, operating system environment, virtual environments, Git repository locks, PEP 517 build configs, AST syntax, and CWE vulnerabilities.
Inputs: path, categories.
pc_fixer_kill_port_processB
Find and terminate the process locking a specific developer port (e.g. 3000, 5000, 8000, 8080) to unblock dev servers without rebooting.
Inputs: port (required).
pc_fixer_rollbackA
Roll back a previously executed healing transaction using its unique transaction ID, restoring modified files to their exact pre-fix state.
Inputs: transaction_id (required), path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools are distinct, but pc_fixer_diagnose explicitly claims to cover 'Git repository locks' and 'CWE vulnerabilities,' directly overlapping with the dedicated pc_fixer_cwe_audit and pc_fixer_clean_git_locks tools. An agent wanting a security scan or git-lock cleanup could reasonably misselect between the broad diagnose tool and the specialized ones, though descriptions do help differentiate.
All tools share a consistent pc_fixer_ prefix and snake_case convention, which is a strong unifying pattern. However, action ordering is mixed (check_system and kill_port_process are verb_noun, while cwe_audit is noun_verb and rollback/diagnose are bare verbs), a minor deviation from a uniform verb_noun scheme.
Seven tools is well within the ideal 3-15 range for a PC/codebase fixing server. Each tool maps to a distinct concern (diagnose, heal, rollback, system health, security audit, port kill, git locks) and earns its place without bloat.
The lifecycle of diagnose -> heal -> rollback is covered, along with system checks and targeted fixes, giving strong overall coverage. The one gap is discoverability of transaction IDs: pc_fixer_rollback requires a transaction ID but there is no tool to list prior healing transactions, forcing reliance on manifests returned by heal.
Maintenance
Related MCP Connectors
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
The bug mediator for AI-built apps: plain-English diagnosis + a ready fix, in your editor.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables LLM-driven agents to autonomously detect, diagnose, repair, verify, and prevent software and hardware failures on local and remote systems. Includes built-in safety checks and automatic rollbacks.15-
- AlicenseBqualityDmaintenanceEnables autonomous infrastructure diagnostics, log root-cause analysis, and safe code patching via tools for querying logs, inspecting Python AST, and applying git-safe patches.3Apache 2.0
- AlicenseBqualityBmaintenanceProvides a universal developer operations and diagnostics toolkit with sandboxed code execution, algorithm stress testing, security secret scanning, AST-based code fixes, and a visual dashboard for ERD, port/process inspection, and differential testing.2836 npm3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to securely inspect, modify, and manage local projects with trusted filesystem access, safe Git operations, controlled task execution, and developer runtime process management over stdio or HTTP.4Apache 2.0