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

@contextvm/mcp-sdk

v1.28.0

Published

Lightweight stdio-focused Model Context Protocol SDK for TypeScript

Readme

@contextvm/mcp-sdk MIT licensed

Overview

@contextvm/mcp-sdk is a lightweight fork of the upstream MCP TypeScript SDK tailored for ContextVM and other local-process integrations that only need the MCP protocol core plus stdio transport.

This fork keeps the core protocol runtime and high-level client/server APIs while intentionally removing the HTTP, SSE, WebSocket, Express, Hono, and OAuth-oriented surfaces that added weight without helping the stdio use case.

It makes it easy to:

  • Create MCP servers that expose resources, prompts, and tools
  • Build MCP clients that can connect to local MCP servers
  • Use the retained stdio transport with a smaller dependency footprint

Fork Scope

Supported in this package:

Explicitly not included in this fork:

  • Streamable HTTP transport
  • Legacy SSE transport
  • Express and Hono integrations
  • OAuth/auth helper stack
  • Browser/web transport layers

Installation

npm install @contextvm/mcp-sdk zod

This SDK has a required peer dependency on zod for schema validation. The package internally imports from zod/v4, while remaining compatible with projects using Zod v3.25 or later.

Quick Start

import { McpServer } from '@contextvm/mcp-sdk/server';
import { StdioServerTransport } from '@contextvm/mcp-sdk/server/stdio';
import { z } from 'zod';

const server = new McpServer({
    name: 'example-server',
    version: '1.0.0'
});

server.tool('echo', { message: z.string() }, async ({ message }) => ({
    content: [{ type: 'text', text: message }]
}));

const transport = new StdioServerTransport();
await server.connect(transport);

Core Concepts

Servers and transports

An MCP server is typically created with McpServer and connected to StdioServerTransport for local, process-spawned integrations.

Tools, resources, prompts

  • Tools let LLMs ask your server to take actions (computation, side effects, network calls).
  • Resources expose read-only data that clients can surface to users or models.
  • Prompts are reusable templates that help users talk to models in a consistent way.

The retained server surface still includes tools, resources, prompts, completions, logging, elicitation, sampling, and experimental tasks.

Capabilities: sampling, elicitation, and tasks

The SDK includes higher-level capabilities for richer workflows:

  • Sampling: server-side tools can ask connected clients to run LLM completions.
  • Form elicitation: tools can request non-sensitive input via structured forms.
  • URL elicitation: servers can ask users to complete secure flows in a browser (e.g., API key entry, payments, OAuth).
  • Tasks (experimental): long-running tool calls can be turned into tasks that you poll or resume later.

These higher-level capabilities are preserved in the stdio-focused fork.

Clients

The high-level Client class connects to MCP servers over the retained StdioClientTransport and exposes helpers like listTools, callTool, listResources, readResource, listPrompts, and getPrompt.

Node.js compatibility

This fork targets Node.js 18+ and is optimized for local stdio-based integrations.

Package Exports

  • @contextvm/mcp-sdk
  • @contextvm/mcp-sdk/client
  • @contextvm/mcp-sdk/client/stdio
  • @contextvm/mcp-sdk/server
  • @contextvm/mcp-sdk/server/stdio
  • @contextvm/mcp-sdk/experimental
  • @contextvm/mcp-sdk/experimental/tasks

Publishing Notes

This package is intended to be published as a public npm package under the @contextvm/mcp-sdk name. The published tarball only includes dist output.

Documentation

Release Workflow

Build the publishable package with npm run build, inspect the tarball with npm pack --dry-run, and publish with npm publish --access public once the @contextvm/mcp-sdk scope is ready.

Contributing

Issues and pull requests are welcome on GitHub at https://github.com/ContextVM/mcp-sdk.

License

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