Content
# Diagnostic Structurizer (diag-struct-mcp)
A Model Context Protocol (MCP) server that runs heavy local CLI checkers (e.g., `cargo clippy`, `svelte-check`, `tsc`) and converts their extensive terminal logs into a clean, structured JSON format dedicated for AI agents.
## Notes for AI Agents
The optimal prompts and usage for this tool are described in [SKILL.md](./SKILL.md), please follow them.
## Features
- **Token Consumption Optimization**: Prevents raw terminal tracebacks from being fed into the context window, optimizing token usage.
- **Unified Interface**: Handles multiple language/framework linters as a single error extraction pipeline.
## Setup
### 0. Prerequisites
- **Rust Build Toolchain** ([install with rustup](https://rustup.rs/))
- **Node.js & npm** (for parsing JS/TS/Svelte)
If the target project does not have the tools installed, run the following command:
```powershell
npm install -g typescript svelte-check
```
### 1. Installation
You can install and build the tool with a single command from GitHub.
```powershell
cargo install --git https://github.com/adasima/diag-struct-mcp --force
```
*(The above command will automatically place `diag-struct-mcp.exe` in `$HOME/.cargo/bin/`)*
### 2. Agent Configuration
Add the following configuration to your agent's configuration file (e.g., `mcp_config.json`) to enable the tool:
```json
"mcpServers": {
"diag-struct-mcp": {
"command": "diag-struct-mcp"
}
}
```
### 3. Automated Installation and Configuration
To install and configure all tools at once, run the following one-liner:
```powershell
Invoke-RestMethod "https://raw.githubusercontent.com/adasima/ai-workshop/main/mcp_installer.ps1" | Invoke-Expression
```