modelcontextprotocol / modelcontextprotocol/registry

server.json: no way to select a specific bin when an npm package exposes multiple executables

Open
#1,629 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
7.3k
Forks
994
Avg merge
4d 12h
Merged PRs (30d)
19

Description

Problem

server.json's npm package schema has no field for selecting which bin to invoke when a package exposes multiple entries in its package.json bin field. Clients following identifier + runtimeHint: "npx" will resolve to whichever bin matches the package name -- there's no way to point at a different, non-default bin.

Concrete example

Package sumlyzer publishes two bins:

"bin": {
  "sumlyzer": "bin/sumlyzer.mjs",
  "sumlyzer-mcp-server": "bin/sumlyzer-mcp-server.mjs"
}

sumlyzer-mcp-server is the actual MCP server; sumlyzer is an unrelated CLI. A server.json entry like:

{
  "registryType": "npm",
  "identifier": "sumlyzer",
  "version": "1.0.0",
  "runtimeHint": "npx",
  "transport": { "type": "stdio" }
}

resolves (via npx sumlyzer) to the wrong bin. The only working invocation is npx -p sumlyzer sumlyzer-mcp-server -- but that's an npx-level flag (-p), not something representable via packageArguments/runtimeArguments, since those only append arguments to the already-resolved command rather than influencing bin resolution itself.

I checked the Argument type (PositionalArgument / NamedArgument) in server.schema.json (2025-12-11) and neither has a field for this.

Question

Is this a known limitation? If so, would a dedicated field (e.g. bin on the npm package entry, or documented support for an -p-style runtime argument) be in scope, or is the intended workaround to always publish the MCP server as its own dedicated npm package (one bin per package)? Happy to open a PR if there's an agreed direction.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing server.schema.json, especially the PositionalArgument and NamedArgument types, alongside the packageArguments and runtimeArguments described in the issue. Compare those options with the npx -p sumlyzer sumlyzer-mcp-server invocation. Done means the project has an agreed schema or documented limitation for selecting a non-default npm bin.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, json
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.