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

@postmcp/types

v0.1.37

Published

Unified TypeScript types and interfaces for the PostMCP ecosystem

Readme

@postmcp/types

PostMCP Shared Types - Unified TypeScript definitions and interfaces for the PostMCP ecosystem.

License: MIT TypeScript 5.7+ npm package


Overview

@postmcp/types contains shared type definitions, interfaces, and enums used across all PostMCP packages (@postmcp/core, @postmcp/cli, @postmcp/presets, and @postmcp/studio).


Installation

npm install -D @postmcp/types
# or
pnpm add -D @postmcp/types

Core Types Exported

1. AST & Operation Definitions

  • NormalizedSpec: The parsed OpenAPI representation containing title, version, servers, and operations.
  • NormalizedOperation: Standardized operation definition with JSON Schema input/response schemas and risk tier.
  • RiskTier: 'READ_ONLY' | 'MUTATION' | 'CRITICAL'.

2. Token Diet & Optimization

  • TokenDietOptions: Configuration for null pruning, field masking, and Markdown table conversion.
  • TokenDietResult: Output containing text, structured payload, token counts, and savings percentage.

3. Macro Pipelines

  • MacroDefinition: Composite multi-step tool definition.
  • MacroStep: Individual execution step in a macro workflow.

4. Configuration & CLI

  • PostMcpCliConfig: Structure of postmcp.config.json workspace configuration files.
  • RunCommandOptions: Options for postmcp run.
  • StudioCommandOptions: Options for postmcp studio.
  • GenerateCommandOptions: Options for postmcp generate.
  • ExportCommandOptions: Options for postmcp export.

Usage Example

import type { NormalizedSpec, RiskTier, TokenDietOptions } from '@postmcp/types';

function analyzeSafety(tier: RiskTier): boolean {
  return tier === 'READ_ONLY';
}

const options: TokenDietOptions = {
  convertToMarkdownTable: true,
  maxTokens: 2500,
};

License

MIT (c) PostMCP Contributors