EasyTdd.Mcp
6.0.2
dotnet tool install --global EasyTdd.Mcp --version 6.0.2
dotnet new tool-manifest
dotnet tool install --local EasyTdd.Mcp --version 6.0.2
#tool dotnet:?package=EasyTdd.Mcp&version=6.0.2
nuke :add-package EasyTdd.Mcp --version 6.0.2
EasyTdd.Mcp
An MCP (Model Context Protocol) server for AI-assisted TDD code generation in .NET solutions. Install it as a .NET global tool and point your AI assistant at it to generate builders, fluent mocks, test classes, and parameterized test cases — all driven by Roslyn analysis of your actual solution.
Release notes
6.0.2 (unreleased)
- Aligned the MCP server and tested generator target to
6.0.2. - Added
--helpand--versioncommands that exit without starting the server, and clear errors for invalid arguments. - Migrated settings
0.5 → 6by changing only the version property, preserving customized values and unknown JSON properties. Earlier migration steps retain their existing behavior. - Deployed template compatibility version
6.0, preserving custom templates and reporting the correct header version for review. - Reject future versions, malformed input and missing migration paths before changing files. The template marker advances only after successful deployment.
- When settings or templates are newer than supported, explicitly report that the installed MCP service needs updating and include the tool update command and restart instructions.
- Added separate generator-package check and approved-update tools. Existing older references are no longer limited to a manual-update warning; eligible project-local references can be upgraded to the tested version after user approval.
Upgrade: Back up .easyTdd and update all VSIX/MCP tools sharing it before migration. Ask for confirmation before calling upgrade; review custom templates afterwards. Older configuration-writing tools cannot safely read settings 6. To downgrade, restore the backup and previous tool/package versions. Settings compatibility uses the release major and template compatibility uses major/minor; patch releases retain both.
Requirements
- .NET 10 SDK or later
- A .NET solution (
.slnfile) - An MCP-compatible AI client (Claude Desktop, VS Code with Copilot, Cursor, etc.)
Installation
.NET global tool
dotnet tool install -g EasyTdd.Mcp --version 6.0.2
Verify the installation:
easytdd-mcp --help
easytdd-mcp --version
Updating
dotnet tool update -g EasyTdd.Mcp --version 6.0.2
Uninstalling
dotnet tool uninstall -g EasyTdd.Mcp
Restart the MCP client after updating, before migrating settings.
The experimental npm launcher is not part of this release. Use the .NET tool directly.
MCP Client Configuration
Claude Desktop
Add the server to claude_desktop_config.json (typically at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
.NET global tool:
{
"mcpServers": {
"easytdd": {
"command": "easytdd-mcp",
"args": ["--solution", "C:/path/to/your/solution.sln"]
}
}
}
VS Code (GitHub Copilot / MCP extension)
Add to your .vscode/mcp.json or user settings:
.NET global tool:
{
"servers": {
"easytdd": {
"type": "stdio",
"command": "easytdd-mcp",
"args": ["--solution", "${workspaceFolder}/YourSolution.sln"]
}
}
}
Cursor
Add to .cursor/mcp.json in your project root:
.NET global tool:
{
"mcpServers": {
"easytdd": {
"command": "easytdd-mcp",
"args": ["--solution", "/absolute/path/to/YourSolution.sln"]
}
}
}
Tip: Pass
--solutionat startup to pre-load your solution. If omitted, call theload_solutiontool first before using any generation tools.
Use --help or --version on its own. Unknown arguments, a missing solution path,
or repeated --solution options exit with code 2 and an error on stderr.
When running the server, stdout is reserved for MCP messages; logs go to stderr.
Getting Started
Once the server is connected, follow this workflow in your AI chat:
Initialize EasyTdd for your solution (first time only):
"Initialize EasyTdd for my solution."
Review settings with the assistant — confirm test framework (NUnit / xUnit / MSTest), project naming conventions, and tooling namespaces.
Generate code by asking naturally:
"Generate a builder for
MyApp.Order." "Generate a test class forMyApp.OrderService." "Generate a fluent mock forMyApp.IPaymentGateway."
Tools Reference
Solution
| Tool | Description |
|---|---|
load_solution |
Load or reload a .sln file. Returns the list of project names. |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
solutionPath |
string | ✅ | Absolute path to the .sln file |
Generator packages
| Tool | Description |
|---|---|
check_generator_packages |
Read-only check of existing direct EasyTdd.Generators references in loaded C# projects. Returns the tested version, project paths, versions, and actions: Upgrade, Current, or Manual. |
update_generator_packages |
Recheck and upgrade only explicitly approved project paths to the tested version. Requires confirmed: true; the default makes no changes. |
Approval happens in the conversation, not inside a waiting MCP call:
- Call
check_generator_packagesand show the proposed projects and tested target version to the user. - Ask which projects the user approves for upgrade.
- Call
update_generator_packageswith only those absoluteprojectFilePathsandconfirmed: true.
The updater validates the entire selection against the loaded solution before making changes. It rechecks each reference immediately before updating and leaves matching, newer, prerelease, floating, missing, or shared/centrally managed references unchanged. Shared version declarations require manual review. A failure in one selected project is reported without preventing updates to the others.
After successful updates the server reloads the solution. Restart Visual Studio if it is open so it reloads the source generators. Incremental generation still installs the tested package when a reference is missing; it never silently upgrades an existing older reference.
update_generator_packages parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectFilePaths |
string[] | Yes | Absolute loaded C# project paths returned by the check and approved by the user |
confirmed |
bool | No | Explicit user approval of these project upgrades; defaults to false |
This workflow is independent of upgrade, which migrates EasyTdd settings and templates, not NuGet package references.
Settings
| Tool | Description |
|---|---|
initialize |
Initialize EasyTdd for the solution. Creates .easyTdd/ folder with settings.json and default templates. Must be called once before any generation tool. |
upgrade |
Upgrade settings and templates to the installed version. Ask for user confirmation before calling. |
get_settings |
Return the current settings with field descriptions. |
update_settings |
Merge a partial settings JSON into the current settings. |
customize_template |
Copy a default template to CustomTemplates/ and update settings to use it. |
get_model |
Return the Scriban model schema for a given generation tool — use to validate custom templates. |
update_settings parameters
| Name | Type | Required | Description |
|---|---|---|---|
partialJson |
string | ✅ | Partial settings JSON (only fields to change). Example: {"Test": {"DefaultTestFramework": "xUnit"}} |
customize_template parameters
| Name | Type | Required | Description |
|---|---|---|---|
templateFilePath |
string | ✅ | Relative template path from templates_used in a generation response |
get_model parameters
| Name | Type | Required | Description |
|---|---|---|---|
toolName |
string | ✅ | One of: generate_builder, generate_builder_plain, generate_fluent_mock, generate_fluent_mock_plain, generate_test, generate_test_cases, generate_test_cases_external |
Builder Generation
Generate Builder pattern test doubles for concrete types.
| Tool | Description |
|---|---|
generate_builder |
⭐ Recommended. Generate an incremental builder — attribute-driven, auto-updates when the target class changes. |
generate_builder_plain |
Generate a template-based builder generated once and reflecting the type at generation time. |
Parameters (both tools)
| Name | Type | Required | Description |
|---|---|---|---|
typeName |
string | ✅ | Fully qualified type name (e.g. MyApp.Order) or simple name when contextFilePath is provided |
contextFilePath |
string | ❌ | Path to a file that uses or declares the type; required when typeName is a simple name |
regenerate |
bool | ❌ | Overwrite files that have Recreate=true in settings (default: false) |
Fluent Mock Generation
Generate Moq-based fluent mocks for interfaces and abstract classes.
| Tool | Description |
|---|---|
generate_fluent_mock |
⭐ Recommended. Generate an incremental FluentMock — wraps Moq with fluent Setup/Verify methods, auto-updates when the interface changes. |
generate_fluent_mock_plain |
Generate a template-based FluentMock generated once and reflecting the type at generation time. |
Parameters (both tools)
| Name | Type | Required | Description |
|---|---|---|---|
typeName |
string | ✅ | Fully qualified type name (e.g. MyApp.IPaymentGateway) or simple name when contextFilePath is provided |
contextFilePath |
string | ❌ | Path to a file that uses or declares the type; required when typeName is a simple name |
regenerate |
bool | ❌ | Overwrite files that have Recreate=true in settings (default: false) |
Test Class Generation
| Tool | Description |
|---|---|
generate_test |
Generate a test class for a type. Creates test doubles (builders/mocks) for constructor dependencies, a subject-under-test field, and test method stubs. |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
typeName |
string | ✅ | Fully qualified type name (e.g. MyApp.OrderService) or simple name when contextFilePath is provided |
contextFilePath |
string | ❌ | Path to a file that uses or declares the type |
regenerate |
bool | ❌ | Overwrite files with Recreate=true (default: false) |
Test Cases Generation
Generate parameterized test case data for existing test methods.
| Tool | Description |
|---|---|
generate_test_cases |
Add an attribute and inline source method to a parameterized test method in the same file. |
generate_test_cases_external |
Add an attribute and create a separate source class file for test case data. |
Parameters (both tools)
| Name | Type | Required | Description |
|---|---|---|---|
typeName |
string | ✅ | Fully qualified name of the containing test class (e.g. MyApp.Tests.OrderServiceTests) or simple name when contextFilePath is provided |
methodName |
string | ✅ | Test method name. For overloads, append parameter types: Process(int,string) |
contextFilePath |
string | ❌ | Path to the test file; required when typeName is a simple name |
regenerate |
bool | ❌ | (generate_test_cases_external only) Overwrite the source class file if it exists (default: false) |
Generation Result
All generation tools return a result object with the following fields:
| Field | Type | Description |
|---|---|---|
files |
array | List of { filePath, status } — status is Regenerated, Created, Skipped, or SkippedExistsUserEditable |
templates_used |
array | Scriban template paths used during generation |
messages |
array | Informational messages (e.g. skipped user-editable files) |
Customizing Templates
EasyTdd uses Scriban templates. To customize:
- Run a generation tool to see which templates were used (
templates_usedin the result). - Call
customize_templatewith a path fromtemplates_used. - Edit the copied file in
CustomTemplates/. - Use
get_modelto verify your template uses valid field names.
Settings Overview
After initialize, a .easyTdd/settings.json file is created next to the .sln file. Key fields:
| Field | Description |
|---|---|
DefaultTestFramework |
NUnit, xUnit, or MsTest |
AssemblySpecificTargetProjectSuffix |
Suffix used to locate the target test project (e.g. Tests, TestDoubles) |
ToolingNamespaces |
using directives added to generated files per tool |
Folder |
Subfolder within the target project for generated files |
ClassSuffix |
Suffix for generated class names (e.g. Builder, Mock) |
ContentTemplateFile |
Scriban template path (DefaultTemplates\ = default, CustomTemplates\ = customized) |
Use get_settings to see the full current configuration and update_settings to change it.
License
Release verification
From the repository root, build the package and test an isolated installation:
dotnet test EasyTdd.Mcp.Tests/EasyTdd.Mcp.Tests.csproj -c Release
dotnet pack EasyTdd.Mcp/EasyTdd.Mcp.csproj -c Release --output ./artifacts/mcp
node scripts/test-mcp-package.mjs ./artifacts/mcp/EasyTdd.Mcp.6.0.2.nupkg
The smoke test requires Node.js 18 or later, the .NET 10 SDK and access to NuGet.org. It creates a temporary tool installation and solution, exercises all 16 tools, builds and runs generated doubles, checks approved package updates, and verifies legacy migration and preservation of custom files. It retains its temporary directory for inspection and does not replace the global MCP installation.
Publish only EasyTdd.Mcp.6.0.2.nupkg; referenced projects may also produce packages
in the output directory. After NuGet makes the package and its README available,
publish server.json to the MCP Registry using the verified dev.easytdd namespace.
Domain verification is required before Registry publication.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.2 | 74 | 10/20/2026 |
6.0.2
- Added help and version commands and validation of startup arguments.
- Migrated legacy settings 0.5 to 6 without replacing customized values, and deployed template compatibility version 6.0.
- Rejected unsupported migrations and future settings or template versions before changing files.
- Reported newer settings or templates as an outdated MCP service, with tool update and restart instructions.
- Preserved custom templates and corrected their upgrade guidance.
- Aligned the MCP server release and generator installation/approved-upgrade target to EasyTdd.Generators 6.0.2.
- Added generator-package check and approved-update tools for eligible project-local references.