mcpField
M
MCP (Model Context Protocol) Server

MCP (Model Context Protocol) Server

Local
github.com/kritsanan1Developer Tools0Updated 74w ago

About MCP (Model Context Protocol) Server

A Node.js MCP server implementation for developers building real-time and HTTP services. It combines WebSocket communication with REST endpoints and static file serving.

Key features

  1. 01WebSocket communication
  2. 02REST API endpoints
  3. 03Static file serving
  4. 04CORS support

Use cases

  1. 01Testing WebSocket messages in a browser
  2. 02Echoing messages through the REST API

MCP support

It is an MCP server implementation. Its documented interfaces include WebSocket communication and REST API endpoints.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.