MCP ExplorerExplorer

Mcp Server Hello World

@Trippnologyon 20 days ago
1 MIT
FreeCommunity
AI Systems
A NodeJS implementation of a Model Context Protocol (MCP) Hello World server, primarily intended for testing and development purposes.

Overview

What is Mcp Server Hello World

mcp-server-hello-world is a lightweight NodeJS implementation of a Model Context Protocol (MCP) Hello World server, designed primarily for testing and development purposes.

Use cases

Use cases include testing MCP client applications, developing prototypes that require a lightweight server, and experimenting with different communication modes.

How to use

To use mcp-server-hello-world, you can install it as a development dependency using npm or run it directly with npx. You can choose between STDIO mode or HTTP/SSE mode for communication.

Key features

Key features include complete MCP protocol support with static and dynamic data sources, invokable functions like ‘echo’ and ‘debug’, and predefined conversation templates. It also supports communication via STDIO and HTTP/SSE.

Where to use

mcp-server-hello-world can be used in software development environments, particularly for testing applications that implement the Model Context Protocol.

Content

MCP Server Hello World

A lightweight NodeJS implementation of a Model Context Protocol (MCP) Hello World server for testing and development purposes.

Inspired by mcp-hello-world, but much more lightweight (~17MB vs 1GB+).

Features

Complete MCP Protocol Support with resources, tools, and prompts:

  • Resources: Static and dynamic data sources

    • hello://world - Returns “Hello World!”
    • greeting://{name} - Returns personalized greeting
  • Tools: Invokable functions

    • echo - Echoes input with "Hello " prefix
    • debug - Lists all available MCP capabilities
  • Prompts: Predefined conversation templates

    • helpful-assistant - Basic assistant prompt

Communication Modes:

  • STDIO: Direct process communication for MCP clients
  • HTTP/SSE: REST endpoints with Server-Sent Events (starts at http://localhost:3000)
    • /health - Health check endpoint
    • /messages - HTTP POST endpoint for MCP messages
    • /sse - Server-Sent Events endpoint

Installation

As Development Dependency (Recommended)

npm install --save-dev @trippnology/mcp-server-hello-world

Global Installation

npm install -g @trippnology/mcp-server-hello-world

Quick Start

Using npx (Easiest)

# STDIO mode (default)
npx @trippnology/mcp-server-hello-world

# HTTP/SSE mode
npx @trippnology/mcp-server-hello-world --mode http --port 3000

As Dev Dependency

# Via package.json scripts
npm run mcp:stdio
npm run mcp:http

# Or directly
./node_modules/.bin/mcp-hello-world --mode stdio
./node_modules/.bin/mcp-hello-world --mode http --port 8080

Global Installation

mcp-hello-world --mode stdio
mcp-hello-world --mode http --port 3000

CLI Options

  • --mode <stdio|http> - Communication mode (default: stdio)
  • --port <number> - HTTP server port (default: 3000)
  • --host <string> - HTTP server host (default: localhost)
  • --verbose - Enable verbose logging
  • --version - Show version
  • --help - Show help

Package.json Integration

Add these scripts to your package.json for easy testing:

{
  "scripts": {
    "mcp:stdio": "mcp-hello-world --mode stdio",
    "mcp:http": "mcp-hello-world --mode http --port 3001"
  }
}

Testing

npm test

Documentation

For detailed API documentation, request/response examples, and implementation details, see API.md.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature develop
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Copyright © 2025 Rikki Tripp - Trippnology

Tools

No tools

Comments