planpost-mcp 0.2.0 → 0.2.1
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 +8 -0
- package/dist/index.js +9 -4
- package/package.json +4 -7
package/README.md
CHANGED
|
@@ -42,6 +42,12 @@ The server can also run as a shared, multi-tenant HTTP endpoint — no local ins
|
|
|
42
42
|
npx -y planpost-mcp --http --port 3020 # exposes POST /mcp (+ /health)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
Behind a reverse proxy, bind to loopback so the port isn't reachable directly:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
HOST=127.0.0.1 npx -y planpost-mcp --http --port 3020
|
|
49
|
+
```
|
|
50
|
+
|
|
45
51
|
Connect from any HTTP-capable MCP client, e.g.:
|
|
46
52
|
|
|
47
53
|
```bash
|
|
@@ -51,6 +57,8 @@ claude mcp add --transport http planpost https://mcp.yourhost.com/mcp \
|
|
|
51
57
|
|
|
52
58
|
The transport is stateless (streamable HTTP); the `Authorization: Bearer pk_...` header is required on every request and scoped per request, so one hosted instance serves many users safely. Put it behind HTTPS (reverse proxy) in production.
|
|
53
59
|
|
|
60
|
+
`--host` / `HOST` default to `0.0.0.0`, so containers and LAN use work without extra flags.
|
|
61
|
+
|
|
54
62
|
### 3. Talk to it
|
|
55
63
|
|
|
56
64
|
> "Schedule this post to my Polish Pages group for tomorrow 9:00: …"
|
package/dist/index.js
CHANGED
|
@@ -813,7 +813,7 @@ function readBody(req) {
|
|
|
813
813
|
* (e.g. `claude mcp add --transport http planpost https://host/mcp --header
|
|
814
814
|
* "Authorization: Bearer pk_..."`) at it without local installs.
|
|
815
815
|
*/
|
|
816
|
-
async function startHttp(port) {
|
|
816
|
+
async function startHttp(port, host) {
|
|
817
817
|
const httpServer = createHttpServer(async (req, res) => {
|
|
818
818
|
const fail = (status, message) => {
|
|
819
819
|
res.writeHead(status, { "Content-Type": "application/json" });
|
|
@@ -855,8 +855,8 @@ async function startHttp(port) {
|
|
|
855
855
|
fail(500, "Internal error");
|
|
856
856
|
}
|
|
857
857
|
});
|
|
858
|
-
httpServer.listen(port, () => {
|
|
859
|
-
console.log(`planpost-mcp listening on http
|
|
858
|
+
httpServer.listen(port, host, () => {
|
|
859
|
+
console.log(`planpost-mcp listening on http://${host}:${port}/mcp (streamable HTTP, stateless)`);
|
|
860
860
|
});
|
|
861
861
|
}
|
|
862
862
|
async function main() {
|
|
@@ -864,7 +864,12 @@ async function main() {
|
|
|
864
864
|
if (args.includes("--http")) {
|
|
865
865
|
const portArg = args[args.indexOf("--port") + 1];
|
|
866
866
|
const port = Number(portArg) || Number(process.env.PORT) || 3020;
|
|
867
|
-
|
|
867
|
+
// Defaults to all interfaces so `--http` works in a container or on a LAN
|
|
868
|
+
// without extra flags. Behind a reverse proxy set HOST=127.0.0.1 so the
|
|
869
|
+
// port isn't reachable except through the proxy.
|
|
870
|
+
const hostArg = args.includes("--host") ? args[args.indexOf("--host") + 1] : undefined;
|
|
871
|
+
const host = hostArg || process.env.HOST || "0.0.0.0";
|
|
872
|
+
await startHttp(port, host);
|
|
868
873
|
return;
|
|
869
874
|
}
|
|
870
875
|
await startStdio();
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "planpost-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"//mcpName": "Ownership marker for the official MCP Registry: must equal `name` in server.json, or publishing fails validation.",
|
|
5
|
+
"mcpName": "st.planpo/mcp",
|
|
4
6
|
"description": "PlanPost MCP server — let Claude and other AI agents schedule posts, manage social media, create videos and carousels, and read analytics via the PlanPost public API",
|
|
5
7
|
"license": "MIT",
|
|
6
8
|
"type": "module",
|
|
@@ -17,12 +19,7 @@
|
|
|
17
19
|
"engines": {
|
|
18
20
|
"node": ">=18"
|
|
19
21
|
},
|
|
20
|
-
"homepage": "https://planpo.st",
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/lukBB/social-poster-v2.git",
|
|
24
|
-
"directory": "packages/mcp-server"
|
|
25
|
-
},
|
|
22
|
+
"homepage": "https://planpo.st/agent",
|
|
26
23
|
"keywords": [
|
|
27
24
|
"mcp",
|
|
28
25
|
"model-context-protocol",
|