Description
MCP Local Auditor & System Architect V2 is an open source Model Context Protocol (MCP) server that reviews code and system designs using a language model running entirely on the developer's own machine. It plugs into any MCP-compatible client and hands every submission to a local LM Studio server instead of a cloud API, so no code or design leaves the machine and there is no per-token cost.
Read More
The server automatically detects whether an incoming submission is code or a high-level specification and routes it to one of two roles. In Production Code Auditor mode, it checks the input against ten defensive engineering rules covering logic and edge conditions such as null checks and division by zero, resource leaks and performance issues such as unclosed context managers, and defensive boundaries such as type hints and bounded loop guards. It returns a deterministic APPROVED or REJECTED verdict with actionable feedback. In System Architect & Strategist mode, triggered when the input looks like a specification rather than code, it produces component topologies, directory structures, risk modeling for concurrency and failure points, and a phased execution plan.
Before anything reaches the language model, a fast AST-based sentinel parses the submission and blocks high-risk calls such as eval, exec, os.system and subprocess, and rejects malformed Python outright. Every audit is recorded twice: as structured rows in a local SQLite database for metrics and history, and as atomic JSON logs meant to double as a fine-tuning dataset. A separate watcher script can run alongside the server and post formatted status updates to a Discord channel as new audit files appear, so a team can follow review activity without opening a dashboard. The server also queries LM Studio's active model endpoint directly, so it picks up whichever model is currently loaded rather than requiring a hardcoded model name.
The project ships a ready-made "Agent Loop Protocol" snippet that developers can paste into their coding assistant's configuration, instructing the assistant to call the audit tool after every code change, read the rejection feedback, fix the reported issues, and resubmit, capped at five attempts.
It is built for individual developers and small teams who want an automated code and architecture review step in their MCP-based coding workflow without paying for cloud inference or exposing proprietary code to a third-party API. It requires Python 3.10 or later, a running LM Studio instance with an instruction-tuned model loaded, and an MCP-compatible client. The project is distributed under the MIT license and is free to use; the maintainer accepts optional donations through Ko-fi and GitHub Sponsors.
- CategoryAI Code Review & Testing
- Pricing ModelOpen source
- DeploymentRuns locally
- PlatformsWindows, macOS, Linux
MCP Local Auditor & System Architect V2's Core Features
Dual-mode MCP server that auto-detects code vs. specification input and routes it to the matching audit role
Production Code Auditor mode checks submissions against 10 defensive engineering rules with a deterministic APPROVED/REJECTED verdict
System Architect & Strategist mode drafts component topologies, risk models and phased execution plans from specs
AST-based sentinel blocks eval, exec, os.system and subprocess calls, and rejects malformed Python before it reaches the model
Runs entirely on a local LM Studio server, so no code leaves the developer's machine and there is no token cost
Dynamic model discovery reads whichever model is currently loaded in LM Studio
Logs every audit to a local SQLite database and to atomic JSON files suitable for fine-tuning datasets
Background Discord watcher posts real-time formatted updates when new audit results are written
Ships an "Agent Loop Protocol" prompt snippet that makes a coding assistant self-correct through repeated audit and fix cycles
Includes a pytest suite that validates the AST guard, database migrations and inference pipeline without a live LM Studio instance
Getting Started with MCP Local Auditor & System Architect V2
Install LM Studio: Download LM Studio, load an instruction-tuned model, and start its local server on port 1234.
Clone and set up the server: Clone the repository, create a virtual environment, and install dependencies with pip.
Register the MCP server: Add the server's bridge script path to your MCP client's mcpServers configuration file.
Run an audit: Submit code or a specification through the audit tool; the server automatically picks Code Auditor or Architect mode.
Review the verdict: Read the APPROVED or REJECTED status and feedback, then fix and resubmit if rejected.
Optional, watch activity: Run the watcher script to get Discord notifications for every new audit result.
MCP Local Auditor & System Architect V2's Use Cases
- Local code review gate
- Architecture planning
- Self-correcting coding agent
- Team audit visibility




