MCP Hello World 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., "@MCP Hello World Server say hello to Alice"
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.
MCP Hello World Server
A minimal Model Context Protocol (MCP) server demonstrating all core MCP features: Tools, Resources, and Prompts with dual transport support (STDIO and HTTP/SSE).
π Features
Tools (Interactive Functions)
say_hello: Personalized greeting with optional custom messageget_time: Returns current server time
Resources (Data Sources)
data://users: Sample user data (JSON format)data://config: Server configuration metadata (JSON format)text://welcome: Welcome message (plain text format)
Prompts (Template Generation)
greeting: Generate personalized greetings with different stylesintroduction: Generate MCP explanations for different audiences
Related MCP server: MCP AI Chat LangChain
π Transport Modes
This server supports two transport modes:
STDIO Transport (Default for Local)
Use Case: Claude Desktop integration, local development
Protocol: stdin/stdout communication
Start Command:
npm startorTRANSPORT=stdio npm start
HTTP/SSE Transport (Default for Docker)
Use Case: Web services, containerized deployments, remote access
Protocol: HTTP with Server-Sent Events for real-time communication
Start Command:
TRANSPORT=http npm startornpm run start:httpDefault Port: 3001 (configurable via
PORTenvironment variable)Health Check:
GET /healthendpoint available
π Prerequisites
Node.js 22+ (LTS recommended)
npm or yarn package manager
Docker (for containerized deployment)
curl (for HTTP transport health checks in Docker)
β‘ Quick Start
Local Development (STDIO)
Install dependencies:
npm installBuild the project:
npm run buildStart server (STDIO mode):
npm start # or explicitly npm run start:stdioTest with MCP Inspector:
npm run inspect
Local Development (HTTP)
Start server (HTTP mode):
npm run start:http # or TRANSPORT=http npm startTest health endpoint:
curl http://localhost:3001/healthCustom port:
PORT=8080 npm run start:http
Docker Deployment
Build Docker image:
npm run docker:buildRun HTTP server (default for Docker):
npm run docker:run # or with custom options ./scripts/docker-run.sh --transport=http --port=3001Run STDIO server:
npm run docker:run:stdio # or ./scripts/docker-run.sh --stdioStop the container:
npm run docker:stop
π§ͺ Testing & Development
MCP Inspector Testing
The included MCP Inspector provides a web-based interface to test all server capabilities:
npm run inspectThis will:
Build the server automatically
Launch MCP Inspector in your browser
Connect to your server for interactive testing
Allow you to test tools, resources, and prompts
Development Mode
For development with auto-rebuild:
npm run devπ³ Docker Usage
Production Deployment
# Build optimized production image
npm run docker:build
# Run with restart policy
npm run docker:run
# Test with MCP Inspector
npm run docker:inspect
# Monitor logs
docker logs -f mcp-hello-world
# Stop cleanly
npm run docker:stopManual Docker Commands
# Build image
docker build -t mcp-hello-world-server .
# Run container
docker run -d --name mcp-hello-world -p 3001:3001 mcp-hello-world-server
# View logs
docker logs mcp-hello-world
# Stop and remove
docker stop mcp-hello-world && docker rm mcp-hello-worldπ Integration
Claude Desktop Integration (STDIO)
Add this server to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"hello-world": {
"command": "node",
"args": ["/absolute/path/to/your/project/build/index.js"]
}
}
}HTTP Transport Integration
For web services and remote access:
# Start HTTP server
TRANSPORT=http PORT=3001 npm start
# Health check endpoint
curl http://localhost:3001/health
# Environment variables
TRANSPORT=http # Enable HTTP transport
PORT=3001 # Server port (default: 3001)MCP Client Compatibility
STDIO Transport: Compatible with Claude Desktop and any MCP client supporting stdio
HTTP Transport: Compatible with web-based MCP clients and custom integrations
Docker: Runs HTTP transport by default for containerized deployments
ποΈ Architecture
Transport: Dual support for stdio and HTTP/SSE
STDIO: stdin/stdout communication (default for local)
HTTP: Express.js with Server-Sent Events (default for Docker)
Protocol: Model Context Protocol v2024-11-05
Runtime: Node.js 22+ with ES modules
Language: TypeScript with strict type checking
Container: Multi-stage Docker build with Alpine Linux + curl
Port: 3001 (configurable via PORT environment variable)
Health Check:
/healthendpoint for HTTP transport
π API Reference
Tools
say_hello
{
"name": "say_hello",
"parameters": {
"name": "string (required) - Person's name",
"message": "string (optional) - Custom message"
}
}get_time
{
"name": "get_time",
"parameters": {}
}Resources
data://users
Type: application/json
Content: Array of user objects with id, name, email
data://config
Type: application/json
Content: Server configuration and metadata
text://welcome
Type: text/plain
Content: Multi-line welcome message
Prompts
greeting
{
"name": "greeting",
"arguments": {
"name": "string (required) - Person's name",
"style": "string (optional) - formal|casual|friendly"
}
}introduction
{
"name": "introduction",
"arguments": {
"audience": "string (optional) - developer|user|manager"
}
}π οΈ Development
Project Structure
mcp-hello-world-server/
βββ src/
β βββ index.ts # Main server implementation
βββ scripts/
β βββ docker-build.sh # Docker build script
β βββ docker-run.sh # Docker run script
β βββ docker-stop.sh # Docker stop script
βββ build/ # Compiled TypeScript output
βββ Dockerfile # Multi-stage Docker configuration
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ README.md # This fileAvailable Scripts
Core Scripts
npm run build- Compile TypeScriptnpm run start- Start server (STDIO transport by default)npm run dev- Development mode with auto-rebuild
Transport-Specific Scripts
npm run start:stdio- Start server with STDIO transportnpm run start:http- Start server with HTTP transport
Development & Testing
npm run inspect- Launch MCP Inspector for testing
Docker Scripts
npm run docker:build- Build Docker imagenpm run docker:run- Run HTTP server in Docker (default)npm run docker:run:stdio- Run STDIO server in Dockernpm run docker:run:http- Run HTTP server in Docker (explicit)npm run docker:stop- Stop Docker containernpm run docker:inspect- Test Docker container with MCP Inspector
π Troubleshooting
Build Issues
Ensure Node.js 22+ is installed:
node --versionClear build cache:
rm -rf build/ node_modules/ && npm installCheck TypeScript errors:
npx tsc --noEmit
MCP Inspector Issues
Ensure server builds first:
npm run buildCheck for port conflicts (Inspector uses random ports)
Try restarting: Kill Inspector and run
npm run inspectagain
HTTP Transport Issues
Port conflicts: Change port with
PORT=8080 npm run start:httpHealth check fails: Verify server is running:
curl http://localhost:3001/healthCORS issues: Server has basic CORS enabled for development
Connection refused: Ensure no firewall blocking port 3000
Docker Issues
Verify Docker is running:
docker infoCheck image exists:
docker images | grep mcp-hello-worldView container logs:
docker logs mcp-hello-worldHealth check:
docker exec mcp-hello-world curl -f http://localhost:3001/healthRebuild image:
npm run docker:build
Environment Variables
TRANSPORT=stdio(default for local) orTRANSPORT=httpPORT=3000(default port for HTTP transport)NODE_ENV=production(for production builds)
π License
MIT License - see LICENSE file for details.
π€ Contributing
Fork the repository
Create a feature branch:
git checkout -b feature-nameMake your changes
Test thoroughly:
npm run inspectandnpm run docker:buildSubmit a pull request
Built with the Model Context Protocol SDK
Available Tools
2 toolsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 2 tools
say_hello and get_time target entirely different operations (greeting vs. clock retrieval) with no functional overlap. An agent can select between them without hesitation.
Both tools follow a clean verb_noun snake_case pattern (say_hello, get_time). The convention is uniform and predictable.
Two tools is thin, but this is explicitly a Hello World demo server, so a minimal surface is appropriate to its purpose. It would only be a mismatch for a real domain server.
For a demo server, the surface covers the two canonical operations (greeting and time) with no dead ends. A personalized greeting or version/info tool could round it out, but nothing critical is missing.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
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
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseDqualityDmaintenanceA ready-to-use starter implementation of the Model Context Protocol (MCP) server that enables applications to provide standardized context for LLMs with sample resources, tools, and prompts.21MIT
- FlicenseNot gradedqualityDmaintenanceA basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.-
- FlicenseNot gradedqualityNot gradedmaintenanceA 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).-
- FlicenseNot gradedqualityDmaintenanceA minimal learning-focused MCP server that demonstrates core primitives like tools and resources through simple greeting functions. It provides a foundational example for connecting AI models to external data using both Streamable HTTP and stdio transports.-