Skip to content

Commit 18e6d27

Browse files
committed
chore: use binary, use named not positional arguments
1 parent 39d7918 commit 18e6d27

File tree

4 files changed

+107
-131
lines changed

4 files changed

+107
-131
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,14 @@ jobs:
104104
npm run generate:arguments
105105
106106
- name: Install MCP Publisher
107-
run: brew install mcp-publisher
107+
run: |
108+
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
108109
109110
- name: Login to MCP Registry
110-
run: mcp-publisher login github-oidc
111+
run: ./mcp-publisher login github-oidc
111112

112113
- name: Publish to MCP Registry
113-
run: mcp-publisher publish
114+
run: ./mcp-publisher publish
114115

115116
- name: Publish git release
116117
env:

scripts/generateArguments.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,18 @@ function generatePackageArguments(envVars: EnvironmentVariable[]): unknown[] {
148148
// Generate positional arguments from the same config options (only documented ones)
149149
const documentedVars = envVars.filter((v) => !v.description.startsWith("Configuration option:"));
150150

151-
for (const envVar of documentedVars) {
151+
// Generate named arguments from the same config options
152+
for (const argument of documentedVars) {
152153
const arg: Record<string, unknown> = {
153-
type: "positional",
154-
valueHint: envVar.configKey,
155-
description: envVar.description,
156-
isRequired: envVar.isRequired,
154+
type: "named",
155+
name: "--" + argument.configKey,
156+
description: argument.description,
157+
isRequired: argument.isRequired,
157158
};
158159

159160
// Add format if it's not string (string is the default)
160-
if (envVar.format !== "string") {
161-
arg.format = envVar.format;
161+
if (argument.format !== "string") {
162+
arg.format = argument.format;
162163
}
163164

164165
packageArguments.push(arg);
@@ -197,7 +198,7 @@ function updateServerJsonEnvVars(envVars: EnvironmentVariable[]): void {
197198
isSecret: v.isSecret,
198199
}));
199200

200-
// Generate package arguments (positional arguments in camelCase)
201+
// Generate package arguments (named arguments in camelCase)
201202
const packageArguments = generatePackageArguments(envVars);
202203

203204
// Update version at root level

0 commit comments

Comments
 (0)