Skip to main content
Glama

HelloWorld MCP Server

by gemyago

HelloWorld MCP Server

A simple HelloWorld MCP (Model Context Protocol) server experiment built with TypeScript.

Features

This MCP server provides two simple tools:

  • hello: Say hello to someone (default: "World")
  • add: Add two numbers together

Prerequisites

  • Node.js 22+ (LTS)
  • npm
  • nvm (recommended for Node.js version management)
  • direnv (for environment management)

Setup

  1. Node.js Version Management
    # If you have nvm installed: nvm use # This will use Node.js version 22 as specified in .nvmrc
  2. Environment Setup with direnv
    # Allow direnv for this directory direnv allow # This will automatically add node_modules/.bin to your PATH
  3. Install Dependencies
    npm install

Development

Available Scripts

  • npm run dev - Run the server in development mode using tsx
  • npm run build - Compile TypeScript to JavaScript
  • npm start - Run the compiled server
  • npm run lint - Run ESLint on the source code
  • npm run lint:fix - Run ESLint and automatically fix issues
  • npm run clean - Remove the dist directory

Running the Server

For development:

npm run dev

For production:

npm run build npm start

MCP Server Usage

This server communicates via stdio and implements the Model Context Protocol. It provides:

Tools

  1. hello
    • Description: Say hello to someone
    • Parameters:
      • name (optional): The name of the person to greet (default: "World")
    • Example: {"name": "Alice"} → "Hello, Alice! 👋 Welcome to the HelloWorld MCP server!"
  2. add
    • Description: Add two numbers together
    • Parameters:
      • a (required): First number
      • b (required): Second number
    • Example: {"a": 5, "b": 3} → "5 + 3 = 8"

Project Structure

├── src/ │ └── index.ts # Main MCP server implementation ├── dist/ # Compiled JavaScript (after build) ├── .nvmrc # Node.js version specification ├── .envrc # direnv configuration ├── eslint.config.js # ESLint configuration ├── tsconfig.json # TypeScript configuration ├── package.json # Node.js project configuration └── README.md # This file

Code Quality

This project uses:

  • TypeScript for type safety
  • ESLint with TypeScript support for code quality
  • Strict TypeScript configuration for better type checking

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

A simple TypeScript MCP server that provides two tools: one for greeting users with a customizable name and another for adding two numbers together.

  1. Features
    1. Prerequisites
      1. Setup
        1. Development
          1. Available Scripts
          2. Running the Server
        2. MCP Server Usage
          1. Tools
        3. Project Structure
          1. Code Quality
            1. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                TypeScript-based MCP server designed to enhance code editing experiences by providing features such as hover information, code completion, and diagnostics.
                Last updated -
                3
                13
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                This TypeScript-based MCP server enables users to manage a simple notes system with capabilities to create and summarize notes through structured prompts and resources.
                Last updated -
                5
                0
                TypeScript
                MIT License
                • Apple
              • -
                security
                F
                license
                -
                quality
                This TypeScript-based MCP server allows users to manage a simple notes system through creating and summarizing text notes using Model Context Protocol (MCP).
                Last updated -
                410
                6
                TypeScript
                • Apple
              • A
                security
                A
                license
                A
                quality
                A TypeScript-based server that allows calling other MCP clients from your own MCP client, facilitating task delegation and context window offloading for enhanced multi-agent interactions.
                Last updated -
                3
                14
                JavaScript
                MIT License
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/gemyago/typescript-mcp-boilerplate'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server