Allows running and managing a HTTP/HTTPS server built with Bun, providing both REST API endpoints and MCP functionality over HTTP
Hello Service
A unified HTTP/HTTPS service built with Bun that provides both REST API endpoints and MCP (Model Context Protocol) functionality over SSE (Server-Sent Events).
Architecture
This service combines traditional REST API functionality with MCP capabilities in a single TypeScript/Bun server (server.ts
). The MCP protocol, typically used for stdio communication between AI assistants and tools, is exposed through HTTP endpoints for remote access.
Key Components:
- Bun Runtime: Fast JavaScript/TypeScript runtime for server-side applications
- HTTP/HTTPS Server: Built-in Bun server with CORS support
- MCP Integration: Model Context Protocol tools exposed via SSE (Server-Sent Events)
- Systemd Integration: Production deployment with automatic restart and logging
Features
- HTTP and HTTPS support
- CORS enabled for all origins
- REST API endpoints
- MCP tools exposed via SSE transport
- Health check endpoint
- Systemd service integration
- TypeScript support
- Fast startup and low memory footprint
API Endpoints
Standard API
GET /hello
- Returns a JSON greeting messageGET /health
- Health check endpointGET /info
- Server capabilities and endpoints information
MCP-over-SSE API
GET /sse
- SSE endpoint for MCP connectionsPOST /messages?sessionId=XXX
- Send MCP protocol messages
Installation
Prerequisites
- Install Bun if not already installed:
- Clone the repository:
- Install dependencies:
Running the Server
Development Mode
Run directly from the current directory:
Production Deployment
1. Prepare the System
Create a dedicated user for the service:
2. Deploy to /opt
3. Install Systemd Service
4. Verify Deployment
Using the MCP Server
MCP Tools Available
The server provides the following MCP tool:
- hello - Returns a greeting message with optional name parameter
Connecting with Claude Desktop
To use this MCP server with Claude Desktop, see the detailed setup guide: CLAUDE_DESKTOP_SETUP.md
Quick configuration example:
This configuration uses npx
to run mcp-remote
, which acts as a proxy between Claude Desktop's stdio transport and remote SSE servers.
Alternative: Direct SSE Connection Test
Configuration
Environment Variables
PORT
- Server port (default: 3000)SSL_KEY_PATH
- Path to SSL private key file (for HTTPS)SSL_CERT_PATH
- Path to SSL certificate file (for HTTPS)NODE_ENV
- Environment mode (automatically set to "production" by systemd)
HTTPS Setup
- Generate self-signed certificates (for development):
- For production with systemd, place certificates in
/opt/hello-service/certs/
and update the service:
Add:
Service Management
Systemd Commands
Updating the Service
To deploy updates:
Testing
Quick Tests
Using HTTPie (if installed)
Troubleshooting
Service Won't Start
- Check logs for errors:
- Verify Bun is installed and accessible:
- Check file permissions:
- Test manually as service user:
Port Already in Use
If you see EADDRINUSE
error:
Dependencies Issues
Development Tools
The following tools are installed on the server for development and debugging:
- jq - Command-line JSON processor
- yq - Command-line YAML processor
- httpie - User-friendly HTTP client
- ripgrep (rg) - Fast text search
- bat - Cat clone with syntax highlighting
- fd - Fast file finder
- tree - Directory structure viewer
- htop - Interactive process viewer
- ncdu - Disk usage analyzer
Security Considerations
- The service runs as a dedicated non-privileged user (
hello-service
) - Systemd security settings restrict file system access
- CORS is enabled for all origins (adjust for production)
- Consider using a reverse proxy (nginx/caddy) for production
- Use proper SSL certificates from Let's Encrypt for production
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally and with systemd
- Submit a pull request
License
[Specify your license here]
This server cannot be installed
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 unified HTTP/HTTPS service that exposes Model Context Protocol (MCP) functionality over HTTP endpoints, allowing clients to list available tools and call them through a standardized API.
Related MCP Servers
- -securityAlicense-qualityAn MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.Last updated -8PythonMIT License
- -securityAlicense-qualityA server that translates Model Context Protocol (MCP) tool callings to traditional HTTP API requests, allowing existing HTTP APIs to be integrated into MCP territory through configurable mappings.Last updated -1PythonApache 2.0
- AsecurityFlicenseAqualityAn all-in-one Model Context Protocol (MCP) server that connects your coding AI to numerous databases, data warehouses, data pipelines, and cloud services, streamlining development workflow through seamless integrations.Last updated -2Python
- -securityFlicense-qualityA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.Last updated -Python