Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 58 additions & 66 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: false
mcp-typescript:
version: 0.5.0
version: 0.6.0
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
speakeasyVersion: 1.761.10
speakeasyVersion: 1.789.1
sources:
CloudinarySMD-MCP-OAS:
sourceNamespace: cloudinary-structured-metadata-mcp-oas
sourceRevisionDigest: sha256:85c63199be6e15b3d6b3d16a16e2c33690a4dc147f2e48dc453b20a5fbf5ec43
sourceBlobDigest: sha256:eb5e17fde26cf563d32221dfa8dc025a27f13caf100005f1871c0891263f45e8
sourceRevisionDigest: sha256:100a218d96e6f4ff65d669e52b204abb0a157e75a948a8aa4e0c432b70c435bc
sourceBlobDigest: sha256:2090fcbd214524692bd0f0ae9e58a46541d739dbc63f17c5fba6b4bd357fbd37
tags:
- latest
- 0.5.0
- 0.5.5
targets:
cloudinary-structured-metadata-mcp:
source: CloudinarySMD-MCP-OAS
sourceNamespace: cloudinary-structured-metadata-mcp-oas
sourceRevisionDigest: sha256:85c63199be6e15b3d6b3d16a16e2c33690a4dc147f2e48dc453b20a5fbf5ec43
sourceBlobDigest: sha256:eb5e17fde26cf563d32221dfa8dc025a27f13caf100005f1871c0891263f45e8
sourceRevisionDigest: sha256:100a218d96e6f4ff65d669e52b204abb0a157e75a948a8aa4e0c432b70c435bc
sourceBlobDigest: sha256:2090fcbd214524692bd0f0ae9e58a46541d739dbc63f17c5fba6b4bd357fbd37
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<details>
<summary>Claude Desktop</summary>

Install the MCP server as a Desktop Extension using the pre-built [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.0/mcp-server.mcpb) file:
Install the MCP server as a Desktop Extension using the pre-built [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.6.0/mcp-server.mcpb) file:

Simply drag and drop the [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.0/mcp-server.mcpb) file onto Claude Desktop to install the extension.
Simply drag and drop the [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.6.0/mcp-server.mcpb) file onto Claude Desktop to install the extension.

The MCP bundle package includes the MCP server and all necessary configuration. Once installed, the server will be available without additional setup.

Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ Based on:
- OpenAPI Doc
- Speakeasy CLI 1.761.10 (2.881.16) https://github.com/speakeasy-api/speakeasy
### Generated
- [mcp-typescript v0.5.0] .
- [mcp-typescript v0.5.0] .

## 2026-07-10 00:23:19
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.789.1 (2.916.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [mcp-typescript v0.6.0] .
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"type": "string"
}
},
"version": "0.5.0",
"version": "0.6.0",
"tools": [
{
"name": "create-metadata-field",
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudinary/structured-metadata-mcp",
"version": "0.5.0",
"version": "0.6.0",
"author": "Cloudinary",
"type": "module",
"sideEffects": false,
Expand All @@ -26,7 +26,9 @@
"zod": "^4.0.0"
},
"overrides": {
"@modelcontextprotocol/sdk": "1.26.0"
"@modelcontextprotocol/sdk": "1.26.0",
"hono": ">=4.12.25",
"fast-uri": ">=3.1.2"
},
"devDependencies": {
"@anthropic-ai/mcpb": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/landing-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "
<h1>Instructions</h1>
<p>One-click installation for Claude Desktop users</p>
<div class="instruction-item">
<a href="https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.0/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
<a href="https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.6.0/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
πŸ“₯ Download MCP Bundle
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {

export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.5.0",
sdkVersion: "0.5.0",
genVersion: "2.881.16",
openapiDocVersion: "0.5.5",
sdkVersion: "0.6.0",
genVersion: "2.916.4",
userAgent:
"speakeasy-sdk/mcp-typescript 0.5.0 2.881.16 0.5.0 @cloudinary/structured-metadata-mcp",
"speakeasy-sdk/mcp-typescript 0.6.0 2.916.4 0.5.5 @cloudinary/structured-metadata-mcp",
} as const;
53 changes: 0 additions & 53 deletions src/lib/dlv.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/encodings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { bytesToBase64 } from "./base64.js";
import { isPlainObject } from "./is-plain-object.js";
import { isPlainObject } from "./primitives.js";

export class EncodingError extends Error {
constructor(message: string) {
Expand Down
9 changes: 6 additions & 3 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import { dlv } from "./dlv.js";

import * as z from "zod";
import { SDKOptions } from "./config.js";

Expand Down Expand Up @@ -39,8 +37,13 @@ export function env(): Env {
return envMemo;
}

const globals = globalThis as {
process?: { env?: Record<string, string | undefined> };
Deno?: { env?: { toObject?: () => Record<string, string | undefined> } };
};

envMemo = envSchema.parse(
dlv(globalThis, "process.env") ?? dlv(globalThis, "Deno.env") ?? {},
globals.process?.env ?? globals.Deno?.env?.toObject?.() ?? {},
);
return envMemo;
}
Expand Down
4 changes: 3 additions & 1 deletion src/lib/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ export class HTTPClient {
private requestHooks: BeforeRequestHook[] = [];
private requestErrorHooks: RequestErrorHook[] = [];
private responseHooks: ResponseHook[] = [];
private options: HTTPClientOptions;

constructor(private options: HTTPClientOptions = {}) {
constructor(options: HTTPClientOptions = {}) {
this.options = options;
this.fetcher = options.fetcher || DEFAULT_FETCHER;
}

Expand Down
43 changes: 0 additions & 43 deletions src/lib/is-plain-object.ts

This file was deleted.

16 changes: 16 additions & 0 deletions src/lib/primitives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,19 @@ export function invariant(
throw new InvariantError(message);
}
}

export function isPlainObject(
value: unknown,
): value is Record<string, unknown> {
if (value === null || typeof value !== "object") return false;
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
const proto = Object.getPrototypeOf(value);
if (proto === null || proto === Object.prototype) return true;
// cross-realm plain objects (vm contexts, iframes) inherit from a
// different realm's Object.prototype, which itself has a null prototype
try {
return Object.getPrototypeOf(proto) === null;
} catch {
return false;
}
}
8 changes: 8 additions & 0 deletions src/lib/retries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ async function retryBackoff(
}

function retryIntervalFromResponse(res: Response): number {
const retryAfterMsVal = res.headers.get("retry-after-ms");
if (retryAfterMsVal) {
const parsedMs = Number(retryAfterMsVal);
if (Number.isFinite(parsedMs) && parsedMs >= 0) {
return parsedMs;
}
}

const retryVal = res.headers.get("retry-after") || "";
if (!retryVal) {
return 0;
Expand Down
15 changes: 10 additions & 5 deletions src/lib/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ type OAuth2PasswordFlow = {
tokenURL: string;
};

export enum SecurityErrorCode {
Incomplete = "incomplete",
UnrecognisedSecurityType = "unrecognized_security_type",
}
export const SecurityErrorCode = {
Incomplete: "incomplete",
UnrecognisedSecurityType: "unrecognized_security_type",
} as const;
export type SecurityErrorCode =
(typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];

export class SecurityError extends Error {
public code: SecurityErrorCode;

constructor(
public code: SecurityErrorCode,
code: SecurityErrorCode,
message: string,
) {
super(message);
this.code = code;
this.name = "SecurityError";
}

Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const routes = buildRouteMap({
export const app = buildApplication(routes, {
name: "mcp",
versionInfo: {
currentVersion: "0.5.0",
currentVersion: "0.6.0",
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function createMCPServer(deps: {
}) {
const server = new McpServer({
name: "CloudinarySMD",
version: "0.5.0",
version: "0.6.0",
});

const getClient = deps.getSDK || (() =>
Expand Down
2 changes: 2 additions & 0 deletions src/mcp-server/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ export function registerDynamicTools(
if (def.args) {
const jsonSchema = z.toJSONSchema(z.object(def.args), {
target: "draft-2020-12",
io: "input",
unrepresentable: "any",
});
schemaText += JSON.stringify(jsonSchema, null, 2);
} else {
Expand Down
Loading