Get the FREE Ultimate OpenClaw Setup Guide →

Lite_MCP_sdk

a light weight version of mcp sdk inspired by official model context protocol sdk, NOW focus on sse only no stdio

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio s2thend-lite_mcp_sdk node path/to/server.js \
  --env PORT="3000" \
  --env EXAMPLE_CONFIG="placeholder"

How to use

Lite MCP SDK for JavaScript provides a lightweight, SSE-based MCP server and a client kit to interact with it. The server exposes a simple “tools/call” endpoint to invoke named tools with argument payloads, and the client can list available tools and execute them remotely. A minimal example shows how to define tools (e.g., a calculate-bmi tool) and how clients can connect, request tool lists, and call tools. With the SDK, you can build your own remote MCP server that communicates over SSE, enabling low-overhead, event-driven interactions between clients and server-side tools. The client side demonstrates constructing a server client, connecting to the SSE endpoint, listing tools, and calling a specific tool with arguments, returning structured responses. This makes it suitable for scenarios where you want lightweight remote computation or agent-style tool invocation over SSE with minimal dependencies.

How to install

Prerequisites:

  • Node.js (16+ recommended) and npm
  • Optional: a runtime environment for your chosen server entry point (e.g., a custom server.js file)

Install the Lite MCP SDK package (and any peer dependencies you plan to use, like Express or CORS):

npm install lite-mcp-sdk
npm install express
npm install cors

Typical workflow (as shown in the repository):

  1. Create a Node.js server that uses the Lite MCP SDK Server and defines tools. For example, require the SDK, instantiate Server with a transport (e.g., SSEServerTransport), define tools, and start listening on a port.
  2. On the client side, require or import Client and SSEClientTransport, configure connection to http://localhost:3000 (or your chosen port), connect, list tools, and call a tool by name with arguments.
  3. Run your server file with Node:
node path/to/your-server.js

The repository includes concrete code samples for both server and client usage, demonstrating a BMI tool, the remote call flow, and the transport setup.

Additional notes

Notes and tips:

  • This repository emphasizes a SSE-based (Server-Sent Events) transport with no fixed zod types, focusing on lightweight validators and a simple, flexible protocol.
  • If you split server and client into separate processes, ensure CORS settings (if using Express) allow your client to connect from a browser or another origin.
  • The example tools are defined with a name, description, input schema, and an async handler. You can replace or extend these with your own tool implementations.
  • Common pitfalls: ensure the server port is open and not blocked by firewalls; confirm the SSE endpoints (/messages for transport setup and /sse for client connection as shown in examples) are accessible; verify that your client transports are initialized with the correct URLs and headers.
  • Environment variables can be used to configure PORT, host, or any runtime-specific options; document and reference them in your deployment config.

Related MCP Servers

Sponsor this space

Reach thousands of developers