social-mcp 2.5.0 → 2.7.0
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/README.md +64 -28
- package/dist/index.js +37 -29
- package/dist/index.js.map +1 -1
- package/dist/lib/http.d.ts +5 -1
- package/dist/lib/http.js.map +1 -1
- package/dist/lib/proxy.d.ts +4 -0
- package/dist/lib/proxy.js +13 -0
- package/dist/lib/proxy.js.map +1 -0
- package/dist/services/bluesky-service.d.ts +7 -1
- package/dist/services/bluesky-service.js +17 -2
- package/dist/services/bluesky-service.js.map +1 -1
- package/dist/services/discord-service.d.ts +24 -1
- package/dist/services/discord-service.js +46 -5
- package/dist/services/discord-service.js.map +1 -1
- package/dist/services/facebook-service.d.ts +17 -1
- package/dist/services/facebook-service.js +63 -5
- package/dist/services/facebook-service.js.map +1 -1
- package/dist/services/ghost-service.d.ts +4 -1
- package/dist/services/ghost-service.js +55 -9
- package/dist/services/ghost-service.js.map +1 -1
- package/dist/services/instagram-service.d.ts +6 -1
- package/dist/services/instagram-service.js +40 -3
- package/dist/services/instagram-service.js.map +1 -1
- package/dist/services/linkedin-service.d.ts +9 -1
- package/dist/services/linkedin-service.js +65 -8
- package/dist/services/linkedin-service.js.map +1 -1
- package/dist/services/mastodon-service.d.ts +10 -1
- package/dist/services/mastodon-service.js +35 -6
- package/dist/services/mastodon-service.js.map +1 -1
- package/dist/services/pinterest-service.d.ts +28 -2
- package/dist/services/pinterest-service.js +32 -8
- package/dist/services/pinterest-service.js.map +1 -1
- package/dist/services/reddit-service.d.ts +10 -1
- package/dist/services/reddit-service.js +62 -5
- package/dist/services/reddit-service.js.map +1 -1
- package/dist/services/slack-service.d.ts +14 -1
- package/dist/services/slack-service.js +22 -2
- package/dist/services/slack-service.js.map +1 -1
- package/dist/services/telegram-service.d.ts +4 -0
- package/dist/services/telegram-service.js +60 -1
- package/dist/services/telegram-service.js.map +1 -1
- package/dist/services/threads-service.d.ts +8 -1
- package/dist/services/threads-service.js +46 -7
- package/dist/services/threads-service.js.map +1 -1
- package/dist/services/tumblr-service.d.ts +25 -5
- package/dist/services/tumblr-service.js +51 -8
- package/dist/services/tumblr-service.js.map +1 -1
- package/dist/services/twitter-service.d.ts +13 -5
- package/dist/services/twitter-service.js +24 -3
- package/dist/services/twitter-service.js.map +1 -1
- package/dist/services/whatsapp-service.d.ts +10 -1
- package/dist/services/whatsapp-service.js +60 -9
- package/dist/services/whatsapp-service.js.map +1 -1
- package/dist/services/youtube-service.d.ts +21 -0
- package/dist/services/youtube-service.js +57 -7
- package/dist/services/youtube-service.js.map +1 -1
- package/dist/tools/bluesky-tools/create-post.d.ts +11 -1
- package/dist/tools/bluesky-tools/create-post.js +11 -2
- package/dist/tools/bluesky-tools/create-post.js.map +1 -1
- package/dist/tools/discord-tools/get-messages.js +6 -1
- package/dist/tools/discord-tools/get-messages.js.map +1 -1
- package/dist/tools/discord-tools/send-message.d.ts +11 -1
- package/dist/tools/discord-tools/send-message.js +17 -3
- package/dist/tools/discord-tools/send-message.js.map +1 -1
- package/dist/tools/facebook-tools/create-post.d.ts +5 -1
- package/dist/tools/facebook-tools/create-post.js +12 -2
- package/dist/tools/facebook-tools/create-post.js.map +1 -1
- package/dist/tools/facebook-tools/create-video-post.d.ts +20 -0
- package/dist/tools/facebook-tools/create-video-post.js +31 -0
- package/dist/tools/facebook-tools/create-video-post.js.map +1 -0
- package/dist/tools/ghost-tools/create-post.d.ts +4 -0
- package/dist/tools/ghost-tools/create-post.js +27 -4
- package/dist/tools/ghost-tools/create-post.js.map +1 -1
- package/dist/tools/instagram-tools/create-post.d.ts +11 -1
- package/dist/tools/instagram-tools/create-post.js +8 -3
- package/dist/tools/instagram-tools/create-post.js.map +1 -1
- package/dist/tools/linkedin-tools/create-post.d.ts +5 -1
- package/dist/tools/linkedin-tools/create-post.js +9 -2
- package/dist/tools/linkedin-tools/create-post.js.map +1 -1
- package/dist/tools/mastodon-tools/create-post.d.ts +11 -1
- package/dist/tools/mastodon-tools/create-post.js +18 -2
- package/dist/tools/mastodon-tools/create-post.js.map +1 -1
- package/dist/tools/medium-tools/create-post.d.ts +2 -2
- package/dist/tools/pinterest-tools/create-pin.d.ts +4 -2
- package/dist/tools/pinterest-tools/create-pin.js +8 -2
- package/dist/tools/pinterest-tools/create-pin.js.map +1 -1
- package/dist/tools/reddit-tools/submit-post.d.ts +9 -1
- package/dist/tools/reddit-tools/submit-post.js +19 -4
- package/dist/tools/reddit-tools/submit-post.js.map +1 -1
- package/dist/tools/slack-tools/send-message.d.ts +9 -1
- package/dist/tools/slack-tools/send-message.js +9 -2
- package/dist/tools/slack-tools/send-message.js.map +1 -1
- package/dist/tools/telegram-tools/send-document.d.ts +20 -0
- package/dist/tools/telegram-tools/send-document.js +33 -0
- package/dist/tools/telegram-tools/send-document.js.map +1 -0
- package/dist/tools/telegram-tools/send-photo.d.ts +20 -0
- package/dist/tools/telegram-tools/send-photo.js +33 -0
- package/dist/tools/telegram-tools/send-photo.js.map +1 -0
- package/dist/tools/threads-tools/create-post.d.ts +13 -1
- package/dist/tools/threads-tools/create-post.js +14 -2
- package/dist/tools/threads-tools/create-post.js.map +1 -1
- package/dist/tools/tumblr-tools/create-post.d.ts +6 -2
- package/dist/tools/tumblr-tools/create-post.js +39 -8
- package/dist/tools/tumblr-tools/create-post.js.map +1 -1
- package/dist/tools/tumblr-tools/get-posts.d.ts +2 -2
- package/dist/tools/twitter-tools/send-tweet.d.ts +9 -1
- package/dist/tools/twitter-tools/send-tweet.js +10 -2
- package/dist/tools/twitter-tools/send-tweet.js.map +1 -1
- package/dist/tools/whatsapp-tools/send-message.d.ts +19 -3
- package/dist/tools/whatsapp-tools/send-message.js +29 -3
- package/dist/tools/whatsapp-tools/send-message.js.map +1 -1
- package/dist/tools/youtube-tools/upload-video.d.ts +34 -0
- package/dist/tools/youtube-tools/upload-video.js +39 -0
- package/dist/tools/youtube-tools/upload-video.js.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -335,6 +335,8 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
335
335
|
### Telegram
|
|
336
336
|
|
|
337
337
|
- **TELEGRAM_SEND_MESSAGE** — Send a message to a chat or channel (`chatId`, `text`)
|
|
338
|
+
- **TELEGRAM_SEND_PHOTO** — Send a photo from a public URL or base64 bytes (`chatId`, `photo`, `filename`, `caption`)
|
|
339
|
+
- **TELEGRAM_SEND_DOCUMENT** — Send a file from a public URL or base64 bytes (`chatId`, `document`, `filename`, `caption`)
|
|
338
340
|
- **TELEGRAM_GET_CHANNEL_INFO** — Get channel metadata (`channelId`)
|
|
339
341
|
- **TELEGRAM_FORWARD_MESSAGE** — Forward a message between chats (`fromChatId`, `toChatId`, `messageId`)
|
|
340
342
|
- **TELEGRAM_PIN_MESSAGE** — Pin a message in a chat (`chatId`, `messageId`)
|
|
@@ -342,93 +344,112 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
342
344
|
- **TELEGRAM_EDIT_MESSAGE** — Edit the text of a message (`chatId`, `messageId`, `text`)
|
|
343
345
|
- **TELEGRAM_DELETE_MESSAGE** — Delete a message (`chatId`, `messageId`)
|
|
344
346
|
|
|
347
|
+
> **Note:** Captions over 1024 characters (Telegram's limit) are automatically sent as a follow-up reply instead of failing the call.
|
|
348
|
+
|
|
345
349
|
### Twitter / X
|
|
346
350
|
|
|
347
|
-
- **SEND_TWEET** — Post a tweet (`text`, max 280 chars)
|
|
351
|
+
- **SEND_TWEET** — Post a tweet, optionally with up to 4 image attachments or 1 gif/video (`text`, max 280 chars, `media`)
|
|
348
352
|
- **REPLY_TWEET** — Reply to a tweet (`tweetId`, `text`)
|
|
349
353
|
- **LIKE_TWEET** — Like a tweet (`tweetId`)
|
|
350
354
|
- **DELETE_TWEET** — Delete a tweet (`tweetId`)
|
|
351
355
|
- **GET_TWITTER_USER_INFO** — Get a user's profile and metrics (`username`)
|
|
352
356
|
- **SEARCH_TWEETS** — Search recent tweets (`query`, `maxResults`)
|
|
353
357
|
|
|
358
|
+
> **Note:** `media` takes `{ content, mimeType }[]` with `content` as base64, uploaded via `twitter-api-v2`'s `uploadMedia` (picks simple vs. chunked upload based on file size, so video is supported). `TwitterCredentials` also accepts a `bearerToken` in place of the four OAuth 1.0a fields (`appKey`/`appSecret`/`accessToken`/`accessSecret`) for callers that only have an OAuth 2.0 user-context token — X accepts it on both v2 and v1.1 media upload endpoints.
|
|
359
|
+
|
|
354
360
|
### Discord
|
|
355
361
|
|
|
356
|
-
- **SEND_DISCORD_MESSAGE** — Send a message to a channel (`channelId`, `content`)
|
|
357
|
-
- **GET_DISCORD_MESSAGES** — Retrieve recent messages from a channel (`channelId`, `limit`)
|
|
362
|
+
- **SEND_DISCORD_MESSAGE** — Send a message to a channel, optionally with file attachments (`channelId`, `content`, `attachments`)
|
|
363
|
+
- **GET_DISCORD_MESSAGES** — Retrieve recent messages from a channel, including attachment filenames/URLs (`channelId`, `limit`)
|
|
364
|
+
|
|
365
|
+
> **Note:** `attachments` take `{ filename, content, contentType? }` with `content` as base64 and are uploaded as real multipart attachments (not just an embedded image URL).
|
|
358
366
|
|
|
359
367
|
### WhatsApp
|
|
360
368
|
|
|
361
|
-
- **SEND_WHATSAPP_MESSAGE** — Send a
|
|
369
|
+
- **SEND_WHATSAPP_MESSAGE** — Send a text, image, video, or document message (`to`, `text`, `media`, `mediaKind`, `mediaContentType`, `mediaFilename`)
|
|
362
370
|
|
|
363
|
-
> **Note:** WhatsApp message retrieval requires webhook setup and cannot be polled via the API.
|
|
371
|
+
> **Note:** `media` is a public URL (sent as `link`) or base64-encoded bytes — base64 is uploaded to WhatsApp's media store first (`/media`) and referenced by the returned ID, since messages can't carry bytes inline. WhatsApp message retrieval requires webhook setup and cannot be polled via the API.
|
|
364
372
|
|
|
365
373
|
### Facebook
|
|
366
374
|
|
|
367
|
-
- **CREATE_FACEBOOK_POST** — Create a post on a Facebook page (`pageId`, `message`)
|
|
375
|
+
- **CREATE_FACEBOOK_POST** — Create a post on a Facebook page, optionally with a photo (`pageId`, `message`, `image`, `imageFilename`)
|
|
376
|
+
- **CREATE_FACEBOOK_VIDEO_POST** — Upload and publish a video on a page (`pageId`, `description`, `video`, `filename`)
|
|
368
377
|
- **GET_FACEBOOK_POSTS** — Retrieve recent posts from a page (`pageId`, `limit`)
|
|
369
378
|
|
|
379
|
+
> **Note:** `image`/`video` take either a public URL (fetched server-side via `/photos`' `url` / `/videos`' `file_url`) or base64-encoded bytes (uploaded as a real multipart `source`).
|
|
380
|
+
|
|
370
381
|
### Instagram
|
|
371
382
|
|
|
372
|
-
- **CREATE_INSTAGRAM_POST** — Publish an image post (`userId`, `imageUrl`, `caption`)
|
|
373
|
-
- **GET_INSTAGRAM_POSTS** — Retrieve recent posts from an account (`userId`, `limit`)
|
|
383
|
+
- **CREATE_INSTAGRAM_POST** — Publish an image, video, or Reels post (`userId`, `imageUrl`, `caption`, `mediaType`: IMAGE/VIDEO/REELS)
|
|
384
|
+
- **GET_INSTAGRAM_POSTS** — Retrieve recent posts from an account, including `media_url`/`permalink` (`userId`, `limit`)
|
|
385
|
+
|
|
386
|
+
> **Note:** `imageUrl` must be a publicly reachable URL for all media types — Instagram's Content Publishing API has no direct byte-upload path. For VIDEO/REELS, the container is polled until Meta finishes processing before publishing (previously publishing immediately could fail while the video was still processing).
|
|
374
387
|
|
|
375
388
|
### Slack
|
|
376
389
|
|
|
377
|
-
- **SEND_SLACK_MESSAGE** — Send a message to a channel (`channelId`, `text`)
|
|
390
|
+
- **SEND_SLACK_MESSAGE** — Send a message to a channel, optionally with file attachments (`channelId`, `text`, `attachments`)
|
|
378
391
|
- **GET_SLACK_MESSAGES** — Retrieve recent messages from a channel (`channelId`, `limit`)
|
|
379
392
|
- **LIST_SLACK_CHANNELS** — List public channels in the workspace (`limit`)
|
|
380
393
|
|
|
394
|
+
> **Note:** `attachments` take `{ filename, content }` with `content` as base64, uploaded via Slack's `files.uploadV2`. When present, `text` becomes the initial comment on the first file.
|
|
395
|
+
|
|
381
396
|
### LinkedIn
|
|
382
397
|
|
|
383
398
|
- **GET_LINKEDIN_PROFILE** — Get the authenticated user's profile information
|
|
384
|
-
- **CREATE_LINKEDIN_POST** — Create a UGC post (`authorUrn`, `text`, `visibility`)
|
|
399
|
+
- **CREATE_LINKEDIN_POST** — Create a UGC post, optionally with an image (`authorUrn`, `text`, `visibility`, `image`, `imageTitle`)
|
|
385
400
|
- **GET_LINKEDIN_POSTS** — Retrieve recent posts by a member or organization (`authorUrn`, `count`)
|
|
386
401
|
- **DELETE_LINKEDIN_POST** — Delete a UGC post (`ugcPostUrn`)
|
|
387
402
|
- **LIKE_LINKEDIN_POST** — Like a post (`actorUrn`, `ugcPostUrn`)
|
|
388
403
|
- **ADD_LINKEDIN_COMMENT** — Comment on a post (`actorUrn`, `ugcPostUrn`, `text`)
|
|
389
404
|
- **SEARCH_LINKEDIN_PEOPLE** — Search for people by keywords (`keywords`, `count`)
|
|
390
405
|
|
|
391
|
-
> **Note:** `SEARCH_LINKEDIN_PEOPLE` uses the LinkedIn People Search API which requires [Partner Program](https://learn.microsoft.com/en-us/linkedin/talent/recruiter-system-connect/getting-access) access. Most developer apps will receive a 403. All other tools work with a standard OAuth 2.0 token.
|
|
406
|
+
> **Note:** `SEARCH_LINKEDIN_PEOPLE` uses the LinkedIn People Search API which requires [Partner Program](https://learn.microsoft.com/en-us/linkedin/talent/recruiter-system-connect/getting-access) access. Most developer apps will receive a 403. All other tools work with a standard OAuth 2.0 token. `image` is base64-encoded bytes — LinkedIn's UGC API has no URL-reference option, so it always goes through the register-upload → PUT bytes → reference-asset-URN flow.
|
|
392
407
|
|
|
393
408
|
### Reddit
|
|
394
409
|
|
|
395
|
-
- **REDDIT_SUBMIT_POST** — Submit a text or
|
|
410
|
+
- **REDDIT_SUBMIT_POST** — Submit a text, link, or image post to a subreddit (`subreddit`, `title`, `kind`, `text`, `url`, `image`, `imageFilename`, `imageMimeType`)
|
|
396
411
|
- **REDDIT_GET_POSTS** — Get posts from a subreddit (`subreddit`, `sort`, `limit`)
|
|
397
412
|
- **REDDIT_COMMENT** — Comment on a post or reply to a comment (`parentId`, `text`)
|
|
398
413
|
- **REDDIT_VOTE** — Upvote, downvote, or remove a vote (`id`, `direction`)
|
|
399
414
|
- **REDDIT_SEARCH** — Search Reddit across all or a specific subreddit (`query`, `subreddit`, `sort`, `limit`)
|
|
400
415
|
- **REDDIT_GET_USER_INFO** — Get public info about a Reddit user (`username`)
|
|
401
416
|
|
|
402
|
-
> **Note:** Reddit requires a "script" type app in [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps). The password grant flow is used — 2FA must be disabled on the account.
|
|
417
|
+
> **Note:** Reddit requires a "script" type app in [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps). The password grant flow is used — 2FA must be disabled on the account. For `kind: "image"`, base64 bytes go through Reddit's lease-then-S3-upload flow (`/api/media/asset.json`) and the post links to the resulting `i.redd.it` asset.
|
|
403
418
|
|
|
404
419
|
### Threads
|
|
405
420
|
|
|
406
421
|
- **THREADS_GET_PROFILE** — Get your Threads profile information
|
|
407
|
-
- **THREADS_CREATE_POST** — Create a new
|
|
422
|
+
- **THREADS_CREATE_POST** — Create a new post, optionally with an image or video (`text`, `replyToId`, `mediaUrl`, `mediaType`: IMAGE/VIDEO)
|
|
408
423
|
- **THREADS_REPLY** — Reply to a Threads post (`replyToId`, `text`)
|
|
409
|
-
- **THREADS_GET_POSTS** — Get recent posts from your account (`limit`)
|
|
424
|
+
- **THREADS_GET_POSTS** — Get recent posts from your account, including `media_url` (`limit`)
|
|
410
425
|
- **THREADS_DELETE_POST** — Delete a post by ID (`mediaId`)
|
|
411
426
|
|
|
427
|
+
> **Note:** `mediaUrl` must be a publicly reachable URL, same as Instagram (shared Meta infrastructure). IMAGE/VIDEO containers are polled until processing finishes before publishing.
|
|
428
|
+
|
|
412
429
|
### Bluesky
|
|
413
430
|
|
|
414
431
|
- **BLUESKY_GET_PROFILE** — Get your Bluesky profile information
|
|
415
|
-
- **BLUESKY_CREATE_POST** — Create a new
|
|
432
|
+
- **BLUESKY_CREATE_POST** — Create a new post, optionally with up to 4 images (`text`, `images`)
|
|
416
433
|
- **BLUESKY_REPLY_TO_POST** — Reply to a Bluesky post (`text`, `parentUri`, `parentCid`, `rootUri`, `rootCid`)
|
|
417
434
|
- **BLUESKY_GET_POSTS** — Get recent posts from your feed (`limit`)
|
|
418
435
|
- **BLUESKY_DELETE_POST** — Delete a post by URI (`uri`, `cid`)
|
|
419
436
|
- **BLUESKY_LIKE_POST** — Like a post (`uri`, `cid`)
|
|
420
437
|
- **BLUESKY_SEARCH_POSTS** — Search for posts on Bluesky (`query`, `limit`)
|
|
421
438
|
|
|
439
|
+
> **Note:** `images` take `{ content, mimeType, alt? }[]` with `content` as base64 — AT Proto has no URL-reference option, every image is uploaded as a blob (`uploadBlob`) and referenced in the post's embed.
|
|
440
|
+
|
|
422
441
|
### Mastodon
|
|
423
442
|
|
|
424
443
|
- **MASTODON_GET_PROFILE** — Get your Mastodon profile information
|
|
425
|
-
- **MASTODON_CREATE_POST** — Create a new post (`status`, `inReplyToId` optional, `visibility`)
|
|
444
|
+
- **MASTODON_CREATE_POST** — Create a new post, optionally with up to 4 media attachments (`status`, `inReplyToId` optional, `visibility`, `media`)
|
|
426
445
|
- **MASTODON_REPLY_TO_POST** — Reply to a Mastodon post (`status`, `inReplyToId`)
|
|
427
446
|
- **MASTODON_SEARCH_POSTS** — Search for posts on your instance (`query`, `limit`)
|
|
428
447
|
- **MASTODON_BOOST_POST** — Reblog/boost a post (`statusId`)
|
|
429
448
|
- **MASTODON_FAVOURITE_POST** — Favorite/like a post (`statusId`)
|
|
430
449
|
- **MASTODON_DELETE_POST** — Delete a post (`statusId`)
|
|
431
450
|
|
|
451
|
+
> **Note:** `media` take `{ content, filename?, description? }[]` with `content` as base64, uploaded via `/api/v2/media` and attached by ID.
|
|
452
|
+
|
|
432
453
|
### TikTok
|
|
433
454
|
|
|
434
455
|
- **TIKTOK_QUERY_CREATOR_INFO** — Query creator info including posting permissions and privacy options
|
|
@@ -437,7 +458,7 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
437
458
|
- **TIKTOK_PHOTO_POST** — Create a photo/carousel post (`photoUrls`, `title`, `description`, `privacyLevel`)
|
|
438
459
|
- **TIKTOK_GET_POST_STATUS** — Check the publishing status of a video or photo post (`publishId`)
|
|
439
460
|
|
|
440
|
-
> **Note:** TikTok's Content Posting API requires app approval from [TikTok for Developers](https://developers.tiktok.com). Videos are pulled from a public URL by TikTok's servers rather than uploaded directly.
|
|
461
|
+
> **Note:** TikTok's Content Posting API requires app approval from [TikTok for Developers](https://developers.tiktok.com). Videos are pulled from a public URL by TikTok's servers (`PULL_FROM_URL`) rather than uploaded directly — TikTok's alternative `FILE_UPLOAD` mode (chunked byte upload for base64/local content) is not yet implemented here; if you need it, it's the same style of lease-then-PUT flow used for LinkedIn/Reddit media above.
|
|
441
462
|
|
|
442
463
|
### YouTube
|
|
443
464
|
|
|
@@ -448,18 +469,21 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
448
469
|
- **YOUTUBE_GET_COMMENTS** — Get top-level comments on a video (`videoId`, `maxResults`)
|
|
449
470
|
- **YOUTUBE_POST_COMMENT** — Post a comment on a video (`videoId`, `text`)
|
|
450
471
|
- **YOUTUBE_UPDATE_VIDEO** — Update a video's title, description, and tags (`videoId`, `title`, `description`, `tags`, `categoryId`)
|
|
472
|
+
- **YOUTUBE_UPLOAD_VIDEO** — Upload a video to the authenticated user's channel (`content`, `contentType`, `title`, `description`, `tags`, `categoryId`, `privacyStatus`)
|
|
451
473
|
|
|
452
|
-
> **Note:** YouTube requires an OAuth 2.0 access token with the `https://www.googleapis.com/auth/youtube` scope. Enable the **YouTube Data API v3** in your [Google Cloud Console](https://console.cloud.google.com) project.
|
|
474
|
+
> **Note:** YouTube requires an OAuth 2.0 access token with the `https://www.googleapis.com/auth/youtube` scope (or `.upload` for uploads). Enable the **YouTube Data API v3** in your [Google Cloud Console](https://console.cloud.google.com) project. `YOUTUBE_UPLOAD_VIDEO` uses a single-request multipart upload (not YouTube's resumable/chunked protocol) — appropriate since `content` arrives as one base64 tool argument rather than a large local file; very large videos may need the resumable flow instead.
|
|
453
475
|
|
|
454
476
|
### Pinterest
|
|
455
477
|
|
|
456
478
|
- **PINTEREST_GET_BOARDS** — List all boards on your Pinterest account (`pageSize`)
|
|
457
479
|
- **PINTEREST_CREATE_BOARD** — Create a new board (`name`, `description`)
|
|
458
|
-
- **PINTEREST_CREATE_PIN** — Create a pin on a board (`boardId`, `title`, `description`, `
|
|
459
|
-
- **PINTEREST_GET_PIN** — Get details of a specific pin (`pinId`)
|
|
480
|
+
- **PINTEREST_CREATE_PIN** — Create a pin on a board (`boardId`, `title`, `description`, `image`, `imageContentType`, `link`)
|
|
481
|
+
- **PINTEREST_GET_PIN** — Get details of a specific pin, including media URLs (`pinId`)
|
|
460
482
|
- **PINTEREST_GET_BOARD_PINS** — List all pins on a board (`boardId`, `pageSize`)
|
|
461
483
|
- **PINTEREST_DELETE_PIN** — Delete a pin by ID (`pinId`)
|
|
462
484
|
|
|
485
|
+
> **Note:** `image` takes either a public URL or base64-encoded bytes — unlike most platforms, Pinterest's v5 API accepts base64 directly in the pin body (`image_base64`), no separate upload step needed.
|
|
486
|
+
|
|
463
487
|
### Medium
|
|
464
488
|
|
|
465
489
|
- **MEDIUM_GET_USER** — Get your Medium profile and user ID (required for publishing)
|
|
@@ -481,7 +505,7 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
481
505
|
- **DEVTO_GET_ARTICLE** — Get a specific article by ID including its full Markdown body (`id`)
|
|
482
506
|
- **DEVTO_UPDATE_ARTICLE** — Update an existing article (`id`, `title`, `bodyMarkdown`, `published`, `tags`, `description`, `canonicalUrl`)
|
|
483
507
|
|
|
484
|
-
> **Note:** Get your API key at [dev.to/settings/extensions](https://dev.to/settings/extensions). Set `published: false` to save as a draft.
|
|
508
|
+
> **Note:** Get your API key at [dev.to/settings/extensions](https://dev.to/settings/extensions). Set `published: false` to save as a draft. `mainImage` is a URL only — Dev.to's public API has no image upload endpoint; body images must already be hosted and linked in the Markdown.
|
|
485
509
|
|
|
486
510
|
### Hashnode
|
|
487
511
|
|
|
@@ -489,7 +513,7 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
489
513
|
- **HASHNODE_GET_POSTS** — List recent posts from a Hashnode publication (`first`, `publicationId`)
|
|
490
514
|
- **HASHNODE_CREATE_POST** — Publish a post to a Hashnode publication (`title`, `contentMarkdown`, `tags`, `subtitle`, `coverImageUrl`, `publicationId`)
|
|
491
515
|
|
|
492
|
-
> **Note:** Tags are passed as `[{ name, slug }]` objects. Get your publication ID via `HASHNODE_GET_PUBLICATION` or from the Hashnode dashboard URL.
|
|
516
|
+
> **Note:** Tags are passed as `[{ name, slug }]` objects. Get your publication ID via `HASHNODE_GET_PUBLICATION` or from the Hashnode dashboard URL. `coverImageURL` is a URL only — Hashnode's GraphQL API expects an already-hosted image, not a byte upload.
|
|
493
517
|
|
|
494
518
|
### Beehiiv
|
|
495
519
|
|
|
@@ -497,16 +521,16 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
497
521
|
- **BEEHIIV_GET_POSTS** — List posts with send stats including open rate (`page`, `limit`, `publicationId`)
|
|
498
522
|
- **BEEHIIV_GET_SUBSCRIBERS** — List subscribers with status and tier info (`page`, `limit`, `publicationId`)
|
|
499
523
|
|
|
500
|
-
> **Note:** Set `status: "confirmed"` to schedule the post for sending. `status: "draft"` saves it without sending.
|
|
524
|
+
> **Note:** Set `status: "confirmed"` to schedule the post for sending. `status: "draft"` saves it without sending. `bodyHtml` is raw HTML — Beehiiv's public API has no image/attachment upload; inline images must already be hosted.
|
|
501
525
|
|
|
502
526
|
### Ghost
|
|
503
527
|
|
|
504
|
-
- **GHOST_CREATE_POST** — Create a post on a Ghost blog (`title`, `html`, `status`, `tags`, `excerpt`, `publishedAt`)
|
|
528
|
+
- **GHOST_CREATE_POST** — Create a post on a Ghost blog, optionally with a feature image (`title`, `html`, `status`, `tags`, `excerpt`, `publishedAt`, `featureImage`, `featureImageFilename`)
|
|
505
529
|
- **GHOST_GET_POSTS** — List posts filtered by status (`page`, `limit`, `status`)
|
|
506
530
|
- **GHOST_UPDATE_POST** — Update an existing post — requires the post's current `updated_at` timestamp for optimistic locking (`id`, `updatedAt`, `title`, `html`, `status`, `tags`, `excerpt`)
|
|
507
531
|
- **GHOST_DELETE_POST** — Permanently delete a post (`id`)
|
|
508
532
|
|
|
509
|
-
> **Note:** The Admin API key (`GHOST_ADMIN_API_KEY`) must be in `id:secret` format from Ghost Admin → Settings → Integrations. Ghost uses JWT authentication which is generated automatically per request.
|
|
533
|
+
> **Note:** The Admin API key (`GHOST_ADMIN_API_KEY`) must be in `id:secret` format from Ghost Admin → Settings → Integrations. Ghost uses JWT authentication which is generated automatically per request. `featureImage` takes a public URL or base64-encoded bytes; base64 is uploaded via Ghost's `/images/upload/` endpoint first.
|
|
510
534
|
|
|
511
535
|
### Twitch
|
|
512
536
|
|
|
@@ -521,11 +545,11 @@ Set `MAIL_MAILER` to select your provider (`smtp`, `sendgrid`, `mailgun`, or `se
|
|
|
521
545
|
### Tumblr
|
|
522
546
|
|
|
523
547
|
- **TUMBLR_GET_BLOG_INFO** — Get blog info including title, description, post count, and follower count (`blogIdentifier`)
|
|
524
|
-
- **TUMBLR_CREATE_POST** — Create a
|
|
548
|
+
- **TUMBLR_CREATE_POST** — Create a post using the Neue Post Format, optionally with an image (`text`, `title`, `tags`, `state`, `blogIdentifier`, `image`, `imageContentType`)
|
|
525
549
|
- **TUMBLR_GET_POSTS** — Get posts from a blog, optionally filtered by type (`offset`, `limit`, `type`, `blogIdentifier`)
|
|
526
550
|
- **TUMBLR_DELETE_POST** — Delete a post by ID (`postId`, `blogIdentifier`)
|
|
527
551
|
|
|
528
|
-
> **Note:** Tumblr uses OAuth 2.0 Bearer tokens. Set `state: "draft"` or `"queue"` to save without publishing immediately.
|
|
552
|
+
> **Note:** Tumblr uses OAuth 2.0 Bearer tokens. Set `state: "draft"` or `"queue"` to save without publishing immediately. `image` takes a public URL (referenced directly in the NPF content block) or base64-encoded bytes (uploaded inline via a multipart request with an `identifier`-referenced block).
|
|
529
553
|
|
|
530
554
|
## Per-org / Multi-account Usage
|
|
531
555
|
|
|
@@ -576,6 +600,18 @@ Both email tools accept **inline credentials** as optional parameters. When prov
|
|
|
576
600
|
|
|
577
601
|
When `mailer` and `fromAddress` are omitted, the tool falls back to the env var configuration (`MAIL_MAILER`, `MAIL_FROM_ADDRESS`, etc.).
|
|
578
602
|
|
|
603
|
+
## Proxy Support
|
|
604
|
+
|
|
605
|
+
Most services accept an optional `proxyUrl` in their credentials (e.g. `new DiscordService({ botToken, proxyUrl: "http://user:pass@host:port" })`), routing that account's API calls through an HTTP(S) proxy — useful for a multi-tenant host that wants each connected account's traffic to originate from a distinct, consistent IP. This is a constructor-level option for programmatic/library consumers (not an MCP tool parameter, since it's server-operator infrastructure rather than message content).
|
|
606
|
+
|
|
607
|
+
Supported today: Discord, Slack, Telegram, Twitter/X, Instagram, Facebook, WhatsApp, Threads, LinkedIn, Reddit, Pinterest, Mastodon, YouTube, Ghost, Tumblr. Not yet wired: Bluesky (`@atproto/api`'s `BskyAgent` doesn't expose a documented fetch/agent override), TikTok, Medium, Dev.to, Hashnode, Beehiiv, Twitch — these currently ignore any `proxyUrl` passed to them.
|
|
608
|
+
|
|
609
|
+
Two mechanisms are used depending on how each service talks to its platform, since passing the wrong one is a silent no-op rather than an error:
|
|
610
|
+
- `createProxyDispatcher()` (undici `ProxyAgent`) for services using raw `fetch()` — most of the list above.
|
|
611
|
+
- `createProxyAgent()` (`https-proxy-agent`) for services built on SDKs that take a classic `http.Agent` (Slack's `@slack/web-api`, Telegram's `telegraf`, Twitter's `twitter-api-v2` via its `httpAgent` client option).
|
|
612
|
+
|
|
613
|
+
Both are exported from `social-mcp/dist/lib/proxy.js` if you need to build the agent/dispatcher yourself.
|
|
614
|
+
|
|
579
615
|
## Development
|
|
580
616
|
|
|
581
617
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { FastMCP } from "fastmcp";
|
|
4
4
|
import { CredentialsError } from "./lib/errors.js";
|
|
5
|
+
import { getBeehiivService } from "./services/beehiiv-service.js";
|
|
5
6
|
import { getBlueskyService } from "./services/bluesky-service.js";
|
|
7
|
+
import { getDevToService } from "./services/devto-service.js";
|
|
6
8
|
import { getDiscordService } from "./services/discord-service.js";
|
|
7
9
|
import { getEmailService } from "./services/email-service.js";
|
|
8
10
|
import { getFacebookService } from "./services/facebook-service.js";
|
|
11
|
+
import { getGhostService } from "./services/ghost-service.js";
|
|
12
|
+
import { getHashnodeService } from "./services/hashnode-service.js";
|
|
9
13
|
import { getInstagramService } from "./services/instagram-service.js";
|
|
10
14
|
import { getLinkedInService } from "./services/linkedin-service.js";
|
|
11
15
|
import { getMastodonService } from "./services/mastodon-service.js";
|
|
@@ -16,27 +20,38 @@ import { getSlackService } from "./services/slack-service.js";
|
|
|
16
20
|
import { getTelegramService } from "./services/telegram-service.js";
|
|
17
21
|
import { getThreadsService } from "./services/threads-service.js";
|
|
18
22
|
import { getTikTokService } from "./services/tiktok-service.js";
|
|
23
|
+
import { getTumblrService } from "./services/tumblr-service.js";
|
|
24
|
+
import { getTwitchService } from "./services/twitch-service.js";
|
|
19
25
|
import { getTwitterService } from "./services/twitter-service.js";
|
|
20
26
|
import { getWhatsappService } from "./services/whatsapp-service.js";
|
|
21
27
|
import { getYouTubeService } from "./services/youtube-service.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { getHashnodeService } from "./services/hashnode-service.js";
|
|
26
|
-
import { getTumblrService } from "./services/tumblr-service.js";
|
|
27
|
-
import { getTwitchService } from "./services/twitch-service.js";
|
|
28
|
+
import { createPostTool as beehiivCreatePostTool } from "./tools/beehiiv-tools/create-post.js";
|
|
29
|
+
import { getPostsTool as beehiivGetPostsTool } from "./tools/beehiiv-tools/get-posts.js";
|
|
30
|
+
import { getSubscribersTool as beehiivGetSubscribersTool } from "./tools/beehiiv-tools/get-subscribers.js";
|
|
28
31
|
import { createPostTool as blueskyCreatePostTool } from "./tools/bluesky-tools/create-post.js";
|
|
29
32
|
import { deletePostTool as blueskyDeletePostTool } from "./tools/bluesky-tools/delete-post.js";
|
|
30
33
|
import { getProfileTool as blueskyGetProfileTool } from "./tools/bluesky-tools/get-profile.js";
|
|
31
34
|
import { likePostTool as blueskyLikePostTool } from "./tools/bluesky-tools/like-post.js";
|
|
32
35
|
import { replyToPostTool as blueskyReplyToPostTool } from "./tools/bluesky-tools/reply-to-post.js";
|
|
33
36
|
import { searchPostsTool as blueskySearchPostsTool } from "./tools/bluesky-tools/search-posts.js";
|
|
37
|
+
import { createArticleTool as devtoCreateArticleTool } from "./tools/devto-tools/create-article.js";
|
|
38
|
+
import { getArticleTool as devtoGetArticleTool } from "./tools/devto-tools/get-article.js";
|
|
39
|
+
import { getArticlesTool as devtoGetArticlesTool } from "./tools/devto-tools/get-articles.js";
|
|
40
|
+
import { updateArticleTool as devtoUpdateArticleTool } from "./tools/devto-tools/update-article.js";
|
|
34
41
|
import { getMessagesTool as discordGetMessagesTool } from "./tools/discord-tools/get-messages.js";
|
|
35
42
|
import { sendMessageTool as discordSendMessageTool } from "./tools/discord-tools/send-message.js";
|
|
36
43
|
import { sendBulkEmailTool } from "./tools/email-tools/send-bulk-email.js";
|
|
37
44
|
import { sendEmailTool } from "./tools/email-tools/send-email.js";
|
|
38
45
|
import { createPostTool as facebookCreatePostTool } from "./tools/facebook-tools/create-post.js";
|
|
46
|
+
import { createVideoPostTool as facebookCreateVideoPostTool } from "./tools/facebook-tools/create-video-post.js";
|
|
39
47
|
import { getPostsTool as facebookGetPostsTool } from "./tools/facebook-tools/get-posts.js";
|
|
48
|
+
import { createPostTool as ghostCreatePostTool } from "./tools/ghost-tools/create-post.js";
|
|
49
|
+
import { deletePostTool as ghostDeletePostTool } from "./tools/ghost-tools/delete-post.js";
|
|
50
|
+
import { getPostsTool as ghostGetPostsTool } from "./tools/ghost-tools/get-posts.js";
|
|
51
|
+
import { updatePostTool as ghostUpdatePostTool } from "./tools/ghost-tools/update-post.js";
|
|
52
|
+
import { createPostTool as hashnodeCreatePostTool } from "./tools/hashnode-tools/create-post.js";
|
|
53
|
+
import { getPostsTool as hashnodeGetPostsTool } from "./tools/hashnode-tools/get-posts.js";
|
|
54
|
+
import { getPublicationTool as hashnodeGetPublicationTool } from "./tools/hashnode-tools/get-publication.js";
|
|
40
55
|
import { createPostTool as instagramCreatePostTool } from "./tools/instagram-tools/create-post.js";
|
|
41
56
|
import { getPostsTool as instagramGetPostsTool } from "./tools/instagram-tools/get-posts.js";
|
|
42
57
|
import { addCommentTool as linkedInAddCommentTool } from "./tools/linkedin-tools/add-comment.js";
|
|
@@ -76,7 +91,9 @@ import { forwardMessageTool } from "./tools/telegram-tools/forward-message.js";
|
|
|
76
91
|
import { getChannelInfoTool } from "./tools/telegram-tools/get-channel-info.js";
|
|
77
92
|
import { getChannelMembersTool } from "./tools/telegram-tools/get-channel-members.js";
|
|
78
93
|
import { pinMessageTool } from "./tools/telegram-tools/pin-message.js";
|
|
94
|
+
import { sendDocumentTool } from "./tools/telegram-tools/send-document.js";
|
|
79
95
|
import { sendMessageTool } from "./tools/telegram-tools/send-message.js";
|
|
96
|
+
import { sendPhotoTool } from "./tools/telegram-tools/send-photo.js";
|
|
80
97
|
import { createPostTool as threadsCreatePostTool } from "./tools/threads-tools/create-post.js";
|
|
81
98
|
import { deletePostTool as threadsDeletePostTool } from "./tools/threads-tools/delete-post.js";
|
|
82
99
|
import { getPostsTool as threadsGetPostsTool } from "./tools/threads-tools/get-posts.js";
|
|
@@ -87,6 +104,15 @@ import { getPostStatusTool as tiktokGetPostStatusTool } from "./tools/tiktok-too
|
|
|
87
104
|
import { getUserInfoTool as tiktokGetUserInfoTool } from "./tools/tiktok-tools/get-user-info.js";
|
|
88
105
|
import { photoPostTool as tiktokPhotoPostTool } from "./tools/tiktok-tools/photo-post.js";
|
|
89
106
|
import { queryCreatorInfoTool as tiktokQueryCreatorInfoTool } from "./tools/tiktok-tools/query-creator-info.js";
|
|
107
|
+
import { createPostTool as tumblrCreatePostTool } from "./tools/tumblr-tools/create-post.js";
|
|
108
|
+
import { deletePostTool as tumblrDeletePostTool } from "./tools/tumblr-tools/delete-post.js";
|
|
109
|
+
import { getBlogInfoTool as tumblrGetBlogInfoTool } from "./tools/tumblr-tools/get-blog-info.js";
|
|
110
|
+
import { getPostsTool as tumblrGetPostsTool } from "./tools/tumblr-tools/get-posts.js";
|
|
111
|
+
import { getChannelInfoTool as twitchGetChannelInfoTool } from "./tools/twitch-tools/get-channel-info.js";
|
|
112
|
+
import { getStreamsTool as twitchGetStreamsTool } from "./tools/twitch-tools/get-streams.js";
|
|
113
|
+
import { getUserTool as twitchGetUserTool } from "./tools/twitch-tools/get-user.js";
|
|
114
|
+
import { searchChannelsTool as twitchSearchChannelsTool } from "./tools/twitch-tools/search-channels.js";
|
|
115
|
+
import { sendChatMessageTool as twitchSendChatMessageTool } from "./tools/twitch-tools/send-chat-message.js";
|
|
90
116
|
import { deleteTweetTool } from "./tools/twitter-tools/delete-tweet.js";
|
|
91
117
|
import { getUserInfoTool } from "./tools/twitter-tools/get-user-info.js";
|
|
92
118
|
import { likeTweetTool } from "./tools/twitter-tools/like-tweet.js";
|
|
@@ -101,29 +127,7 @@ import { listChannelVideosTool as youtubeListChannelVideosTool } from "./tools/y
|
|
|
101
127
|
import { postCommentTool as youtubePostCommentTool } from "./tools/youtube-tools/post-comment.js";
|
|
102
128
|
import { searchVideosTool as youtubeSearchVideosTool } from "./tools/youtube-tools/search-videos.js";
|
|
103
129
|
import { updateVideoTool as youtubeUpdateVideoTool } from "./tools/youtube-tools/update-video.js";
|
|
104
|
-
import {
|
|
105
|
-
import { getArticlesTool as devtoGetArticlesTool } from "./tools/devto-tools/get-articles.js";
|
|
106
|
-
import { getArticleTool as devtoGetArticleTool } from "./tools/devto-tools/get-article.js";
|
|
107
|
-
import { updateArticleTool as devtoUpdateArticleTool } from "./tools/devto-tools/update-article.js";
|
|
108
|
-
import { createPostTool as hashnodeCreatePostTool } from "./tools/hashnode-tools/create-post.js";
|
|
109
|
-
import { getPostsTool as hashnodeGetPostsTool } from "./tools/hashnode-tools/get-posts.js";
|
|
110
|
-
import { getPublicationTool as hashnodeGetPublicationTool } from "./tools/hashnode-tools/get-publication.js";
|
|
111
|
-
import { createPostTool as beehiivCreatePostTool } from "./tools/beehiiv-tools/create-post.js";
|
|
112
|
-
import { getPostsTool as beehiivGetPostsTool } from "./tools/beehiiv-tools/get-posts.js";
|
|
113
|
-
import { getSubscribersTool as beehiivGetSubscribersTool } from "./tools/beehiiv-tools/get-subscribers.js";
|
|
114
|
-
import { createPostTool as ghostCreatePostTool } from "./tools/ghost-tools/create-post.js";
|
|
115
|
-
import { getPostsTool as ghostGetPostsTool } from "./tools/ghost-tools/get-posts.js";
|
|
116
|
-
import { updatePostTool as ghostUpdatePostTool } from "./tools/ghost-tools/update-post.js";
|
|
117
|
-
import { deletePostTool as ghostDeletePostTool } from "./tools/ghost-tools/delete-post.js";
|
|
118
|
-
import { getUserTool as twitchGetUserTool } from "./tools/twitch-tools/get-user.js";
|
|
119
|
-
import { getStreamsTool as twitchGetStreamsTool } from "./tools/twitch-tools/get-streams.js";
|
|
120
|
-
import { getChannelInfoTool as twitchGetChannelInfoTool } from "./tools/twitch-tools/get-channel-info.js";
|
|
121
|
-
import { searchChannelsTool as twitchSearchChannelsTool } from "./tools/twitch-tools/search-channels.js";
|
|
122
|
-
import { sendChatMessageTool as twitchSendChatMessageTool } from "./tools/twitch-tools/send-chat-message.js";
|
|
123
|
-
import { createPostTool as tumblrCreatePostTool } from "./tools/tumblr-tools/create-post.js";
|
|
124
|
-
import { getPostsTool as tumblrGetPostsTool } from "./tools/tumblr-tools/get-posts.js";
|
|
125
|
-
import { deletePostTool as tumblrDeletePostTool } from "./tools/tumblr-tools/delete-post.js";
|
|
126
|
-
import { getBlogInfoTool as tumblrGetBlogInfoTool } from "./tools/tumblr-tools/get-blog-info.js";
|
|
130
|
+
import { uploadVideoTool as youtubeUploadVideoTool } from "./tools/youtube-tools/upload-video.js";
|
|
127
131
|
const require = createRequire(import.meta.url);
|
|
128
132
|
const { version } = require("../package.json");
|
|
129
133
|
async function checkPlatform(name, init) {
|
|
@@ -172,6 +176,8 @@ async function main() {
|
|
|
172
176
|
const server = new FastMCP({ name: "Social MCP Server", version });
|
|
173
177
|
// Telegram
|
|
174
178
|
server.addTool(sendMessageTool);
|
|
179
|
+
server.addTool(sendPhotoTool);
|
|
180
|
+
server.addTool(sendDocumentTool);
|
|
175
181
|
server.addTool(getChannelInfoTool);
|
|
176
182
|
server.addTool(forwardMessageTool);
|
|
177
183
|
server.addTool(pinMessageTool);
|
|
@@ -192,6 +198,7 @@ async function main() {
|
|
|
192
198
|
server.addTool(whatsappSendMessageTool);
|
|
193
199
|
// Facebook
|
|
194
200
|
server.addTool(facebookCreatePostTool);
|
|
201
|
+
server.addTool(facebookCreateVideoPostTool);
|
|
195
202
|
server.addTool(facebookGetPostsTool);
|
|
196
203
|
// Instagram
|
|
197
204
|
server.addTool(instagramCreatePostTool);
|
|
@@ -235,6 +242,7 @@ async function main() {
|
|
|
235
242
|
server.addTool(youtubeGetCommentsTool);
|
|
236
243
|
server.addTool(youtubePostCommentTool);
|
|
237
244
|
server.addTool(youtubeUpdateVideoTool);
|
|
245
|
+
server.addTool(youtubeUploadVideoTool);
|
|
238
246
|
// Bluesky
|
|
239
247
|
server.addTool(blueskyCreatePostTool);
|
|
240
248
|
server.addTool(blueskyReplyToPostTool);
|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AC;IAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
package/dist/lib/http.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { Dispatcher } from "undici";
|
|
1
2
|
import type { z } from "zod";
|
|
2
3
|
export declare class HttpError extends Error {
|
|
3
4
|
readonly status: number;
|
|
4
5
|
readonly data?: unknown | undefined;
|
|
5
6
|
constructor(status: number, message: string, data?: unknown | undefined);
|
|
6
7
|
}
|
|
7
|
-
export
|
|
8
|
+
export type FetchOptions = RequestInit & {
|
|
9
|
+
dispatcher?: Dispatcher;
|
|
10
|
+
};
|
|
11
|
+
export declare function fetchJson<T>(url: string, options?: FetchOptions, schema?: z.ZodType<T>): Promise<T>;
|
package/dist/lib/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/lib/http.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/lib/http.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAElB;IAEA;IAHjB,YACiB,MAAc,EAC9B,OAAe,EACC,IAAc;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,WAAM,GAAN,MAAM,CAAQ;QAEd,SAAI,GAAJ,IAAI,CAAU;QAG9B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IACzB,CAAC;CACD;AAOD,MAAM,CAAC,KAAK,UAAU,SAAS,CAC9B,GAAW,EACX,OAAsB,EACtB,MAAqB;IAErB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,OAAsB,CAAC,CAAC;IAE1D,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QAClB,MAAM,IAAI,SAAS,CAClB,QAAQ,CAAC,MAAM,EACf,cAAc,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,EACvD,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAC5C,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAEnC,IAAI,MAAM,EAAE,CAAC;QACZ,IAAI,CAAC;YACJ,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACd,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClF,CAAC;QACH,CAAC;IACF,CAAC;IAED,OAAO,IAAS,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
2
|
+
import { type Dispatcher } from "undici";
|
|
3
|
+
export declare function createProxyAgent(proxyUrl?: string): HttpsProxyAgent<string> | undefined;
|
|
4
|
+
export declare function createProxyDispatcher(proxyUrl?: string): Dispatcher | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
2
|
+
import { ProxyAgent } from "undici";
|
|
3
|
+
// Two flavors because Node has two incompatible HTTP client worlds: SDKs built on
|
|
4
|
+
// axios/http.request (Slack, Telegram) take a classic http.Agent, while raw fetch()
|
|
5
|
+
// (undici under the hood) takes a Dispatcher instead — passing the wrong one is a
|
|
6
|
+
// silent no-op, not an error, so callers must pick the one matching their client.
|
|
7
|
+
export function createProxyAgent(proxyUrl) {
|
|
8
|
+
return proxyUrl ? new HttpsProxyAgent(proxyUrl) : undefined;
|
|
9
|
+
}
|
|
10
|
+
export function createProxyDispatcher(proxyUrl) {
|
|
11
|
+
return proxyUrl ? new ProxyAgent(proxyUrl) : undefined;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/lib/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAmB,UAAU,EAAE,MAAM,QAAQ,CAAC;AAErD,kFAAkF;AAClF,oFAAoF;AACpF,kFAAkF;AAClF,kFAAkF;AAElF,MAAM,UAAU,gBAAgB,CAC/B,QAAiB;IAEjB,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,qBAAqB,CACpC,QAAiB;IAEjB,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC"}
|
|
@@ -3,6 +3,12 @@ export interface BlueskyCredentials {
|
|
|
3
3
|
appPassword: string;
|
|
4
4
|
service?: string;
|
|
5
5
|
}
|
|
6
|
+
export interface BlueskyImage {
|
|
7
|
+
/** Base64-encoded image bytes. Max 4 per post (AT Proto's own limit). */
|
|
8
|
+
content: string;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
}
|
|
6
12
|
export declare class BlueskyService {
|
|
7
13
|
private agent;
|
|
8
14
|
private identifier;
|
|
@@ -10,7 +16,7 @@ export declare class BlueskyService {
|
|
|
10
16
|
private loggedIn;
|
|
11
17
|
constructor(credentials?: BlueskyCredentials);
|
|
12
18
|
private ensureLoggedIn;
|
|
13
|
-
createPost(text: string): Promise<{
|
|
19
|
+
createPost(text: string, images?: BlueskyImage[]): Promise<{
|
|
14
20
|
uri: string;
|
|
15
21
|
cid: string;
|
|
16
22
|
}>;
|
|
@@ -29,9 +29,24 @@ export class BlueskyService {
|
|
|
29
29
|
this.loggedIn = true;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
async createPost(text) {
|
|
32
|
+
async createPost(text, images) {
|
|
33
33
|
await this.ensureLoggedIn();
|
|
34
|
-
|
|
34
|
+
if (!images?.length) {
|
|
35
|
+
return this.agent.post({ text });
|
|
36
|
+
}
|
|
37
|
+
// AT Proto has no "attach a URL" shortcut — every image is a blob uploaded to
|
|
38
|
+
// the user's own PDS first, then referenced by its returned blob ref in the post.
|
|
39
|
+
const embedImages = await Promise.all(images.slice(0, 4).map(async (image) => {
|
|
40
|
+
const buffer = Buffer.from(image.content, "base64");
|
|
41
|
+
const { data } = await this.agent.uploadBlob(buffer, {
|
|
42
|
+
encoding: image.mimeType,
|
|
43
|
+
});
|
|
44
|
+
return { image: data.blob, alt: image.alt ?? "" };
|
|
45
|
+
}));
|
|
46
|
+
return this.agent.post({
|
|
47
|
+
text,
|
|
48
|
+
embed: { $type: "app.bsky.embed.images", images: embedImages },
|
|
49
|
+
});
|
|
35
50
|
}
|
|
36
51
|
async replyToPost(text, parentUri, parentCid, rootUri, rootCid) {
|
|
37
52
|
await this.ensureLoggedIn();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bluesky-service.js","sourceRoot":"","sources":["../../src/services/bluesky-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"bluesky-service.js","sourceRoot":"","sources":["../../src/services/bluesky-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAepD,MAAM,OAAO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C,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAe,EAAE,OAAe;QAC9C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAc;QAC9B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9D,OAAO,MAAM,CAAC,IAAI,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;QAC1C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YACzD,CAAC,EAAE,KAAK;YACR,KAAK;SACL,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC;IACpB,CAAC;CACD;AAED,IAAI,SAAqC,CAAC;AAC1C,MAAM,UAAU,iBAAiB;IAChC,IAAI,CAAC,SAAS;QAAE,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC;IACjD,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
+
export interface DiscordFileAttachment {
|
|
2
|
+
filename: string;
|
|
3
|
+
/** Base64-encoded file contents. */
|
|
4
|
+
content: string;
|
|
5
|
+
contentType?: string;
|
|
6
|
+
}
|
|
1
7
|
export interface DiscordCredentials {
|
|
2
8
|
botToken: string;
|
|
9
|
+
/** Routes API calls through this proxy (e.g. per-tenant IP isolation). */
|
|
10
|
+
proxyUrl?: string;
|
|
3
11
|
}
|
|
4
12
|
export declare class DiscordService {
|
|
5
13
|
private baseUrl;
|
|
6
14
|
private headers;
|
|
15
|
+
private dispatcher?;
|
|
7
16
|
constructor(credentials?: DiscordCredentials);
|
|
8
|
-
sendMessage(channelId: string, content: string): Promise<{
|
|
17
|
+
sendMessage(channelId: string, content: string, attachments?: DiscordFileAttachment[]): Promise<{
|
|
9
18
|
id: string;
|
|
10
19
|
channel_id: string;
|
|
11
20
|
content: string;
|
|
12
21
|
timestamp: string;
|
|
22
|
+
attachments?: {
|
|
23
|
+
id: string;
|
|
24
|
+
filename: string;
|
|
25
|
+
url: string;
|
|
26
|
+
content_type?: string | undefined;
|
|
27
|
+
size?: number | undefined;
|
|
28
|
+
}[] | undefined;
|
|
13
29
|
}>;
|
|
14
30
|
getMessages(channelId: string, limit?: number): Promise<{
|
|
15
31
|
id: string;
|
|
16
32
|
channel_id: string;
|
|
17
33
|
content: string;
|
|
18
34
|
timestamp: string;
|
|
35
|
+
attachments?: {
|
|
36
|
+
id: string;
|
|
37
|
+
filename: string;
|
|
38
|
+
url: string;
|
|
39
|
+
content_type?: string | undefined;
|
|
40
|
+
size?: number | undefined;
|
|
41
|
+
}[] | undefined;
|
|
19
42
|
}[]>;
|
|
20
43
|
}
|
|
21
44
|
export declare function getDiscordService(): DiscordService;
|