moltbook-http-mcp 1.2.0 → 1.2.2

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.
Files changed (2) hide show
  1. package/dist/cli.js +1 -1
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";import{loadEnv as o}from"./utils/env.js";o();import s from"yargs";import{hideBin as i}from"yargs/helpers";import{startServer as a,startStdioServer as n}from"./index.js";import{getMCP_HTTPS_CERT_PATH as p,getMCP_HTTPS_KEY_PATH as c}from"./utils/env.js";const e=s(i(process.argv)).options({port:{type:"number",default:3003,alias:"p",describe:"Port for MCP HTTP server"},stdio:{type:"boolean",default:!1,describe:"Run MCP over stdin/stdout (for Cursor moltcli / subprocess)"},auth:{type:"boolean",default:!1,describe:"Require JWT auth on POST /mcp"},key:{type:"string",describe:"Path to TLS private key PEM (enables HTTPS with --cert)"},cert:{type:"string",describe:"Path to TLS certificate PEM (enables HTTPS with --key)"}}).help().alias("h","help").parseSync();e.help&&process.exit(0);const d=e.stdio||!process.stdin.isTTY;if(d)n({}).catch(r=>{console.error("MCP stdio server error:",r),process.exit(1)});else{const r=(e.key??c())||void 0,t=(e.cert??p())||void 0;a({mcpPort:e.port,auth:e.auth,keyPath:r||void 0,certPath:t||void 0})}
2
+ "use strict";import{loadEnv as o}from"./utils/env.js";o();import i from"yargs";import{hideBin as a}from"yargs/helpers";import{startServer as n,startStdioServer as p}from"./index.js";import{getMCP_HTTPS_CERT_PATH as c,getMCP_HTTPS_KEY_PATH as d}from"./utils/env.js";const r=process.env.PORT?parseInt(process.env.PORT,10):3003,e=i(a(process.argv)).options({port:{type:"number",default:Number.isNaN(r)?3003:r,alias:"p",describe:"Port for MCP HTTP server (default: PORT env or 3003)"},stdio:{type:"boolean",describe:"Run MCP over stdin/stdout. Default: true when stdin is not a TTY (subprocess), else false. Use --no-stdio to force HTTP server."},auth:{type:"boolean",default:!1,describe:"Require JWT auth on POST /mcp"},key:{type:"string",describe:"Path to TLS private key PEM (enables HTTPS with --cert)"},cert:{type:"string",describe:"Path to TLS certificate PEM (enables HTTPS with --key)"}}).help().alias("h","help").parseSync();e.help&&process.exit(0);const P=e.stdio===!1?!1:e.stdio===!0?!0:!process.stdin.isTTY;if(P)p({}).catch(t=>{console.error("MCP stdio server error:",t),process.exit(1)});else{const t=(e.key??d())||void 0,s=(e.cert??c())||void 0;n({mcpPort:e.port,auth:e.auth,keyPath:t||void 0,certPath:s||void 0})}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltbook-http-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Moltbook MCP server: post, comment, upvote, DMs, communities. API key auth.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -32,7 +32,7 @@
32
32
  "build": "npm run build:types && npm run build:ts",
33
33
  "build:ts": "esbuild src/**/*.ts src/*.ts --outdir=dist --platform=node --minify",
34
34
  "build:types": "tsc --emitDeclarationOnly",
35
- "start": "node dist/cli.js"
35
+ "start": "node dist/cli.js --stdio=false"
36
36
  },
37
37
  "dependencies": {
38
38
  "@modelcontextprotocol/sdk": "1.25.3",