apiblaze 0.21.76 → 0.21.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +22 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__
|
|
|
34
34
|
var version;
|
|
35
35
|
var init_package = __esm({
|
|
36
36
|
"package.json"() {
|
|
37
|
-
version = "0.21.
|
|
37
|
+
version = "0.21.77";
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -6950,6 +6950,7 @@ Create an ${B.thing}
|
|
|
6950
6950
|
const devPortal = result.devPortal ? stripTenantFromPortal(result.devPortal) : void 0;
|
|
6951
6951
|
const tenant = result.tenant ?? chosenTenant ?? tenantFromPortal(result.devPortal);
|
|
6952
6952
|
if (!tenant) fail4("The server did not report which tenant this proxy belongs to \u2014 cannot build its MCP address. Re-run, or report this.");
|
|
6953
|
+
if (!opts.json) printCreatedLinks({ name, version: version2, env: "dev", tenant, anon: false, teamId, listing: !!opts.directoryReady });
|
|
6953
6954
|
rememberForApichat({
|
|
6954
6955
|
projectId: result.project_id ?? name,
|
|
6955
6956
|
target: opts.target || opts.openapi || name,
|
|
@@ -7008,6 +7009,12 @@ Create an ${B.thing}
|
|
|
7008
7009
|
});
|
|
7009
7010
|
if (directory) printDirectoryOutcome(directory);
|
|
7010
7011
|
}
|
|
7012
|
+
function printCreatedLinks(o) {
|
|
7013
|
+
console.log(` ${import_chalk20.default.dim("MCP server:")} ${import_chalk20.default.bold(mcpUrl(o.name, o.version, o.env, { tenant: o.tenant, anon: o.anon }))}`);
|
|
7014
|
+
if (BRAND !== "mcpblaze" && !o.listing) return;
|
|
7015
|
+
const page = pageLinkOf(null, { projectId: o.name, apiVersion: o.version, teamId: o.teamId });
|
|
7016
|
+
console.log(` ${import_chalk20.default.dim("Scorecard: ")} ${import_chalk20.default.cyan(page)}${o.anon ? import_chalk20.default.dim(` (opens once you sign in: npx ${B.cli} login)`) : ""}`);
|
|
7017
|
+
}
|
|
7011
7018
|
async function applyCreateToggles(name, opts) {
|
|
7012
7019
|
if (!opts.identified && !opts.iam) return;
|
|
7013
7020
|
const { runIamToggle: runIamToggle2, runIdentifiedToggle: runIdentifiedToggle2 } = await Promise.resolve().then(() => (init_iam(), iam_exports));
|
|
@@ -7210,6 +7217,7 @@ Create an ${B.thing}`));
|
|
|
7210
7217
|
if (!tenant) fail4("The server did not report which tenant this proxy belongs to \u2014 cannot build its MCP address. Re-run, or report this.");
|
|
7211
7218
|
const secure = result.secure ?? void 0;
|
|
7212
7219
|
const anonProjectId = result.project_id ?? name ?? "";
|
|
7220
|
+
if (anonProjectId && !opts.json) printCreatedLinks({ name: anonProjectId, version: version2, env: "prod", tenant, anon: true, teamId: result.team_id, listing: !!opts.directoryReady });
|
|
7213
7221
|
if (anonProjectId) {
|
|
7214
7222
|
rememberForApichat({
|
|
7215
7223
|
projectId: anonProjectId,
|
|
@@ -15367,7 +15375,8 @@ Most people new to it do not know the words tenant, OpenAPI or header, so plain
|
|
|
15367
15375
|
## The two things to offer
|
|
15368
15376
|
|
|
15369
15377
|
1. **"Want me to make an MCP server from this API?"** \u2014 the API is deployed: \`${run2} create --target <its OpenAPI spec or URL>\`
|
|
15370
|
-
(sign-in and per-user rules come with it; it prints the MCP
|
|
15378
|
+
(sign-in and per-user rules come with it; it prints the MCP server and Scorecard links right after the create:
|
|
15379
|
+
give them to the user at once, before anything else). The app runs on this machine:
|
|
15371
15380
|
\`${run2} dev --port <port>\`, as its own detached process. The next step to offer for this folder: ${question}
|
|
15372
15381
|
2. **"Want it listed in Claude or ChatGPT?"** \u2014 right after the MCP server exists, \`${run2} connector <name>\`
|
|
15373
15382
|
(\`--compliant chatgpt\` for ChatGPT, \`--compliant all\` both). Its first line is the page link: give it to the user
|
|
@@ -15420,6 +15429,13 @@ function shipMcpMarkdown() {
|
|
|
15420
15429
|
const run2 = "npx mcpblaze@latest";
|
|
15421
15430
|
return withLatest(`# An MCP server for their API, with MCPblaze
|
|
15422
15431
|
|
|
15432
|
+
**Links first.** \`create\`, \`create --compliant\` and \`connector <spec>\` print two lines the moment the MCP server exists:
|
|
15433
|
+
"MCP server: \u2026" and "Scorecard: \u2026" (the page with every step of the listing). Give both to the user in the chat right
|
|
15434
|
+
then, before the rest of the run finishes and before any other step. **A deployed API (a URL, or the URL of its spec):
|
|
15435
|
+
make it first** (step 4) with the automatic tools, so the links come within a minute; steps 1\u20133 then tune what it made
|
|
15436
|
+
(\`mcp ops hide|show|set\`, \`mcp instructions set\`) instead of coming before it. Only an app that runs on this machine,
|
|
15437
|
+
or an API with no spec anyone can fetch, goes through steps 1\u20133 first.
|
|
15438
|
+
|
|
15423
15439
|
1. **Read what is here.** The route files (every path and method, what each handler does, the id each POST returns), an
|
|
15424
15440
|
existing \`openapi.yaml\` / \`openapi.json\` / spec route, env files, how the app is protected today (a header, a session,
|
|
15425
15441
|
nothing). The code is the best source there is: it says what each route does better than any spec.
|
|
@@ -15431,7 +15447,8 @@ function shipMcpMarkdown() {
|
|
|
15431
15447
|
Explain your choices and show the first-pass draft catalogue before anything is written.
|
|
15432
15448
|
3. **The spec, if there is none.** Write \`./openapi.yaml\` for the operations the design kept, with the descriptions already
|
|
15433
15449
|
written (operation \`summary\` = the tool title, \`description\` = the tool description). Nothing else goes in.
|
|
15434
|
-
4. **Make it.** Deployed: \`${run2} create --target <spec or URL>\` (add \`--compliant\` now if a listing is the goal
|
|
15450
|
+
4. **Make it.** Deployed: \`${run2} create --target <spec or URL>\` (add \`--compliant\` now if a listing is the goal,
|
|
15451
|
+
\`--compliant all\` for Claude and ChatGPT); relay its MCP server and Scorecard lines as soon as they print.
|
|
15435
15452
|
On this machine: \`${run2} dev --port <port> --openapi ./openapi.yaml\` as its own detached process
|
|
15436
15453
|
(\`nohup ${run2} dev \u2026 > mcpblaze-dev.log 2>&1 < /dev/null &\`); the log says "is live on the internet" after
|
|
15437
15454
|
about 20 seconds. Either prints the MCP address and saves the key to \`.env.local\` itself; never show a key in the chat.
|
|
@@ -15445,8 +15462,8 @@ function shipMcpMarkdown() {
|
|
|
15445
15462
|
who can override: the dashboard, Tenant \u2192 Admins.
|
|
15446
15463
|
7. **Try it from Claude Code.** \`claude mcp add --transport http <name> <the MCP address it printed>\`, then \`/mcp\` and
|
|
15447
15464
|
sign in; call one tool. What a reviewer does, before a reviewer does it.
|
|
15448
|
-
8. **List it.** \`${run2} connector <name>\` (Claude; \`--compliant chatgpt\` or \`all\` for OpenAI's directory)
|
|
15449
|
-
the page link
|
|
15465
|
+
8. **List it.** \`${run2} connector <name>\` (Claude; \`--compliant chatgpt\` or \`all\` for OpenAI's directory), unless the
|
|
15466
|
+
create already ran with \`--compliant\`. Give the user the page link first, then follow \`${run2} skills connector\`: the MCP address (one CNAME; relay the exact record),
|
|
15450
15467
|
sign-in and the test account, the listing and the review-team answers that you write by its rules, the tests (one
|
|
15451
15468
|
\`claude -p\` per use case, from \`--status\`), and the packet. It needs the hosted app, not a tunnel. Stop any time;
|
|
15452
15469
|
\`${run2} connector <name> --status\` says what is left. The user submits the packet to Anthropic or OpenAI themselves.
|