Hello World MCP Server

Hello World MCP Server

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.

Category
Visit Server

README

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.

<img src="https://github.com/user-attachments/assets/ec1973be-d61c-4398-8ab2-a4bae4296e20" alt="8a1b1a9f-ca0d-4815-bb72-6efdab0cfd33" width="300"/>

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


Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured