MCP (Model Context Protocol) Server

by kritsanan1

279 downloads
Not rated
GitHub

Description

# MCP (Model Context Protocol) Server A simple MCP server implementation with WebSocket and REST API support. ## Features - WebSocket server for real-time communication - REST API endpoints - Static file serving - CORS support ## Getting Started ### Prerequisites - Node.js (v14…

About

# MCP (Model Context Protocol) Server A simple MCP server implementation with WebSocket and REST API support. ## Features - WebSocket server for real-time communication - REST API endpoints - Static file serving - CORS support ## Getting Started ### Prerequisites - Node.js (v14 or later) - npm (comes with Node.js) ###…

Details

Author
kritsanan1
Downloads
279
Categories
Other

- WebSocket server for real‑time communication
- REST API endpoints (status and echo)
- Static file serving
- CORS support

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP (Model Context Protocol) Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Node.js v14+, clone the repository, run npm install, then start with node server.js. The server runs on port 3000 by default; set the PORT environment variable to change the port.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp (model context protocol) server": {
            "mcp-server-kritsanan1": {
                "command": "node",
                "args": [
                    "server.js"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-kritsanan1": {
        "command": "node",
        "args": [
            "server.js"
        ]
    }
}

MCP (Model Context Protocol) Server

A simple MCP server implementation with WebSocket and REST API support.

Features

- WebSocket server for real-time communication
- REST API endpoints
- Static file serving
- CORS support

Getting Started

Prerequisites

- Node.js (v14 or later)
- npm (comes with Node.js)

Installation

1. Clone the repository:

   git clone <repository-url>
cd mcp-server

2. Install dependencies:

   npm install

Running the Server

Start the server with the following command:

node server.js

The server will start on port 3000 by default. You can change the port by setting the PORT environment variable.

API Endpoints

- GET / - Server status
- POST /api/echo - Echo the provided message
- Request body: { "message": "Hello" }
- Response: { "echo": "Hello" }

WebSocket

The WebSocket server runs on the same port as the HTTP server. Connect using:

ws://localhost:3000

Testing

Open your browser and navigate to:

http://localhost:3000

You'll find a test page where you can:
- Test WebSocket connections
- Send and receive messages
- Test the REST API

License

This project is open source and available under the MIT License.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.