1 comment

[ 105 ms ] story [ 176 ms ] thread
Hi HN,

I was experimenting with writing writing unit tests for MCP servers. I find unit testing incredibly useful for writing assertions for every MCP primitive: tools, prompts, and resources.

This helps with ensuring that future changes aren't breaking the server's behavior. To do this, I used a simple set up with Jest and MCPClientManager, a custom MCP client I wrote for testing.

Hope you find the article an interesting read!

Matt