Hello World MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hello World MCP Servercreate a custom greeting for Alice with a formal tone"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hello World MCP Server
A simple example of a Model Context Protocol (MCP) server that demonstrates basic functionality with greeting tools.
Quick Start
Install dependencies:
pip install -r requirements.txtRun the server:
Choose one of three transport methods:
# For MCP clients (Claude Desktop, Cursor) - stdio transport python run_stdio.py # For HTTP/REST API testing with curl python run_http.py # For SSE transport (web clients) python run_sse.pyTest the server:
# Test the tools without a client python test_server.py # Test with HTTP API and curl python run_http.py # Then: curl http://localhost:8000/tools
Related MCP server: MCP Server Basic Example
Features
This server provides:
4 tools for creating and managing greetings
1 resource for greeting templates
1 prompt for generating greetings
Documentation
See how-to-run-mcp.md for detailed instructions on:
Running the server locally
Testing with various methods
Integrating with Claude Desktop
Troubleshooting common issues
Project Structure
hello-mcp/
├── hello_server.py # Main MCP server implementation
├── test_server.py # Test script for tools
├── run_stdio.py # stdio transport for MCP clients (Claude Desktop, Cursor)
├── run_http.py # HTTP API wrapper for curl testing
├── run_sse.py # SSE transport for web clients
├── requirements.txt # Python dependencies
├── Dockerfile # Docker container configuration
├── .dockerignore # Docker ignore file
├── how-to-run-mcp.md # Detailed setup and testing guide
├── claude_desktop_config_example.json # Example Claude Desktop configuration
├── README.md # This file
└── CLAUDE.md # Claude Code guidance fileTransport Methods
This server can run in three different modes:
stdio transport (
run_stdio.py) - For MCP clients like Claude Desktop and CursorHTTP transport (
run_http.py) - REST API for testing with curl commandsSSE transport (
run_sse.py) - Server-Sent Events for web clients (requires MCP-compatible web client)
Docker Support
Building the Docker Image
# Build the Docker image
docker build -t hello-mcp .Running with Docker
# Run HTTP transport (default) - for curl testing
docker run -p 8000:8000 hello-mcp
# Run stdio transport (for MCP clients)
docker run -it hello-mcp python run_stdio.py
# Run SSE transport (for web clients)
docker run -p 8000:8000 hello-mcp python run_sse.py
# Run direct testing
docker run hello-mcp python test_server.pyTesting the Dockerized Server
Once running the HTTP transport container:
# Test the API
curl http://localhost:8000/tools
# Call a tool
curl -X POST http://localhost:8000/tools/call \
-H "Content-Type: application/json" \
-d '{"name": "say_hello", "arguments": {"name": "Docker"}}'Development with Docker
# Mount source code for development
docker run -p 8000:8000 -v $(pwd):/app hello-mcp
# Interactive shell for debugging
docker run -it hello-mcp /bin/bashAvailable Tools
say_hello(name) - Basic greeting
get_greeting_info() - Server information
create_custom_greeting(name, type, include_time) - Customized greetings
list_available_greetings() - List greeting types
License
This is an example project for learning MCP.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that provides greeting tools, resources, and prompts, demonstrating client-server interaction using TypeScript.1-
- AlicenseNot gradedqualityDmaintenanceA simple implementation of a Model Context Protocol server that demonstrates core functionality including mathematical tools (add, subtract) and personalized greeting resources.96GPL 3.0
- FlicenseNot gradedqualityDmaintenanceA sample implementation of Model Context Protocol server demonstrating core functionality with simple arithmetic tools and greeting resources.-
- -licenseNot gradedqualityNot gradedmaintenanceA simple Model Context Protocol server that demonstrates basic functionality with greeting tools, allowing Claude to say hello and generate custom greetings with different styles and timestamps.-