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.
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.
The four read-only tools are free forever and need no license or entitlement code:
profile_function | Report a function's parameters, outputs, error categories, and testability score, without running it |
audit_coverage | Report which of a module's functions have Pester tests and which don't |
run_tests | Run a project's Pester tests and report pass/fail/skip counts plus each failure's name and message |
get_version | Report 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_file | Generate a Pester test file and write it to the standard location |
scaffold_project | Create 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.
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.
- Read the tool reference: every tool, its parameters, and what it returns.
- Follow the setup guide: connect the server to Claude Code or another MCP client.
- See pricing for the file-writing tools.