
mcp server
一个简单的MCP服务器实现,支持WebSocket和REST API。
Repository Info
About This Server
一个简单的MCP服务器实现,支持WebSocket和REST API。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
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
-
Clone the repository:
git clone <repository-url> cd mcp-server -
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 statusPOST /api/echo- Echo the provided message- Request body:
{ "message": "Hello" } - Response:
{ "echo": "Hello" }
- Request body:
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.
Quick Start
Clone the repository
git clone https://github.com/kritsanan1/mcp-serverInstall dependencies
cd mcp-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.