New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

EasyTdd.Mcp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

EasyTdd.Mcp

EasyTdd MCP server — AI-assistant-driven TDD code generation (builders, fluent mocks, test classes) for .NET solutions.

nugetNuGet
Version
6.0.2
Version published
Maintainers
1
Created
Source

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 --help and --version commands that exit without starting the server, and clear errors for invalid arguments.
  • Migrated settings 0.5 → 6 by 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 (.sln file)
  • 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 --solution at startup to pre-load your solution. If omitted, call the load_solution tool 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 for MyApp.OrderService." "Generate a fluent mock for MyApp.IPaymentGateway."

Tools Reference

Solution

ToolDescription
load_solutionLoad or reload a .sln file. Returns the list of project names.

Parameters

NameTypeRequiredDescription
solutionPathstring✅Absolute path to the .sln file

Generator packages

ToolDescription
check_generator_packagesRead-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_packagesRecheck 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_packages and show the proposed projects and tested target version to the user.
  • Ask which projects the user approves for upgrade.
  • Call update_generator_packages with only those absolute projectFilePaths and confirmed: 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

NameTypeRequiredDescription
projectFilePathsstring[]YesAbsolute loaded C# project paths returned by the check and approved by the user
confirmedboolNoExplicit 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

ToolDescription
initializeInitialize EasyTdd for the solution. Creates .easyTdd/ folder with settings.json and default templates. Must be called once before any generation tool.
upgradeUpgrade settings and templates to the installed version. Ask for user confirmation before calling.
get_settingsReturn the current settings with field descriptions.
update_settingsMerge a partial settings JSON into the current settings.
customize_templateCopy a default template to CustomTemplates/ and update settings to use it.
get_modelReturn the Scriban model schema for a given generation tool — use to validate custom templates.

update_settings parameters

NameTypeRequiredDescription
partialJsonstring✅Partial settings JSON (only fields to change). Example: {"Test": {"DefaultTestFramework": "xUnit"}}

customize_template parameters

NameTypeRequiredDescription
templateFilePathstring✅Relative template path from templates_used in a generation response

get_model parameters

NameTypeRequiredDescription
toolNamestring✅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.

ToolDescription
generate_builder⭐ Recommended. Generate an incremental builder — attribute-driven, auto-updates when the target class changes.
generate_builder_plainGenerate a template-based builder generated once and reflecting the type at generation time.

Parameters (both tools)

NameTypeRequiredDescription
typeNamestring✅Fully qualified type name (e.g. MyApp.Order) or simple name when contextFilePath is provided
contextFilePathstring❌Path to a file that uses or declares the type; required when typeName is a simple name
regeneratebool❌Overwrite files that have Recreate=true in settings (default: false)

Fluent Mock Generation

Generate Moq-based fluent mocks for interfaces and abstract classes.

ToolDescription
generate_fluent_mock⭐ Recommended. Generate an incremental FluentMock — wraps Moq with fluent Setup/Verify methods, auto-updates when the interface changes.
generate_fluent_mock_plainGenerate a template-based FluentMock generated once and reflecting the type at generation time.

Parameters (both tools)

NameTypeRequiredDescription
typeNamestring✅Fully qualified type name (e.g. MyApp.IPaymentGateway) or simple name when contextFilePath is provided
contextFilePathstring❌Path to a file that uses or declares the type; required when typeName is a simple name
regeneratebool❌Overwrite files that have Recreate=true in settings (default: false)

Test Class Generation

ToolDescription
generate_testGenerate a test class for a type. Creates test doubles (builders/mocks) for constructor dependencies, a subject-under-test field, and test method stubs.

Parameters

NameTypeRequiredDescription
typeNamestring✅Fully qualified type name (e.g. MyApp.OrderService) or simple name when contextFilePath is provided
contextFilePathstring❌Path to a file that uses or declares the type
regeneratebool❌Overwrite files with Recreate=true (default: false)

Test Cases Generation

Generate parameterized test case data for existing test methods.

ToolDescription
generate_test_casesAdd an attribute and inline source method to a parameterized test method in the same file.
generate_test_cases_externalAdd an attribute and create a separate source class file for test case data.

Parameters (both tools)

NameTypeRequiredDescription
typeNamestring✅Fully qualified name of the containing test class (e.g. MyApp.Tests.OrderServiceTests) or simple name when contextFilePath is provided
methodNamestring✅Test method name. For overloads, append parameter types: Process(int,string)
contextFilePathstring❌Path to the test file; required when typeName is a simple name
regeneratebool❌(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:

FieldTypeDescription
filesarrayList of { filePath, status } — status is Regenerated, Created, Skipped, or SkippedExistsUserEditable
templates_usedarrayScriban template paths used during generation
messagesarrayInformational 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_used in the result).
  • Call customize_template with a path from templates_used.
  • Edit the copied file in CustomTemplates/.
  • Use get_model to 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:

FieldDescription
DefaultTestFrameworkNUnit, xUnit, or MsTest
AssemblySpecificTargetProjectSuffixSuffix used to locate the target test project (e.g. Tests, TestDoubles)
ToolingNamespacesusing directives added to generated files per tool
FolderSubfolder within the target project for generated files
ClassSuffixSuffix for generated class names (e.g. Builder, Mock)
ContentTemplateFileScriban template path (DefaultTemplates\ = default, CustomTemplates\ = customized)

Use get_settings to see the full current configuration and update_settings to change it.

License

MIT

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.

Keywords

mcp

FAQs

Package last updated on 20 Oct 2026

Related posts