Provides MCP-enabled access to PMAT tools for code context generation, TDG, mutation testing, and repository health scoring.
Configuration
View docs{
"mcpServers": {
"paiml-paiml-mcp-agent-toolkit": {
"command": "pmat",
"args": [
"mcp"
]
}
}
}You run an MCP server that exposes Pragmatic Multi-language Agent Toolkit capabilities to an MCP client. This server enables AI-assisted code context generation, technical debt scoring, mutation testing, repository health assessment, semantic search, and seamless integration with AI agents through MCP tools. It is designed to be started locally and consumed by MCP clients to orchestrate quality checks and AI-driven insights across your codebase.
Start the MCP server to expose PMAT's tooling to MCP clients. The server runs as a local MCP endpoint and can be consumed by Claude Code, Cline, and other MCP clients. Once running, you can issue commands from your MCP client to generate AI-ready context, analyze code quality, run mutation testing, obtain repository health scores, and apply safety nets like quality gates.
Prerequisites: you need a Rust toolchain to build and run the MCP server.
1) Install Rust toolchain (if you do not already have it): - Install rustup from https://www.rust-lang.org/tools/install - Run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - Restart your shell or run: source $HOME/.cargo/env 2) Install the PMAT MCP server from source or binary: - Clone the repository: git clone https://github.com/paiml/paiml-mcp-agent-toolkit - Build and install the MCP server from the source directory: cd paiml-mcp-agent-toolkit && cargo install --path server 3) Start the MCP server (stdio protocol): - Use the following start command from your terminal: pmat mcp 4) Verify the server starts and is ready to accept MCP clients: - Look for the server startup logs indicating it is listening for MCP connections. - If you see errors, ensure Rust toolchain is installed and the server binary is properly built.
Starting the MCP server makes PMATβs capabilities available to MCP clients. A typical workflow includes: - Connecting an MCP client and requesting AI-ready context for a codebase - Running TDG to obtain a project-wide grade and a per-component breakdown - Performing mutation testing to validate test coverage against a target threshold - Generating a repository health score and triggering quality gates in CI pipelines
Keep the MCP server up to date with the latest PMAT releases to benefit from improved analysis engines and new MCP tools. Limit access to the local MCP endpoint to trusted clients and use environment isolation when running in CI or shared environments. Regularly review generated TDG baselines and enforce quality gates to prevent regression of software quality.
If the server fails to start, verify that Rust is installed and the cargo install step completed without errors. Check for port or IPC conflicts if your environment restricts process sockets. Review client connection logs for authentication or protocol compatibility messages and ensure you are using the recommended MCP client version.
Generate AI-ready context for codebases with options for basic or AI-optimized output and inclusion of tests.
Perform technical debt grading with project-wide and per-component breakdowns, baseline creation, and regression checks.
Execute mutation testing to validate test suite quality against a threshold and optimize CI workloads.
Compute repository health scores with fast or full-history analysis.
Manage and apply pre-configured prompts that enforce quality gates and testing discipline.
Install and manage pre-commit hooks to enforce quality gates during development.
Create semantic embeddings and perform semantic search to discover patterns in code.
Run various analysis engines for context generation, complexity, and quality assessments.