What is the difference between STDIO and SSE transports in MCP?
STDIO is used for local/command-line integration, while SSE is designed for web-based or network communication. Both use JSON-RPC 2.0 for message formatting.
@cnych
基本信息
claude mcp sse demo with server and client(cli、web)
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-sse-demo": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector"
]
}
}
}工具列表暂未提供
当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。
点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。
This project demonstrates how to build an MCP (Model Context Protocol) server using SSE (Server-Sent Events) for communication. It implements an intelligent mall service assistant that exposes product, inventory, and order management tools via SSE transport, allowing clients (e.g., web or CLI) to interact with LLMs through JSON-RPC 2.0 messages.
Set up an Express server with endpoints /sse (SSE connection) and /messages (client message handling). Use SSEServerTransport from the MCP SDK to manage SSE connections. Start the server on port 8083 (configurable via PORT environment variable). For clients, use SSEClientTransport to connect to the SSE endpoint, then list tools and integrate with an LLM (e.g., Anthropic Claude) to handle user queries.
getProducts, getInventory, getOrders, purchase/health) and graceful shutdownSTDIO is used for local/command-line integration, while SSE is designed for web-based or network communication. Both use JSON-RPC 2.0 for message formatting.
Node.js, Express, `@modelcontextprotocol/sdk` (for MCP and SSE transports), `zod` (for schema validation), and `cors`. The project uses TypeScript and ES modules.
Data (products, inventory, orders) is stored in-memory using simulated arrays. It is not persisted to a database; for production use, a database-backed microservice should replace the in-memory store.
The implementation uses mock data and is intended for demonstration or educational purposes. It does not handle authentication, authorization, or large-scale concurrent connections beyond simple in-memory state.
The Express server includes CORS support (configurable via the `ALLOWED_ORIGINS` environment variable). The README does not mention authentication mechanisms; the provided code accepts requests without authentication.
YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Model Context Protocol Servers

Connect your AI assistant to your own YOUB endurance training account. Read recorded activities with full analysis, planned sessions, race goals, wellness (HRV, sleep, resting HR) and your athletic profile. Create or mov

Yuppsy MCP: build and publish real estate websites from your AI assistant. Yuppsy lets your AI assistant create live websites for real estate agents and individual property listings. You don't need a designer or any code
Open-source MCP to use Blender with any LLM
评论