Loading connector details…
Loading connector details…
Choose a unique username to continue using AgentHotspot
by diomonogatari • Uncategorized
In-memory integration testing factory for .NET Model Context Protocol (MCP) servers.
Run realistic integration tests of MCP servers without external dependencies.
An in-memory transport and real MCP protocol flow in tests.
Easy dependency injection and service configuration in MCP server tests.
McpServerFactory provides a testing experience similar to WebApplicationFactory for ASP.NET Core by booting an MCP server in-process and connecting a real McpClient through in-memory streams. This allows realistic integration tests without the need for network ports, Docker, or external services. It supports easy dependency overrides, is framework-agnostic, and ensures thread-safe client creation and safe disposal. The library targets .NET 10.0 and is compatible with a specific MCP SDK version.