
mcp node sse reference
使用原生 Node.js 实现的简单 MCP 服务器,专注于 Server-Sent Events。
Repository Info
About This Server
使用原生 Node.js 实现的简单 MCP 服务器,专注于 Server-Sent Events。
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 Node SSE Reference Implementation
A simple Model Context Protocol (MCP) server implementation using bare Node.js.
Overview
This project implements an MCP server using native Node.js HTTP capabilities. We chose Node.js over frameworks like Fastify, Express, or Bun.js because they have less straightforward support for Server-Sent Events (SSE).
All MCP-specific components are located in the mcp folder, following the protocol specification.
Try adding tools. Haven't tested it on resources and prompts yet.
Running the Server
npm install
npm run dev
Testing with MCP Inspector
You can use the MCP Inspector to test this implementation:
npx @modelcontextprotocol/inspector node server.js
This will:
- Start your MCP server
- Open a debugging UI (default port 5173)
- Create a proxy server (default port 3000)
MCP Example Screenshots
!MCP Inspector Interface MCP Inspector interface showing available tools like echo and calculator
!Calculator Tool in Action Using the calculator tool to solve addition problems
!MCP Server Configuration *MCP Servers Cursor config
Authentication
The sdk requires credential headers to be passed even if they are empty. Authentication headers are handled by the CORS setup (see src/utils/cors.ts).
Zod
The SDK seems to require zod for validating tool schema
SDK Integration
This implementation uses the MCP TypeScript SDK
License
MIT
Quick Start
Clone the repository
git clone https://github.com/rodocite/mcp-node-sse-referenceInstall dependencies
cd mcp-node-sse-reference
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.