AntonGrushkin/mcp-server-node
If you are the rightful owner of mcp-server-node and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project is an MCP server that provides an interactive Hello World widget and can be integrated with ChatGPT.
Hello World MCP Server
Description
This project is an MCP (Model Context Protocol) server that provides an interactive Hello World widget. The application can be run as a standalone server or integrated with ChatGPT through the MCP protocol.
Key Features
- 🚀 MCP server on Express with SSE (Server-Sent Events) support
- 🎨 Web interface
- 📦 Frontend build via Webpack
- 🔌 Integration with OpenAI/ChatGPT through MCP protocol
Project Structure
mcp-server-node/
├── dist/ # Built files (generated during build)
├── src/ # Source files
│ ├── index.js # Entry point
│ ├── script.js # Widget logic
│ └── style.css # Styles
├── server.js # Express server with MCP
├── webpack.config.js # Webpack configuration
└── package.json # Dependencies and scripts
Installation and Running
- Install dependencies:
npm install
- Create a
.envfile in the project root and set theBASE_URLenvironment variable:
BASE_URL=https://your-domain.com
⚠️ Important: The BASE_URL environment variable is required for proper static asset building. This URL is used by Webpack to generate correct paths for JavaScript and CSS files in the built HTML. Without it, the widget in ChatGPT will not be able to load its scripts and styles correctly.
For example, if you're using ngrok to expose your local server:
BASE_URL=https://your-ngrok-url.ngrok-free.app
- Build the project:
npm run build
- Start the server:
npm run serve
Server will be available at: http://localhost:3000
Connecting to ChatGPT
Note: ChatGPT requires HTTPS for MCP connections, so http://localhost:3000 will not work directly. To connect your local MCP server to ChatGPT, you can use ngrok to create an HTTPS tunnel to your local server.
API Endpoints
GET /mcp- SSE endpoint for connecting MCP clientsPOST /mcp/messages?sessionId=...- Endpoint for sending MCP messagesGET /health- Health check endpointGET /.well-known/*- OpenID/OAuth configuration
Tools
show_hello_world- Show interactive Hello World interface
Technologies
- Node.js - Runtime environment
- Express - Web server
- @modelcontextprotocol/sdk - MCP SDK for Node.js
- Webpack - Module bundler
- HTML/CSS/JavaScript - Frontend
License
MIT
Author
Project created as an example of MCP server integration with OpenAI/ChatGPT.