@buzzposter/mcp 0.1.12 → 0.1.13

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 CHANGED
@@ -121,6 +121,9 @@ var BuzzPosterClient = class {
121
121
  async uploadFromUrl(data) {
122
122
  return this.request("POST", "/api/v1/media/upload-from-url", data);
123
123
  }
124
+ async uploadBase64(data) {
125
+ return this.request("POST", "/api/v1/media/upload-base64", data);
126
+ }
124
127
  async getUploadUrl(data) {
125
128
  return this.request("POST", "/api/v1/media/presign", data);
126
129
  }
@@ -1199,6 +1202,34 @@ function registerMediaTools(server2, client2) {
1199
1202
  };
1200
1203
  }
1201
1204
  );
1205
+ server2.tool(
1206
+ "upload_from_claude",
1207
+ "Upload an image that the user has dropped or pasted into Claude. When a user shares an image in the conversation, Claude can read it natively as base64. Pass the base64 data, filename, and content_type to upload it to the BuzzPoster media library and get a CDN URL back. Do NOT show the base64 data to the user -- just call this tool silently and return the CDN URL.",
1208
+ {
1209
+ data: z4.string().describe("Base64-encoded image data (no data URI prefix needed, just the raw base64 string)"),
1210
+ filename: z4.string().describe("Filename including extension (e.g. photo.jpg)"),
1211
+ content_type: z4.string().describe("MIME type (e.g. image/jpeg, image/png, image/webp, image/gif)"),
1212
+ folder: z4.string().optional().describe("Optional folder path within the customer's storage")
1213
+ },
1214
+ {
1215
+ title: "Upload Image from Claude",
1216
+ readOnlyHint: false,
1217
+ destructiveHint: false,
1218
+ idempotentHint: false,
1219
+ openWorldHint: false
1220
+ },
1221
+ async (args) => {
1222
+ const result = await client2.uploadBase64({
1223
+ data: args.data,
1224
+ filename: args.filename,
1225
+ content_type: args.content_type,
1226
+ folder: args.folder
1227
+ });
1228
+ return {
1229
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
1230
+ };
1231
+ }
1232
+ );
1202
1233
  server2.tool(
1203
1234
  "upload_from_url",
1204
1235
  "Upload media from a public URL. The server fetches the image/video and uploads it to storage. Returns a CDN URL that can be used in posts. Supports JPEG, PNG, GIF, WebP, MP4, MOV, WebM up to 25MB.",
package/dist/tools.d.ts CHANGED
@@ -31,6 +31,12 @@ declare class BuzzPosterClient {
31
31
  filename?: string;
32
32
  folder?: string;
33
33
  }): Promise<unknown>;
34
+ uploadBase64(data: {
35
+ data: string;
36
+ filename: string;
37
+ content_type: string;
38
+ folder?: string;
39
+ }): Promise<unknown>;
34
40
  getUploadUrl(data: {
35
41
  filename: string;
36
42
  content_type: string;
package/dist/tools.js CHANGED
@@ -115,6 +115,9 @@ var BuzzPosterClient = class {
115
115
  async uploadFromUrl(data) {
116
116
  return this.request("POST", "/api/v1/media/upload-from-url", data);
117
117
  }
118
+ async uploadBase64(data) {
119
+ return this.request("POST", "/api/v1/media/upload-base64", data);
120
+ }
118
121
  async getUploadUrl(data) {
119
122
  return this.request("POST", "/api/v1/media/presign", data);
120
123
  }
@@ -1193,6 +1196,34 @@ function registerMediaTools(server, client) {
1193
1196
  };
1194
1197
  }
1195
1198
  );
1199
+ server.tool(
1200
+ "upload_from_claude",
1201
+ "Upload an image that the user has dropped or pasted into Claude. When a user shares an image in the conversation, Claude can read it natively as base64. Pass the base64 data, filename, and content_type to upload it to the BuzzPoster media library and get a CDN URL back. Do NOT show the base64 data to the user -- just call this tool silently and return the CDN URL.",
1202
+ {
1203
+ data: z4.string().describe("Base64-encoded image data (no data URI prefix needed, just the raw base64 string)"),
1204
+ filename: z4.string().describe("Filename including extension (e.g. photo.jpg)"),
1205
+ content_type: z4.string().describe("MIME type (e.g. image/jpeg, image/png, image/webp, image/gif)"),
1206
+ folder: z4.string().optional().describe("Optional folder path within the customer's storage")
1207
+ },
1208
+ {
1209
+ title: "Upload Image from Claude",
1210
+ readOnlyHint: false,
1211
+ destructiveHint: false,
1212
+ idempotentHint: false,
1213
+ openWorldHint: false
1214
+ },
1215
+ async (args) => {
1216
+ const result = await client.uploadBase64({
1217
+ data: args.data,
1218
+ filename: args.filename,
1219
+ content_type: args.content_type,
1220
+ folder: args.folder
1221
+ });
1222
+ return {
1223
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
1224
+ };
1225
+ }
1226
+ );
1196
1227
  server.tool(
1197
1228
  "upload_from_url",
1198
1229
  "Upload media from a public URL. The server fetches the image/video and uploads it to storage. Returns a CDN URL that can be used in posts. Supports JPEG, PNG, GIF, WebP, MP4, MOV, WebM up to 25MB.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buzzposter/mcp",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "BuzzPoster MCP server - Social media, newsletters, and media hosting for Claude Desktop",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",