postmd-mcp-server 2.1.0 → 2.1.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 CHANGED
@@ -73,19 +73,21 @@ For uploads: either pass the full Markdown as the `markdown` argument, or pass a
73
73
 
74
74
  ## Quickstart
75
75
 
76
+ Nothing to install. `npx` fetches the package and the MCP client spawns it.
77
+
76
78
  ```bash
77
- git clone https://github.com/reinlainer/postmd-mcp-server.git
78
- cd postmd-mcp-server
79
- npm ci
80
- node src/index.js # normally spawned by the MCP client; use for debugging
79
+ npx -y postmd-mcp-server
81
80
  ```
82
81
 
82
+ Run it by hand only to check that it starts — it speaks MCP over stdin and stdout, so it
83
+ will sit there waiting for a client.
84
+
83
85
  ## Client configuration
84
86
 
85
87
  Claude Code:
86
88
 
87
89
  ```bash
88
- claude mcp add postmd -- node /absolute/path/to/postmd-mcp-server/src/index.js
90
+ claude mcp add postmd -- npx -y postmd-mcp-server
89
91
  ```
90
92
 
91
93
  Cursor (`~/.cursor/mcp.json`) and most other stdio clients:
@@ -95,14 +97,23 @@ Cursor (`~/.cursor/mcp.json`) and most other stdio clients:
95
97
  "mcpServers": {
96
98
  "PostMD": {
97
99
  "type": "stdio",
98
- "command": "node",
99
- "args": ["/absolute/path/to/postmd-mcp-server/src/index.js"],
100
+ "command": "npx",
101
+ "args": ["-y", "postmd-mcp-server"],
100
102
  "env": { "POSTMD_API_KEY": "pmk_…" }
101
103
  }
102
104
  }
103
105
  }
104
106
  ```
105
107
 
108
+ To run a checkout instead — changing the code, or debugging against a local PostMD —
109
+ point the client at the file.
110
+
111
+ ```bash
112
+ git clone https://github.com/reinlainer/postmd-mcp-server.git
113
+ cd postmd-mcp-server && npm ci
114
+ claude mcp add postmd-dev -- node "$PWD/src/index.js"
115
+ ```
116
+
106
117
  Leave `env` out entirely for publish/read-only use. `cp .env.example .env` works too — the server loads its own `.env`.
107
118
 
108
119
  ## Smoke test
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postmd-mcp-server",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "MCP server for PostMD — publish Markdown, get a shareable web page",
5
5
  "mcpName": "io.github.reinlainer/postmd-mcp-server",
6
6
  "type": "module",
package/server.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.reinlainer/postmd-mcp-server",
4
4
  "description": "Publish Markdown to PostMD and get a shareable web page",
5
- "version": "2.1.0",
5
+ "version": "2.1.1",
6
6
  "repository": {
7
7
  "url": "https://github.com/reinlainer/postmd-mcp-server",
8
8
  "source": "github"
@@ -11,7 +11,7 @@
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "postmd-mcp-server",
14
- "version": "2.1.0",
14
+ "version": "2.1.1",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },
package/src/index.js CHANGED
@@ -176,9 +176,18 @@ const ATTACHMENT_MIME = {
176
176
  pdf: "application/pdf",
177
177
  };
178
178
 
179
- /** 만든 문서에는 나눠 줄 주소를 붙여 준다. 에이전트의 다음 행동이 바로 그것이다. */
179
+ /**
180
+ * 만든 문서에는 나눠 줄 주소를 붙여 준다. 에이전트의 다음 행동이 바로 그것이다.
181
+ *
182
+ * 서버가 이미 `shareUrl` 을 돌려주면 그것을 쓴다. 서버는 요청이 실제로 들어온 주소를
183
+ * 보고 만들고, 여기서는 `POSTMD_BASE_URL` 을 보고 만든다. 자체 호스팅에서 그 둘이
184
+ * 다르면 값이 갈리는데, 사람에게 건너가는 주소는 서버가 아는 쪽이 맞다.
185
+ *
186
+ * 그래도 이 함수를 남겨 둔다. `shareUrl` 을 돌려주지 않는 구 버전 서버를 가리키는
187
+ * 설정이 있을 수 있고, 그때도 에이전트는 건넬 주소를 받아야 한다.
188
+ */
180
189
  function addShareUrl(ctx, data) {
181
- if (data && typeof data.docCode === "string" && data.docCode) {
190
+ if (data && typeof data.docCode === "string" && data.docCode && !data.shareUrl) {
182
191
  data.shareUrl = `${ctx.base}/share/${encodeURIComponent(data.docCode)}`;
183
192
  }
184
193
  }