MCP.so
Sign In
Servers

MCP Test Server

@nabadeep25

streamable http MCP Server using Nodejs

Overview

What is MCP Test Server?

MCP Test Server is a Model Context Protocol (MCP) server implementation with multiple tools for testing and demonstration purposes. Built with TypeScript and Express.js, it uses Streamable HTTP transport and provides a BMI calculator, weather service, and echo tool.

How to use MCP Test Server?

Requires Node.js v18 or higher. Clone the repository, run npm install, copy .env.example to .env, optionally add a weather API key. Build with npm run build and start with npm start; or use npm run dev for hot reload. The server listens on http://localhost:3000 and the MCP endpoint is POST /mcp. Test via the MCP Inspector (npm run inspector) or VS Code integration by adding the server URL to your settings.

Key features of MCP Test Server

  • Built with TypeScript and Express.js
  • Streamable HTTP transport for MCP
  • Environment-based configuration
  • Hot reload development support
  • Modular tool architecture
  • Three tools: BMI calculator, weather service, echo tool

Use cases of MCP Test Server

  • Calculate Body Mass Index from weight and height
  • Get current weather information for any city (with optional API key)
  • Echo messages for testing client–server interaction
  • Demonstrate MCP tool integration in a development environment
  • Serve as a reference project for adding new MCP tools

FAQ from MCP Test Server

What tools does MCP Test Server provide?

It provides three tools: calculate-bmi (BMI Calculator), get-weather (Weather Service), and echo (Echo Tool).

Do I need an API key to use the weather tool?

No, but adding a valid OpenWeatherMap API key in the WEATHER_API_KEY environment variable enables the weather service.

What are the runtime prerequisites?

Node.js v18 or higher and a package manager (npm or yarn) are required.

How can I test the server interactively?

Start the server with npm start and run npm run inspector in another terminal to open the MCP Inspector GUI.

How do I add a new tool to MCP Test Server?

Create a tool file in src/tools/, define its schema and handler, then import and register it in src/index.ts using server.tool().

Tags

More from Developer Tools