Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 29, 2025

The publisher create command now automatically sets the runtime_hint field in the generated server.json based on the registry_name when no explicit --runtime-hint is provided:

  • When registry_name is docker, sets runtime_hint to docker
  • When registry_name is npm, sets runtime_hint to npx
  • Other registries remain unchanged (no runtime_hint field)

Before

# NPM registry - no runtime_hint field generated
$ mcp-publisher create --name "test-server" --description "Test" --repo-url "https://github.com/test/repo" --registry npm
{
  "packages": [
    {
      "registry_name": "npm",
      "name": "test-server",
      "version": "1.0.0"
    }
  ]
}

After

# NPM registry - automatically sets runtime_hint to "npx"
$ mcp-publisher create --name "test-server" --description "Test" --repo-url "https://github.com/test/repo" --registry npm
{
  "packages": [
    {
      "registry_name": "npm",
      "name": "test-server",
      "version": "1.0.0",
      "runtime_hint": "npx"
    }
  ]
}

The manual --runtime-hint flag continues to work and takes precedence over the automatic setting, ensuring backward compatibility.

Fixes #204.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: toby <83556+toby@users.noreply.github.com>
Copilot AI changed the title [WIP] Add runtime_hint to publisher create Add automatic runtime_hint setting to publisher create command Jul 29, 2025
Copilot AI requested a review from toby July 29, 2025 15:39
Copilot finished work on behalf of toby July 29, 2025 15:39
@toby toby marked this pull request as ready for review July 29, 2025 15:49
@toby toby merged commit 651c8df into main Jul 29, 2025
9 checks passed
@toby toby deleted the copilot/fix-204 branch July 29, 2025 15:51
domdomegg pushed a commit that referenced this pull request Aug 7, 2025
The `publisher create` command now automatically sets the `runtime_hint`
field in the generated `server.json` based on the `registry_name` when
no explicit `--runtime-hint` is provided:

- When `registry_name` is `docker`, sets `runtime_hint` to `docker`
- When `registry_name` is `npm`, sets `runtime_hint` to `npx`
- Other registries remain unchanged (no `runtime_hint` field)

## Before
```bash
# NPM registry - no runtime_hint field generated
$ mcp-publisher create --name "test-server" --description "Test" --repo-url "https://github.com/test/repo" --registry npm
```

```json
{
  "packages": [
    {
      "registry_name": "npm",
      "name": "test-server",
      "version": "1.0.0"
    }
  ]
}
```

## After
```bash
# NPM registry - automatically sets runtime_hint to "npx"
$ mcp-publisher create --name "test-server" --description "Test" --repo-url "https://github.com/test/repo" --registry npm
```

```json
{
  "packages": [
    {
      "registry_name": "npm",
      "name": "test-server",
      "version": "1.0.0",
      "runtime_hint": "npx"
    }
  ]
}
```

The manual `--runtime-hint` flag continues to work and takes precedence
over the automatic setting, ensuring backward compatibility.

Fixes #204.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: toby <83556+toby@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add runtime_hint to publisher create

4 participants