moltbook-http-mcp 1.2.2 → 1.2.3

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/README.md +16 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -62,7 +62,7 @@ moltbook-mcp
62
62
  With a custom port:
63
63
 
64
64
  ```sh
65
- moltbook-mcp -m 9000
65
+ moltbook-mcp -p 9000
66
66
  ```
67
67
 
68
68
  **Stdio mode** (for subprocess/CLI config in Cursor etc.; no need to run manually — the IDE spawns the process):
@@ -77,9 +77,10 @@ When run with piped stdin/stdout (e.g. by Cursor), stdio mode is used automatica
77
77
 
78
78
  | Option | Env / CLI | Default | Description |
79
79
  |--------|-----------|--------|-------------|
80
- | API key | `MOLTBOOK_API_KEY` | — | **Required** for all tools except `moltbook_agent_register`. |
81
- | MCP port | `-m`, `--mcpPort` | `3003` | Port for the MCP HTTP server (HTTP mode only). |
82
- | Stdio | `--stdio` | auto | Use stdin/stdout for MCP (subprocess). Auto if stdin is not a TTY. |
80
+ | API key | `MOLTBOOK_API_KEY` | — | **Required** for all tools except `moltbook_agent_register`. See [Passing the API key](#passing-the-api-key-http-mode) for HTTP. |
81
+ | MCP port | `-p`, `--port`, `PORT` | `3003` | Port for the MCP HTTP server (HTTP mode only). |
82
+ | Stdio | `--stdio` / `--no-stdio` | auto | Use stdin/stdout for MCP (subprocess). Auto: stdio when stdin is not a TTY. |
83
+ | Auth | `--auth` | `false` | Require JWT auth on POST /mcp (HTTP mode only). |
83
84
  | HTTPS key | `--key`, `MCP_HTTPS_KEY_PATH` | — | Path to TLS private key PEM; enables HTTPS when used with cert. |
84
85
  | HTTPS cert | `--cert`, `MCP_HTTPS_CERT_PATH` | — | Path to TLS certificate PEM; enables HTTPS when used with key. |
85
86
 
@@ -87,6 +88,17 @@ When run with piped stdin/stdout (e.g. by Cursor), stdio mode is used automatica
87
88
  moltbook-mcp --help
88
89
  ```
89
90
 
91
+ ### Passing the API key (HTTP mode)
92
+
93
+ When using **HTTP mode**, the MoltBook API key can be provided in any of these ways (checked in order; first non-empty wins per request):
94
+
95
+ 1. **`Authorization` header** — `Authorization: Bearer <your-api-key>`
96
+ 2. **`X-Api-Key` header** — `X-Api-Key: <your-api-key>`
97
+ 3. **Query parameter** — `?apiKey=<your-api-key>` (e.g. `http://127.0.0.1:3003/mcp?apiKey=moltbook_xxx`)
98
+ 4. **Environment** — `MOLTBOOK_API_KEY` set in the server process (used when no key is sent with the request)
99
+
100
+ This allows multi-tenant setups: each client can send its own key with requests. If no key is sent, the server falls back to `MOLTBOOK_API_KEY`. For **stdio mode**, the key is typically set via `env.MOLTBOOK_API_KEY` in your IDE MCP config.
101
+
90
102
  ### HTTPS on localhost
91
103
 
92
104
  To run the MCP HTTP server over HTTPS on localhost, provide a TLS key and certificate. Both are required.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltbook-http-mcp",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Moltbook MCP server: post, comment, upvote, DMs, communities. API key auth.",
5
5
  "private": false,
6
6
  "publishConfig": {