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

mcp-types

v1.0.2

Published

Zod schemas and static TypeScript types for Model Context Protocol (MCP) SDK.

Readme

MCP Types

Zod schemas and static TypeScript types for Model Context Protocol (MCP) SDK.

Usage

Import types as you would from @modelcontextprotocol/sdk/types.js:

import type { Prompt, Tool, Resource } from "mcp-types";

Zod schemas are also available:

import { PromptSchema, ToolSchema, ResourceSchema } from "mcp-types";

Migrating

Replace all imports from '@modelcontextprotocol/sdk/types.js' to 'mcp-types' with mcp-types, e.g.,

- import type { Prompt, Tool, Resource } from "@modelcontextprotocol/sdk/types.js";
+ import type { Prompt, Tool, Resource } from "mcp-types";
- import { PromptSchema, ToolSchema, ResourceSchema } from "@modelcontextprotocol/sdk/types.js";
+ import { PromptSchema, ToolSchema, ResourceSchema } from "mcp-types";

That's it!

Key Differences

The exported schemas and types are identical to the ones available from @modelcontextprotocol/sdk, except for the following differences:

  • mcp-types removes passthrough() from all Zod schemas.
  • mcp-types uses the zod-to-typescript library to generate static types.

Motivation

The main difference and motivation behind creating this repository is that the original Zod schemas excessively use the passthrough() Zod feature (#182), which effectively allows arbitrary properties to pass through. This creates both an unsafe environment (since arbitrary properties will be passed through) and degrades the Developer Experience because you won't get type errors if you accidentally make a typo.

To fix this, mcp-types effectively copied schema definitions from the original repository and removed passthrough() from all schema definitions. Furthermore, we've used the zod-to-typescript library to generate static types which are much easier to work with since your type inference will show you clean, readable types.

Last Compatible Commit

The contents of the repository are based on the following version of MCP:

Contributing

To contribute an update:

  1. copy the contents of the types.ts from the original repository
  2. override Zod schemas in src/schemas.ts with the copied contents
  3. run pnpm run format to fix linting errors
  4. run pnpm run generate to generate the types
  5. Update the Last Compatible Commit section in this README.md

That's it!