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
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
Transport 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
Running with Docker
Testing the Dockerized Server
Once running the HTTP transport container:
Development with Docker
Available 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.
This server cannot be installed
A simple demonstration server for the Model Context Protocol that provides tools for creating and managing greetings with support for multiple transport methods (stdio, HTTP, SSE).
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that provides greeting tools, resources, and prompts, demonstrating client-server interaction using TypeScript.Last updated -1
- -securityAlicense-qualityA simple implementation of a Model Context Protocol server that demonstrates core functionality including mathematical tools (add, subtract) and personalized greeting resources.Last updated -75GPL 3.0
- -securityFlicense-qualityA sample implementation of Model Context Protocol server demonstrating core functionality with simple arithmetic tools and greeting resources.Last updated -
- -securityFlicense-qualityA 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.Last updated -