Skip to main content
Glama

Hello World MCP Server

by snoopdave

Hello World MCP Server

A minimal Model Context Protocol (MCP) server written in TypeScript. This project demonstrates how to create MCP-compliant resources and tools for use with LLMs and MCP-enabled clients like Claude Desktop.

Features

  • MCP Resources:
    Provides simple resources at hello://greeting, hello://info, and a resource list at hello://list.
  • MCP Tool:
    A helloTool that echoes messages or returns a default greeting.
  • Stdio Transport:
    Communicates via standard input/output, making it easy to integrate with MCP clients.

Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • npm (comes with Node.js)

Install Dependencies

npm install

Build the Project

Compile TypeScript source files to JavaScript in the dist/ directory:

npm run build

Run the Server (Standalone)

npm start

This will start the MCP server via Node.js using the built output.


Run Tests

Integration tests are provided to verify the MCP server works end-to-end:

npm test

This runs the tests in src/integration.test.ts using Jest.


Using with Claude Desktop

You can configure Claude Desktop or any MCP client to use this server as a plugin/tool by specifying the command to launch the MCP server.

Example Configuration Snippet

Add the following to your Claude Desktop settings (replace the path with your actual project path):

"hello-world-mcp": { "command": "node", "args": [ "/path/to/mcp-hello-world-ts/dist/index.js" ] }
  • Replace /path/to/mcp-hello-world-ts/ with the full path to where you cloned this repo.
  • Make sure you have built the project (npm run build) before starting Claude Desktop.

Project Structure

. ├── src/ │ ├── index.ts # Main MCP server entry point │ ├── resources/helloResource.ts # MCP resource definitions │ └── tools/helloTool.ts # MCP tool definition ├── dist/ # Compiled JS output ├── package.json ├── tsconfig.json ├── README.md └── ...

Customization

  • To add new tools or resources, create new files in src/resources/ or src/tools/ and register them in src/index.ts.
  • Modify helloResource.ts or helloTool.ts to change the greeting or add additional functionality.

License

MIT License


Author


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

A minimal Model Context Protocol server in TypeScript that demonstrates MCP-compliant resources and tools for LLMs, featuring simple resources and a basic tool that echoes messages or returns greetings.

  1. Features
    1. Getting Started
      1. Prerequisites
      2. Install Dependencies
      3. Build the Project
      4. Run the Server (Standalone)
      5. Run Tests
    2. Using with Claude Desktop
      1. Example Configuration Snippet
    3. Project Structure
      1. Customization
        1. License
          1. Author

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              A template for creating Model Context Protocol (MCP) servers in TypeScript, offering features like container-based dependency injection, a service-based architecture, and integration with the LLM CLI for architectural design feedback through natural language.
              Last updated -
              1
              5
              TypeScript
            • -
              security
              F
              license
              -
              quality
              A TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.
              Last updated -
              67
              TypeScript
              • Apple
            • -
              security
              F
              license
              -
              quality
              A simple TypeScript library for creating Model Context Protocol (MCP) servers with features like type safety, parameter validation, and a minimal code API.
              Last updated -
              1
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              A starter template for creating Model Context Protocol servers using TypeScript, providing basic setup and sample tool implementation for developers to build their own MCP servers.
              Last updated -
              TypeScript

            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/snoopdave/mcp-hello-world-ts'

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