PesterForge MCP

PesterForge for
your AI agent.

PesterForge MCP puts the PesterForge engine behind an MCP server, so Claude Code and other MCP-compatible clients can profile a function, check test coverage, and run your Pester suite as real tool calls. Four read-only tools are free. The two that write files need a paid tier.

01 What MCP is

MCP (Model Context Protocol) is a standard that lets an AI assistant call real tools instead of guessing at shell commands. Without it, an agent that wants to run your Pester tests improvises a pwsh one-liner and parses whatever text scrolls back. With it, the agent calls a named tool such as run_tests, passes structured arguments, and gets structured results it can act on: pass and fail counts, and each failing test's name and message. Claude Code is one MCP client; any MCP-compatible client can use this server the same way.

02 Why PesterForge has one

The PesterForge module already profiles functions, generates Pester tests, audits coverage, and runs test suites from a PowerShell console. The MCP server exposes that same engine to an AI agent working in your codebase. The agent can ask which functions lack tests, run the suite, and read back every failure's name and message as structured data.

It behaves the way the module behaves. Test generation is deterministic by default and makes zero AI or network calls unless you explicitly opt in to a provider. Responses carry no machine names and no server-side paths, and every tool call runs in an isolated child process. Details are on the security & trust page.

03 What's free and what's paid

The four read-only tools are free forever and need no license or entitlement code:

profile_functionReport a function's parameters, outputs, error categories, and testability score, without running it
audit_coverageReport which of a module's functions have Pester tests and which don't
run_testsRun a project's Pester tests and report pass/fail/skip counts plus each failure's name and message
get_versionReport module, server, schema, and PowerShell versions, so clients and CI can detect drift

The two tools that write to disk require a paid tier. Plans are on the pricing page.

create_test_fileGenerate a Pester test file and write it to the standard location
scaffold_projectCreate the standard PesterForge folder layout under a root path

If you call a gated tool without an entitlement code, the server returns a payment-required error and writes nothing.

04 Same engine as the module

The MCP server wraps the PesterForge PowerShell module rather than reimplementing it. A tool call and the matching console command run the same code: audit_coverage wraps Invoke-PfAudit, profile_function wraps Get-PfFunctionProfile, run_tests wraps the module's test runner. The features page describes that engine in full; this server is how AI clients reach it.

PesterForge.MCP is the third in a line of single-purpose MCP servers, after ClusterValidator.MCP and SqlCertForge.MCP.

05 Where to go next