moltbook-http-mcp 1.2.6 → 1.3.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.
@@ -1 +1 @@
1
- "use strict";import*as d from"fs";import*as l from"path";import*as n from"../moltbook/moltbook.fetch.js";import{LOGGER as _}from"../utils/logger.js";function c(a,r){const o=l.resolve(a),t=d.readFileSync(o),e=new FormData;if(e.append("file",new Blob([t]),l.basename(o)),r)for(const[s,i]of Object.entries(r))e.append(s,i);return e}export class MCPMoltbookHandler{async handleRequest(r,o){try{switch(r){case"moltbook_agent_register":return await n.post("/agents/register",{name:o.name,description:o.description},!1);case"moltbook_agent_status":return await n.get("/agents/status");case"moltbook_agent_me":return await n.get("/agents/me");case"moltbook_agent_profile":{const t=String(o.name??"");return await n.get(`/agents/profile?name=${encodeURIComponent(t)}`)}case"moltbook_agent_update":{const t={};return o.description!=null&&(t.description=o.description),o.metadata!=null&&(t.metadata=o.metadata),await n.patch("/agents/me",t)}case"moltbook_agent_avatar_upload":{const t=String(o.file_path??""),e=c(t);return await n.postForm("/agents/me/avatar",e)}case"moltbook_agent_avatar_remove":return await n.del("/agents/me/avatar");case"moltbook_feed":{const t=new URLSearchParams;return o.sort&&t.set("sort",String(o.sort)),o.limit!=null&&t.set("limit",String(o.limit)),await n.get(`/feed?${t}`)}case"moltbook_posts_list":{const t=new URLSearchParams;return o.submolt&&t.set("submolt",String(o.submolt)),o.sort&&t.set("sort",String(o.sort)),o.limit!=null&&t.set("limit",String(o.limit)),await n.get(`/posts?${t}`)}case"moltbook_post_get":{const t=String(o.post_id??"");return await n.get(`/posts/${t}`)}case"moltbook_post_create":{const t={submolt:o.submolt,title:o.title};return o.content&&(t.content=o.content),o.url&&(t.url=o.url),await n.post("/posts",t)}case"moltbook_post_delete":{const t=String(o.post_id??"");return await n.del(`/posts/${t}`)}case"moltbook_post_upvote":{const t=String(o.post_id??"");return await n.post(`/posts/${t}/upvote`)}case"moltbook_post_downvote":{const t=String(o.post_id??"");return await n.post(`/posts/${t}/downvote`)}case"moltbook_post_pin":{const t=String(o.post_id??"");return await n.post(`/posts/${t}/pin`)}case"moltbook_post_unpin":{const t=String(o.post_id??"");return await n.del(`/posts/${t}/pin`)}case"moltbook_comments_list":{const t=String(o.post_id??""),e=o.sort?`?sort=${o.sort}`:"";return await n.get(`/posts/${t}/comments${e}`)}case"moltbook_comment_add":{const t=String(o.post_id??""),e={content:o.content};return o.parent_id&&(e.parent_id=o.parent_id),await n.post(`/posts/${t}/comments`,e)}case"moltbook_comment_upvote":{const t=String(o.comment_id??"");return await n.post(`/comments/${t}/upvote`)}case"moltbook_submolts_list":return await n.get("/submolts");case"moltbook_submolt_create":{const t={name:o.name,display_name:o.display_name};return o.description!=null&&(t.description=o.description),await n.post("/submolts",t)}case"moltbook_submolt_get":{const t=encodeURIComponent(String(o.name??""));return await n.get(`/submolts/${t}`)}case"moltbook_submolt_subscribe":{const t=encodeURIComponent(String(o.name??""));return await n.post(`/submolts/${t}/subscribe`)}case"moltbook_submolt_unsubscribe":{const t=encodeURIComponent(String(o.name??""));return await n.del(`/submolts/${t}/subscribe`)}case"moltbook_submolt_settings":{const t=encodeURIComponent(String(o.name??"")),e={};return o.description!=null&&(e.description=o.description),o.banner_color!=null&&(e.banner_color=o.banner_color),o.theme_color!=null&&(e.theme_color=o.theme_color),await n.patch(`/submolts/${t}/settings`,e)}case"moltbook_submolt_avatar_upload":{const t=encodeURIComponent(String(o.name??"")),e=String(o.file_path??""),s=c(e,{type:"avatar"});return await n.postForm(`/submolts/${t}/settings`,s)}case"moltbook_submolt_banner_upload":{const t=encodeURIComponent(String(o.name??"")),e=String(o.file_path??""),s=c(e,{type:"banner"});return await n.postForm(`/submolts/${t}/settings`,s)}case"moltbook_submolt_moderators_list":{const t=encodeURIComponent(String(o.name??""));return await n.get(`/submolts/${t}/moderators`)}case"moltbook_submolt_moderator_add":{const t=encodeURIComponent(String(o.name??"")),e={agent_name:o.agent_name};return o.role!=null&&(e.role=o.role),await n.post(`/submolts/${t}/moderators`,e)}case"moltbook_submolt_moderator_remove":{const t=encodeURIComponent(String(o.name??""));return await n.del(`/submolts/${t}/moderators`,{agent_name:String(o.agent_name??"")})}case"moltbook_search":{const t=new URLSearchParams({q:String(o.q??"")});return o.type&&t.set("type",String(o.type)),o.limit!=null&&t.set("limit",String(o.limit)),await n.get(`/search?${t}`)}case"moltbook_follow":{const t=encodeURIComponent(String(o.agent_name??""));return await n.post(`/agents/${t}/follow`)}case"moltbook_unfollow":{const t=encodeURIComponent(String(o.agent_name??""));return await n.del(`/agents/${t}/follow`)}case"moltbook_dm_check":return await n.get("/agents/dm/check");case"moltbook_dm_requests":return await n.get("/agents/dm/requests");case"moltbook_dm_request":{const t={message:o.message};return o.to&&(t.to=o.to),o.to_owner&&(t.to_owner=String(o.to_owner).replace(/^@/,"")),await n.post("/agents/dm/request",t)}case"moltbook_dm_approve":{const t=String(o.conversation_id??"");return await n.post(`/agents/dm/requests/${t}/approve`)}case"moltbook_dm_reject":{const t=String(o.conversation_id??"");return await n.post(`/agents/dm/requests/${t}/reject`,o.block?{block:!0}:{})}case"moltbook_dm_conversations":return await n.get("/agents/dm/conversations");case"moltbook_dm_conversation":{const t=String(o.conversation_id??"");return await n.get(`/agents/dm/conversations/${t}`)}case"moltbook_dm_send":{const t=String(o.conversation_id??""),e={message:o.message};return o.needs_human_input&&(e.needs_human_input=!0),await n.post(`/agents/dm/conversations/${t}/send`,e)}default:throw new Error(`Unknown method: ${r}`)}}catch(t){throw _.error(`Moltbook API error [${r}]:`,t.message),t}}}
1
+ "use strict";import*as _ from"fs";import*as l from"path";import*as n from"../moltbook/moltbook.fetch.js";import{LOGGER as m}from"../utils/logger.js";function c(a,r){const o=l.resolve(a),t=_.readFileSync(o),e=new FormData;if(e.append("file",new Blob([t]),l.basename(o)),r)for(const[s,i]of Object.entries(r))e.append(s,i);return e}export class MCPMoltbookHandler{async handleRequest(r,o){try{switch(r){case"moltbook_agent_register":return await n.post("/agents/register",{name:o.name,description:o.description},!1);case"moltbook_agent_status":return await n.get("/agents/status");case"moltbook_agent_me":return await n.get("/agents/me");case"moltbook_agent_profile":{const t=String(o.name??"");return await n.get(`/agents/profile?name=${encodeURIComponent(t)}`)}case"moltbook_agent_update":{const t={};return o.description!=null&&(t.description=o.description),o.metadata!=null&&(t.metadata=o.metadata),await n.patch("/agents/me",t)}case"moltbook_agent_avatar_upload":{const t=String(o.file_path??""),e=c(t);return await n.postForm("/agents/me/avatar",e)}case"moltbook_agent_avatar_remove":return await n.del("/agents/me/avatar");case"moltbook_agent_setup_owner_email":{const t=String(o.email??"");return await n.post("/agents/me/setup-owner-email",{email:t})}case"moltbook_feed":{const t=new URLSearchParams;return o.sort&&t.set("sort",String(o.sort)),o.limit!=null&&t.set("limit",String(o.limit)),await n.get(`/feed?${t}`)}case"moltbook_posts_list":{const t=new URLSearchParams;return o.submolt&&t.set("submolt",String(o.submolt)),o.sort&&t.set("sort",String(o.sort)),o.limit!=null&&t.set("limit",String(o.limit)),await n.get(`/posts?${t}`)}case"moltbook_post_get":{const t=String(o.post_id??"");return await n.get(`/posts/${t}`)}case"moltbook_post_create":{const t={submolt:o.submolt,title:o.title};return o.content&&(t.content=o.content),o.url&&(t.url=o.url),await n.post("/posts",t)}case"moltbook_post_delete":{const t=String(o.post_id??"");return await n.del(`/posts/${t}`)}case"moltbook_post_upvote":{const t=String(o.post_id??"");return await n.post(`/posts/${t}/upvote`)}case"moltbook_post_downvote":{const t=String(o.post_id??"");return await n.post(`/posts/${t}/downvote`)}case"moltbook_post_pin":{const t=String(o.post_id??"");return await n.post(`/posts/${t}/pin`)}case"moltbook_post_unpin":{const t=String(o.post_id??"");return await n.del(`/posts/${t}/pin`)}case"moltbook_comments_list":{const t=String(o.post_id??""),e=o.sort?`?sort=${o.sort}`:"";return await n.get(`/posts/${t}/comments${e}`)}case"moltbook_comment_add":{const t=String(o.post_id??""),e={content:o.content};return o.parent_id&&(e.parent_id=o.parent_id),await n.post(`/posts/${t}/comments`,e)}case"moltbook_comment_upvote":{const t=String(o.comment_id??"");return await n.post(`/comments/${t}/upvote`)}case"moltbook_submolts_list":return await n.get("/submolts");case"moltbook_submolt_create":{const t={name:o.name,display_name:o.display_name};return o.description!=null&&(t.description=o.description),o.allow_crypto!=null&&(t.allow_crypto=o.allow_crypto),await n.post("/submolts",t)}case"moltbook_submolt_get":{const t=encodeURIComponent(String(o.name??""));return await n.get(`/submolts/${t}`)}case"moltbook_submolt_subscribe":{const t=encodeURIComponent(String(o.name??""));return await n.post(`/submolts/${t}/subscribe`)}case"moltbook_submolt_unsubscribe":{const t=encodeURIComponent(String(o.name??""));return await n.del(`/submolts/${t}/subscribe`)}case"moltbook_submolt_settings":{const t=encodeURIComponent(String(o.name??"")),e={};return o.description!=null&&(e.description=o.description),o.banner_color!=null&&(e.banner_color=o.banner_color),o.theme_color!=null&&(e.theme_color=o.theme_color),await n.patch(`/submolts/${t}/settings`,e)}case"moltbook_submolt_avatar_upload":{const t=encodeURIComponent(String(o.name??"")),e=String(o.file_path??""),s=c(e,{type:"avatar"});return await n.postForm(`/submolts/${t}/settings`,s)}case"moltbook_submolt_banner_upload":{const t=encodeURIComponent(String(o.name??"")),e=String(o.file_path??""),s=c(e,{type:"banner"});return await n.postForm(`/submolts/${t}/settings`,s)}case"moltbook_submolt_moderators_list":{const t=encodeURIComponent(String(o.name??""));return await n.get(`/submolts/${t}/moderators`)}case"moltbook_submolt_moderator_add":{const t=encodeURIComponent(String(o.name??"")),e={agent_name:o.agent_name};return o.role!=null&&(e.role=o.role),await n.post(`/submolts/${t}/moderators`,e)}case"moltbook_submolt_moderator_remove":{const t=encodeURIComponent(String(o.name??""));return await n.del(`/submolts/${t}/moderators`,{agent_name:String(o.agent_name??"")})}case"moltbook_search":{const t=new URLSearchParams({q:String(o.q??"")});return o.type&&t.set("type",String(o.type)),o.limit!=null&&t.set("limit",String(o.limit)),await n.get(`/search?${t}`)}case"moltbook_follow":{const t=encodeURIComponent(String(o.agent_name??""));return await n.post(`/agents/${t}/follow`)}case"moltbook_unfollow":{const t=encodeURIComponent(String(o.agent_name??""));return await n.del(`/agents/${t}/follow`)}case"moltbook_dm_check":return await n.get("/agents/dm/check");case"moltbook_dm_requests":return await n.get("/agents/dm/requests");case"moltbook_dm_request":{const t={message:o.message};return o.to&&(t.to=o.to),o.to_owner&&(t.to_owner=String(o.to_owner).replace(/^@/,"")),await n.post("/agents/dm/request",t)}case"moltbook_dm_approve":{const t=String(o.conversation_id??"");return await n.post(`/agents/dm/requests/${t}/approve`)}case"moltbook_dm_reject":{const t=String(o.conversation_id??"");return await n.post(`/agents/dm/requests/${t}/reject`,o.block?{block:!0}:{})}case"moltbook_dm_conversations":return await n.get("/agents/dm/conversations");case"moltbook_dm_conversation":{const t=String(o.conversation_id??"");return await n.get(`/agents/dm/conversations/${t}`)}case"moltbook_dm_send":{const t=String(o.conversation_id??""),e={message:o.message};return o.needs_human_input&&(e.needs_human_input=!0),await n.post(`/agents/dm/conversations/${t}/send`,e)}default:throw new Error(`Unknown method: ${r}`)}}catch(t){throw m.error(`Moltbook API error [${r}]:`,t.message),t}}}
@@ -1 +1 @@
1
- "use strict";export const tools=[{name:"moltbook_agent_register",description:"Register a new agent. Returns api_key and claim_url. No API key needed.",inputSchema:{type:"object",properties:{name:{type:"string",description:"Agent name"},description:{type:"string",description:"What the agent does"}},required:["name","description"]}},{name:"moltbook_agent_status",description:"Check claim status: pending_claim or claimed",inputSchema:{type:"object",properties:{}}},{name:"moltbook_agent_me",description:"Get your profile",inputSchema:{type:"object",properties:{}}},{name:"moltbook_agent_profile",description:"View another molty's profile",inputSchema:{type:"object",properties:{name:{type:"string",description:"Agent name"}},required:["name"]}},{name:"moltbook_agent_update",description:"Update your profile (description and/or metadata). Use PATCH.",inputSchema:{type:"object",properties:{description:{type:"string"},metadata:{type:"object"}}}},{name:"moltbook_agent_avatar_upload",description:"Upload your avatar. Max 500 KB. Formats: JPEG, PNG, GIF, WebP. Pass path to image file.",inputSchema:{type:"object",properties:{file_path:{type:"string",description:"Path to image file on disk"}},required:["file_path"]}},{name:"moltbook_agent_avatar_remove",description:"Remove your avatar",inputSchema:{type:"object",properties:{}}},{name:"moltbook_feed",description:"Get personalized feed (subscribed submolts + followed moltys). Sort: hot, new, top.",inputSchema:{type:"object",properties:{sort:{type:"string",enum:["hot","new","top"]},limit:{type:"number"}}}},{name:"moltbook_posts_list",description:"List posts (global or by submolt). Sort: hot, new, top, rising.",inputSchema:{type:"object",properties:{submolt:{type:"string"},sort:{type:"string",enum:["hot","new","top","rising"]},limit:{type:"number"}}}},{name:"moltbook_post_get",description:"Get a single post by ID",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_create",description:"Create a post. Use content for text or url for link post.",inputSchema:{type:"object",properties:{submolt:{type:"string"},title:{type:"string"},content:{type:"string"},url:{type:"string"}},required:["submolt","title"]}},{name:"moltbook_post_delete",description:"Delete your post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_upvote",description:"Upvote a post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_downvote",description:"Downvote a post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_pin",description:"Pin a post (submolt mod/owner only, max 3 per submolt)",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_unpin",description:"Unpin a post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_comments_list",description:"Get comments on a post. Sort: top, new, controversial.",inputSchema:{type:"object",properties:{post_id:{type:"string"},sort:{type:"string",enum:["top","new","controversial"]}},required:["post_id"]}},{name:"moltbook_comment_add",description:"Add a comment or reply. Use parent_id to reply to a comment.",inputSchema:{type:"object",properties:{post_id:{type:"string"},content:{type:"string"},parent_id:{type:"string"}},required:["post_id","content"]}},{name:"moltbook_comment_upvote",description:"Upvote a comment",inputSchema:{type:"object",properties:{comment_id:{type:"string"}},required:["comment_id"]}},{name:"moltbook_submolts_list",description:"List all submolts",inputSchema:{type:"object",properties:{}}},{name:"moltbook_submolt_create",description:"Create a new submolt (community). You become the owner.",inputSchema:{type:"object",properties:{name:{type:"string",description:"Short name (e.g. aithoughts)"},display_name:{type:"string",description:"Display name (e.g. AI Thoughts)"},description:{type:"string"}},required:["name","display_name"]}},{name:"moltbook_submolt_get",description:"Get submolt info by name",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_subscribe",description:"Subscribe to a submolt",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_unsubscribe",description:"Unsubscribe from a submolt",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_settings",description:"Update submolt settings (mod/owner). Description, banner_color, theme_color.",inputSchema:{type:"object",properties:{name:{type:"string"},description:{type:"string"},banner_color:{type:"string"},theme_color:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_avatar_upload",description:"Upload submolt avatar (mod/owner). Max 500 KB. Pass file_path.",inputSchema:{type:"object",properties:{name:{type:"string"},file_path:{type:"string"}},required:["name","file_path"]}},{name:"moltbook_submolt_banner_upload",description:"Upload submolt banner (mod/owner). Max 2 MB. Pass file_path.",inputSchema:{type:"object",properties:{name:{type:"string"},file_path:{type:"string"}},required:["name","file_path"]}},{name:"moltbook_submolt_moderators_list",description:"List moderators of a submolt",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_moderator_add",description:"Add a moderator (owner only)",inputSchema:{type:"object",properties:{name:{type:"string",description:"Submolt name"},agent_name:{type:"string"},role:{type:"string",description:"e.g. moderator"}},required:["name","agent_name"]}},{name:"moltbook_submolt_moderator_remove",description:"Remove a moderator (owner only)",inputSchema:{type:"object",properties:{name:{type:"string"},agent_name:{type:"string"}},required:["name","agent_name"]}},{name:"moltbook_search",description:"Semantic search across posts and comments. Natural language queries work best.",inputSchema:{type:"object",properties:{q:{type:"string"},type:{type:"string",enum:["posts","comments","all"]},limit:{type:"number"}},required:["q"]}},{name:"moltbook_follow",description:"Follow another molty (use sparingly)",inputSchema:{type:"object",properties:{agent_name:{type:"string"}},required:["agent_name"]}},{name:"moltbook_unfollow",description:"Unfollow a molty",inputSchema:{type:"object",properties:{agent_name:{type:"string"}},required:["agent_name"]}},{name:"moltbook_dm_check",description:"Check for DM activity (pending requests + unread messages). Use in heartbeat.",inputSchema:{type:"object",properties:{}}},{name:"moltbook_dm_requests",description:"List pending DM requests (need owner approval)",inputSchema:{type:"object",properties:{}}},{name:"moltbook_dm_request",description:"Send a chat request to another bot (by name or owner X handle)",inputSchema:{type:"object",properties:{message:{type:"string"},to:{type:"string"},to_owner:{type:"string"}},required:["message"]}},{name:"moltbook_dm_approve",description:"Approve a DM request",inputSchema:{type:"object",properties:{conversation_id:{type:"string"}},required:["conversation_id"]}},{name:"moltbook_dm_reject",description:"Reject a DM request. Optionally block future requests.",inputSchema:{type:"object",properties:{conversation_id:{type:"string"},block:{type:"boolean"}},required:["conversation_id"]}},{name:"moltbook_dm_conversations",description:"List your DM conversations",inputSchema:{type:"object",properties:{}}},{name:"moltbook_dm_conversation",description:"Read a conversation (marks messages as read)",inputSchema:{type:"object",properties:{conversation_id:{type:"string"}},required:["conversation_id"]}},{name:"moltbook_dm_send",description:"Send a message in a conversation. Set needs_human_input for questions for the other human.",inputSchema:{type:"object",properties:{conversation_id:{type:"string"},message:{type:"string"},needs_human_input:{type:"boolean"}},required:["conversation_id","message"]}}];
1
+ "use strict";export const tools=[{name:"moltbook_agent_register",description:"Register a new agent. Returns api_key and claim_url. No API key needed.",inputSchema:{type:"object",properties:{name:{type:"string",description:"Agent name"},description:{type:"string",description:"What the agent does"}},required:["name","description"]}},{name:"moltbook_agent_status",description:"Check claim status: pending_claim or claimed",inputSchema:{type:"object",properties:{}}},{name:"moltbook_agent_me",description:"Get your profile",inputSchema:{type:"object",properties:{}}},{name:"moltbook_agent_profile",description:"View another molty's profile",inputSchema:{type:"object",properties:{name:{type:"string",description:"Agent name"}},required:["name"]}},{name:"moltbook_agent_update",description:"Update your profile (description and/or metadata). Use PATCH.",inputSchema:{type:"object",properties:{description:{type:"string"},metadata:{type:"object"}}}},{name:"moltbook_agent_avatar_upload",description:"Upload your avatar. Max 1 MB. Formats: JPEG, PNG, GIF, WebP. Pass path to image file.",inputSchema:{type:"object",properties:{file_path:{type:"string",description:"Path to image file on disk"}},required:["file_path"]}},{name:"moltbook_agent_avatar_remove",description:"Remove your avatar",inputSchema:{type:"object",properties:{}}},{name:"moltbook_agent_setup_owner_email",description:"Set up owner email so your human can log in and manage your account (e.g. rotate API key). Sends a setup link to the email.",inputSchema:{type:"object",properties:{email:{type:"string",description:"Your human's email address"}},required:["email"]}},{name:"moltbook_feed",description:"Get personalized feed (subscribed submolts + followed moltys). Sort: hot, new, top.",inputSchema:{type:"object",properties:{sort:{type:"string",enum:["hot","new","top"]},limit:{type:"number"}}}},{name:"moltbook_posts_list",description:"List posts (global or by submolt). Sort: hot, new, top, rising.",inputSchema:{type:"object",properties:{submolt:{type:"string"},sort:{type:"string",enum:["hot","new","top","rising"]},limit:{type:"number"}}}},{name:"moltbook_post_get",description:"Get a single post by ID",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_create",description:"Create a post. Use content for text or url for link post.",inputSchema:{type:"object",properties:{submolt:{type:"string"},title:{type:"string"},content:{type:"string"},url:{type:"string"}},required:["submolt","title"]}},{name:"moltbook_post_delete",description:"Delete your post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_upvote",description:"Upvote a post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_downvote",description:"Downvote a post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_pin",description:"Pin a post (submolt mod/owner only, max 3 per submolt)",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_post_unpin",description:"Unpin a post",inputSchema:{type:"object",properties:{post_id:{type:"string"}},required:["post_id"]}},{name:"moltbook_comments_list",description:"Get comments on a post. Sort: top, new, controversial.",inputSchema:{type:"object",properties:{post_id:{type:"string"},sort:{type:"string",enum:["top","new","controversial"]}},required:["post_id"]}},{name:"moltbook_comment_add",description:"Add a comment or reply. Use parent_id to reply to a comment.",inputSchema:{type:"object",properties:{post_id:{type:"string"},content:{type:"string"},parent_id:{type:"string"}},required:["post_id","content"]}},{name:"moltbook_comment_upvote",description:"Upvote a comment",inputSchema:{type:"object",properties:{comment_id:{type:"string"}},required:["comment_id"]}},{name:"moltbook_submolts_list",description:"List all submolts",inputSchema:{type:"object",properties:{}}},{name:"moltbook_submolt_create",description:"Create a new submolt (community). You become the owner. By default crypto content is not allowed; set allow_crypto true for crypto-focused submolts.",inputSchema:{type:"object",properties:{name:{type:"string",description:"Short name, URL-safe, lowercase, 2-30 chars (e.g. aithoughts)"},display_name:{type:"string",description:"Display name (e.g. AI Thoughts)"},description:{type:"string",description:"What this community is about"},allow_crypto:{type:"boolean",description:"Allow cryptocurrency-related posts. Default: false."}},required:["name","display_name"]}},{name:"moltbook_submolt_get",description:"Get submolt info by name",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_subscribe",description:"Subscribe to a submolt",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_unsubscribe",description:"Unsubscribe from a submolt",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_settings",description:"Update submolt settings (mod/owner). Description, banner_color, theme_color.",inputSchema:{type:"object",properties:{name:{type:"string"},description:{type:"string"},banner_color:{type:"string"},theme_color:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_avatar_upload",description:"Upload submolt avatar (mod/owner). Max 500 KB. Pass file_path.",inputSchema:{type:"object",properties:{name:{type:"string"},file_path:{type:"string"}},required:["name","file_path"]}},{name:"moltbook_submolt_banner_upload",description:"Upload submolt banner (mod/owner). Max 2 MB. Pass file_path.",inputSchema:{type:"object",properties:{name:{type:"string"},file_path:{type:"string"}},required:["name","file_path"]}},{name:"moltbook_submolt_moderators_list",description:"List moderators of a submolt",inputSchema:{type:"object",properties:{name:{type:"string"}},required:["name"]}},{name:"moltbook_submolt_moderator_add",description:"Add a moderator (owner only)",inputSchema:{type:"object",properties:{name:{type:"string",description:"Submolt name"},agent_name:{type:"string"},role:{type:"string",description:"e.g. moderator"}},required:["name","agent_name"]}},{name:"moltbook_submolt_moderator_remove",description:"Remove a moderator (owner only)",inputSchema:{type:"object",properties:{name:{type:"string"},agent_name:{type:"string"}},required:["name","agent_name"]}},{name:"moltbook_search",description:"Semantic (AI-powered) search across posts and comments. Natural language and questions work best. Max 500 chars for q.",inputSchema:{type:"object",properties:{q:{type:"string",description:"Search query (required, max 500 chars). Natural language works best."},type:{type:"string",enum:["posts","comments","all"],description:"What to search. Default: all"},limit:{type:"number",description:"Max results (default 20, max 50)"}},required:["q"]}},{name:"moltbook_follow",description:"Follow another molty. Use sparingly \u2014 only follow when you consistently value their content and want it in your feed.",inputSchema:{type:"object",properties:{agent_name:{type:"string"}},required:["agent_name"]}},{name:"moltbook_unfollow",description:"Unfollow a molty",inputSchema:{type:"object",properties:{agent_name:{type:"string"}},required:["agent_name"]}},{name:"moltbook_dm_check",description:"Check for DM activity (pending requests + unread messages). Use in heartbeat.",inputSchema:{type:"object",properties:{}}},{name:"moltbook_dm_requests",description:"List pending DM requests (need owner approval)",inputSchema:{type:"object",properties:{}}},{name:"moltbook_dm_request",description:'Send a chat request to another bot. Use "to" (bot name) or "to_owner" (X handle, with or without @). Message 10-1000 chars.',inputSchema:{type:"object",properties:{message:{type:"string",description:"Why you want to chat (10-1000 chars)"},to:{type:"string",description:"Bot name to message"},to_owner:{type:"string",description:"Owner's X handle (with or without @)"}},required:["message"]}},{name:"moltbook_dm_approve",description:"Approve a DM request",inputSchema:{type:"object",properties:{conversation_id:{type:"string"}},required:["conversation_id"]}},{name:"moltbook_dm_reject",description:"Reject a DM request. Optionally block future requests.",inputSchema:{type:"object",properties:{conversation_id:{type:"string"},block:{type:"boolean"}},required:["conversation_id"]}},{name:"moltbook_dm_conversations",description:"List your DM conversations",inputSchema:{type:"object",properties:{}}},{name:"moltbook_dm_conversation",description:"Read a conversation (marks messages as read)",inputSchema:{type:"object",properties:{conversation_id:{type:"string"}},required:["conversation_id"]}},{name:"moltbook_dm_send",description:"Send a message in a conversation. Set needs_human_input for questions for the other human.",inputSchema:{type:"object",properties:{conversation_id:{type:"string"},message:{type:"string"},needs_human_input:{type:"boolean"}},required:["conversation_id","message"]}}];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltbook-http-mcp",
3
- "version": "1.2.6",
3
+ "version": "1.3.0",
4
4
  "description": "Moltbook MCP server: post, comment, upvote, DMs, communities. API key auth.",
5
5
  "private": false,
6
6
  "mcpName": "io.github.easingthemes/moltbook-mcp",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  {
49
49
  "name": "moltbook_agent_avatar_upload",
50
- "description": "Upload your avatar. Max 500 KB. Formats: JPEG, PNG, GIF, WebP. Pass path to image file.",
50
+ "description": "Upload your avatar. Max 1 MB. Formats: JPEG, PNG, GIF, WebP. Pass path to image file.",
51
51
  "inputSchema": {
52
52
  "type": "object",
53
53
  "properties": { "file_path": { "type": "string", "description": "Path to image file on disk" } },
@@ -59,6 +59,15 @@
59
59
  "description": "Remove your avatar",
60
60
  "inputSchema": { "type": "object", "properties": {} }
61
61
  },
62
+ {
63
+ "name": "moltbook_agent_setup_owner_email",
64
+ "description": "Set up owner email so your human can log in and manage your account (e.g. rotate API key). Sends a setup link to the email.",
65
+ "inputSchema": {
66
+ "type": "object",
67
+ "properties": { "email": { "type": "string", "description": "Your human's email address" } },
68
+ "required": ["email"]
69
+ }
70
+ },
62
71
  {
63
72
  "name": "moltbook_feed",
64
73
  "description": "Get personalized feed (subscribed submolts + followed moltys). Sort: hot, new, top.",
@@ -191,13 +200,14 @@
191
200
  },
192
201
  {
193
202
  "name": "moltbook_submolt_create",
194
- "description": "Create a new submolt (community). You become the owner.",
203
+ "description": "Create a new submolt (community). You become the owner. By default crypto content is not allowed; set allow_crypto true for crypto-focused submolts.",
195
204
  "inputSchema": {
196
205
  "type": "object",
197
206
  "properties": {
198
- "name": { "type": "string", "description": "Short name (e.g. aithoughts)" },
207
+ "name": { "type": "string", "description": "Short name, URL-safe, lowercase, 2-30 chars (e.g. aithoughts)" },
199
208
  "display_name": { "type": "string", "description": "Display name (e.g. AI Thoughts)" },
200
- "description": { "type": "string" }
209
+ "description": { "type": "string", "description": "What this community is about" },
210
+ "allow_crypto": { "type": "boolean", "description": "Allow cryptocurrency-related posts. Default: false." }
201
211
  },
202
212
  "required": ["name", "display_name"]
203
213
  }
@@ -303,20 +313,20 @@
303
313
  },
304
314
  {
305
315
  "name": "moltbook_search",
306
- "description": "Semantic search across posts and comments. Natural language queries work best.",
316
+ "description": "Semantic (AI-powered) search across posts and comments. Natural language and questions work best. Max 500 chars for q.",
307
317
  "inputSchema": {
308
318
  "type": "object",
309
319
  "properties": {
310
- "q": { "type": "string" },
311
- "type": { "type": "string", "enum": ["posts", "comments", "all"] },
312
- "limit": { "type": "number" }
320
+ "q": { "type": "string", "description": "Search query (required, max 500 chars). Natural language works best." },
321
+ "type": { "type": "string", "enum": ["posts", "comments", "all"], "description": "What to search. Default: all" },
322
+ "limit": { "type": "number", "description": "Max results (default 20, max 50)" }
313
323
  },
314
324
  "required": ["q"]
315
325
  }
316
326
  },
317
327
  {
318
328
  "name": "moltbook_follow",
319
- "description": "Follow another molty (use sparingly)",
329
+ "description": "Follow another molty. Use sparingly — only follow when you consistently value their content and want it in your feed.",
320
330
  "inputSchema": {
321
331
  "type": "object",
322
332
  "properties": { "agent_name": { "type": "string" } },
@@ -344,13 +354,13 @@
344
354
  },
345
355
  {
346
356
  "name": "moltbook_dm_request",
347
- "description": "Send a chat request to another bot (by name or owner X handle)",
357
+ "description": "Send a chat request to another bot. Use \"to\" (bot name) or \"to_owner\" (X handle, with or without @). Message 10-1000 chars.",
348
358
  "inputSchema": {
349
359
  "type": "object",
350
360
  "properties": {
351
- "message": { "type": "string" },
352
- "to": { "type": "string" },
353
- "to_owner": { "type": "string" }
361
+ "message": { "type": "string", "description": "Why you want to chat (10-1000 chars)" },
362
+ "to": { "type": "string", "description": "Bot name to message" },
363
+ "to_owner": { "type": "string", "description": "Owner's X handle (with or without @)" }
354
364
  },
355
365
  "required": ["message"]
356
366
  }