---
title: "Discussion on \"How to Test an MCP Server: Vitest, In-Memory Transport, Streamable HTTP and the Inspector CLI\" | Hashnode"
description: "Discussion on \"How to Test an MCP Server: Vitest, In-Memory Transport, Streamable HTTP and the Inspector CLI\". Unit tests for tool logic, in-memory contract tests with the official SDK client, Streamable HTTP checks and Inspector CLI commands"
url: "https://hashnode.com/posts/test-mcp-server/6ae594c6d2e7b03e0edd314a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Test an MCP Server: Vitest, In-Memory Transport, Streamable HTTP and the Inspector CLI](https://fabwaseem.hashnode.dev/test-mcp-server?utm_source=hashnode&utm_medium=feed)

Unit tests for tool logic, in-memory contract tests with the official SDK client, Streamable HTTP checks and Inspector CLI commands

Oct 31 · 11 min read · fabwaseem.hashnode.dev  
Read the article

-   [#mcp](https://hashnode.com/tag/mcp)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#testing](https://hashnode.com/tag/testing)
-   [#vitest](https://hashnode.com/tag/vitest)

## Written by

[Waseem Anjum](https://hashnode.com/@fabwaseem)

@fabwaseem · Lahore, Pakistan

  
[View profile](https://hashnode.com/@fabwaseem)

Full Stack & AI Automation Engineer

I'm a full stack and AI automation engineer in Lahore, Pakistan. I build AI agents, MCP servers and automation pipelines, and the Next.js, React, Node.js and NestJS products around them, on PostgreSQL or MongoDB. Clear system design, fast pages and code that holds up in production.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
