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

@boperators/mcp-server

v0.3.0

Published

MCP server for boperators - gives AI assistants access to operator overload information.

Readme

@boperators/mcp-server

Sym.JS logo

An MCP (Model Context Protocol) server that gives AI assistants access to operator overload information in a boperators project. Useful when asking an AI to read, write, or debug operator overloads — the server lets it inspect what overloads are defined, preview transformations, generate boilerplate, and validate definitions without having to read every source file manually.

The server communicates over stdio and is launched on demand by the AI client.

Installation

npm install -D @boperators/mcp-server
# or
bun add -D @boperators/mcp-server

boperators and a compatible TypeScript must also be present as peer dependencies.

Tools

| Tool | Description | Requires tsconfig | |------|-------------|:-------------------:| | list_overloads | List all registered overloads in the project, with optional filtering by class or operator | ✓ | | transform_preview | Preview the transformed output for a file or a line range within it | ✓ | | scaffold_overloads | Generate method boilerplate for a set of operators on a named class | — | | validate_overloads | Validate overload definitions in a single file and return structured diagnostics | ✓ | | explain_expression | Reverse-engineer a transformed call expression back to its original operator and overload metadata | optional |

list_overloads

Returns every overload registered in the project — class name, operator, parameter types, return convention, and source file. Accepts optional className and operator filters to narrow results.

Inputs

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | tsconfig | string | ✓ | Absolute path to tsconfig.json | | className | string | — | Filter to a specific class, e.g. "Vector3" | | operator | string | — | Filter to a specific operator, e.g. "+" |


transform_preview

Transforms a file and returns the original and transformed text side by side, along with a count of how many operator expressions were rewritten. When startLine/endLine are given, only that slice is returned — useful for keeping token usage low on large files.

Inputs

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | tsconfig | string | ✓ | Absolute path to tsconfig.json | | filePath | string | ✓ | Absolute path to the .ts file to transform | | startLine | number | — | First line to include (1-based, inclusive) | | endLine | number | — | Last line to include (1-based, inclusive) |


scaffold_overloads

Generates ready-to-paste TypeScript method declarations for a list of operators on a given class. Automatically uses the correct form for each operator:

  • Static binary (+, -, *, …) — static "+"(a: T, b: T): T { … }
  • Comparison (>, ==, …) — static, returns boolean
  • Instance compound (+=, -=, …) — instance, "+="(rhs: T): void { … }
  • Prefix unary (!, ~) — static, one parameter
  • Postfix unary (++, --) — instance, no parameters, returns void

Does not require a tsconfig — it is purely generative.

Inputs

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | className | string | ✓ | The class to generate overloads for | | operators | string[] | ✓ | Operator strings, e.g. ["+", "-", "*", "+="] |


validate_overloads

Runs the boperators scanning pipeline against a single file in isolation and returns structured diagnostics without modifying any state. Reports:

  • Errors — wrong arity, return type violations
  • Warnings — duplicate/conflicting overload registrations
  • The count of successfully parsed overloads

Inputs

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | tsconfig | string | ✓ | Absolute path to tsconfig.json | | filePath | string | ✓ | Absolute path to the .ts file to validate |


explain_expression

Given a transformed boperators expression (e.g. Vector3["+"](a, b) or v["+="](rhs) or v["++"]( )), decodes it back to the original operator, identifies whether it is static/instance and binary/unary, and optionally enriches the result with metadata from the project's overload store.

Inputs

| Parameter | Type | Required | Description | |-----------|------|:--------:|-------------| | expression | string | ✓ | The transformed call expression to explain | | tsconfig | string | — | Absolute path to tsconfig.json; enables richer metadata |


Setup

Claude

For Claude Desktop:

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

For Claude Code:

Add to .mcp.json at the root of your project (checked in, shared with the team) or via ~/.claude/settings.json for a user-level install:

{
  "mcpServers": {
    "boperators": {
      "command": "npx",
      "args": ["--yes", "@boperators/mcp-server@latest"]
    }
  }
}

GitHub Copilot (VS Code)

Add to .vscode/mcp.json in your workspace,

{
  "servers": {
    "boperators": {
      "command": "npx",
      "args": ["--yes", "@boperators/mcp-server@latest"]
    }
  }
}

Or add it directly to your VS Code settings.json:

{
  "mcp.servers": {
    "boperators": {
      "command": "npx",
      "args": ["--yes", "@boperators/mcp-server@latest"]
    }
  }
}

Enable the server in the Copilot Chat panel by clicking MCP Servers → boperators.

License

MIT