npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lite-mcp-sdk

v0.1.5

Published

Light Weight Easy to useMCP SDK

Readme

Lite mcp sdk for javascript Introduction

npm badge compatibility badge License badge Contributor Covenant

For Anyone wants a little more low level control over the MCP protocol:

Lite mcp sdk for javascript is a lightweight mcp sdk remix with minimal dependencies.

🚀 Quick start

npm install lite-mcp-sdk

Server

const { Server, SSEServerTransport } = require("lite-mcp-sdk");

//or module import
import { Server, SSEServerTransport } from "lite-mcp-sdk";

//create a server
const server = new Server({
    port: 3000,
    transport: new SSEServerTransport(),
});


// 1. Define the server info
const server = new Server({
    name: "example-servers/puppeteer",
    version: "0.1.0",
}, {
    capabilities: {
        resources: {},
        tools: {},
    },
});

// 2. Define the request handlers
server.setRequestHandler("tools/call", async (request) => {
    const { name, arguments: args } = request.params;
    return handleToolCall(name, args);
});

//3. Define the transport
const transports = new Map();
const transport = new SSEServerTransport("/messages", res);
transports.set(clientId, transport);

//4. Connect the server to the transport
await server.connect(transport);

//5. Handle the post message
await transport.handlePostMessage(req, res);

Client

import { Client, SSEClientTransport } from "lite-mcp-sdk";

// 1. Define the client
let client = new Client( {
      name: "fastmcp-client",
      version: "0.1.0"
    }, {
      capabilities: {
        sampling: {},
        roots: {
          listChanged: true,
        },
      },
    } );

// 2. Init the client transport
const serverUrl = "http://localhost:3000"; // for example

const backendUrl = new URL(`${serverUrl}/sse`);
  
backendUrl.searchParams.append("transportType", "sse");

backendUrl.searchParams.append("url", `${serverUrl}/sse`);

const headers = {};

const clientTransport = new SSEClientTransport(backendUrl, {
    eventSourceInit: {
        fetch: (url, init) => fetch(url, { ...init, headers }),
    },
    requestInit: {
        headers,
    },
});

// 3. Connect the client to the transport
await client.connect(clientTransport);
const abortController = new AbortController();
let progressTokenRef = 0;

// 4. start the tool call
const name = "toolcall name";
const params = {}; // tool call params

const response = await client.request(
    {
          method: "tools/call",
          params: {
            name,
            arguments: params,
            _meta: {
              progressToken: progressTokenRef++,
            },
          },
    },
    {signal: abortController.signal,}
);

Project structure:

The project is clearly and cleanlyorganized into the following directories:

src
├── index.js
└── lib
    ├── client
    │   ├── client.js
    │   └── clientTransport.js
    ├── server
    │   ├── server.js
    │   └── serverTransport.js
    └── shared
        ├── helpers
        │   ├── constants.js
        │   └── util.js
        ├── protocol.js
        └── validators
            ├── capabilityValidators.js
            └── schemaValidators.js (IN CONSTRUCTION)

Why choose lite-mcp-sdk?

1. No fixed zod types

NO More zod types!!! zod types contributes to unneccessary complexity for easy setups.

Furthermore, the way zod type is used in the original sdk is rigid and not flexible, and it is an well received issue.

2. Fully SSE solution

Focus on SSE, and removed stdio support for simplicity considerations, since it is not a as univerial solution as SSE.

Suprisingly, the SSE solution is scarce on the internet, so I decided to write my own.

BELOW images shows that stdio support is always descripted, but no SSE support is mentioned. Even when you search deliberately for SSE, result is scarce, SEE for first page google results.

Replace codes like requestSchema.parse to fully customizable validators and hand it over to the user to define the validation logic here. e.g.

const validatedMessage = validator(message);

How timeout is used in original sdk is vague and has some redundant implementations,which are removed in lite mcp for not causing further confusion.(Ok I think they also removed these in latest version)

Key Difference Table

| Feature | mcp-official-sdk | lite-mcp-sdk | |---------|----------|-------------| | Validation | zod | Validators | | Transport | stdio or SSE | SSE only | | Language | typescript | javascript |

🗺️ Roadmap

  • [ ] Custom Validators (under construction)
  • [ ] Add dashboard for monitoring and managing the MCP server and client
  • [ ] Add ts types
  • [ ] Add python sdk
  • [ ] Add version compatibility handle for different versions of MCP

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Please read the contributing document.

📝 Licensing

This project is licensed under the MIT License. See the LICENSE file for details.

Inspired by Original anthropic sdk,which license is also included here.