Skip to main content
Glama

Hello World MCP Server

by ai-mcpx

MCP Hello World Server

A simple Hello World MCP (Model Context Protocol) server built with the FastMCP framework in Python using HTTP transport.

Prerequisites

  • Python 3.10 or higher

Install

# Install uv curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment and install dependencies uv sync # For development dependencies uv sync --dev

Usage

Running the Server

Using Docker (Production)
docker build -t mcp-hello:latest . docker-compose up -d
Using uv (Development)
# Run the server using uv (HTTP on port 8000) uv run python -m mcp_hello.server # Custom host/port using environment variables MCP_HOST=localhost MCP_PORT=3000 uv run python -m mcp_hello.server
Accessing the HTTP Server
  • Default: http://0.0.0.0:8000
  • Local access: http://localhost:8000
  • Custom: Set MCP_HOST and MCP_PORT environment variables

Available Tools

1. say_hello

Generate greetings in different languages.

Parameters:

  • name (str, optional): Name to greet (default: "World")
  • language (str, optional): Language code (default: "en")

Supported languages:

  • en - English
  • es - Spanish
  • fr - French
  • de - German
  • it - Italian
  • pt - Portuguese
  • ru - Russian
  • ja - Japanese
  • ko - Korean
  • zh - Chinese

Example:

{ "tool": "say_hello", "arguments": { "name": "Alice", "language": "es" } }

Response:

{ "greeting": "¡Hola, Alice!", "language": "es", "name": "Alice", "message": "Greeting generated successfully in es" }
2. get_server_info

Get information about the server capabilities.

Parameters:

None

Response:

{ "name": "Hello World MCP Server", "version": "1.2.0", "description": "A simple hello world MCP server using FastMCP", "capabilities": [ "greeting generation", "multi-language support", "server information" ], "supported_languages": ["en", "es", "fr", "de", "it", "pt", "ru", "ja", "ko", "zh"] }

Available Resources

1. file://hello-world

A simple hello world message resource.

2. file://server-status

Current server status and available tools/resources.

Example Client Usage

# First, start the server in one terminal uv run python -m mcp_hello.server # Then in another terminal, run the HTTP client example uv run python mcp_hello/http_client_example.py

Environment Variables

The server supports the following environment variables:

  • MCP_HOST: Server host address (default: 0.0.0.0)
  • MCP_PORT: Server port number (default: 8000)

Example:

MCP_HOST=localhost MCP_PORT=3000 uv run python -m mcp_hello.server

License

This project is licensed under the terms specified in the LICENSE file.

Reference

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A simple MCP server that generates multi-language greetings and provides server information using the FastMCP framework.

  1. Prerequisites
    1. Install
      1. Usage
        1. Running the Server
        2. Available Tools
        3. Available Resources
      2. Example Client Usage
        1. Environment Variables
      3. License
        1. Reference

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            A server that enables communication with multiple unichat-based MCP servers simultaneously, allowing users to query different language models and combine their responses for more comprehensive results.
            Last updated -
            2
            JavaScript
          • -
            security
            F
            license
            -
            quality
            A minimal TypeScript MCP server that provides a 'hello' tool using the fastMCP framework.
            Last updated -
            TypeScript
          • -
            security
            F
            license
            -
            quality
            A simple MCP server implementation that demonstrates streaming capabilities with tools for greetings and notifications, accessible through an interactive command-line client.
            Last updated -
            1
            TypeScript
          • -
            security
            F
            license
            -
            quality
            A feature-rich Model Context Protocol server built with FastMCP that provides various tools including basic utilities, network services, file operations, encryption tools, and system information functions.
            Last updated -
            Python

          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/ai-mcpx/mcp-hello'

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