@capacms/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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  stdio MCP server for Capa. Seventeen reads, two writes, two resources and three
4
4
  prompts. People set it up from the
5
- [AI assistants guide](https://docs.capacms.com/api/ai-assistants), which has
5
+ [AI assistants guide](https://docs.capacms.com/ai/mcp), which has
6
6
  the Claude Code, Cursor and Codex config.
7
7
 
8
8
  It has no dependencies, so `npx` fetches the package and runs it with nothing
@@ -14,7 +14,7 @@ at once and says so.
14
14
  With a `cap_` key minted in the Capa admin under **Developers > Keys**:
15
15
 
16
16
  ```sh
17
- CAPA_API_URL=https://api.capacms.com CAPA_KEY=cap_live_... npx -y @capacms/mcp
17
+ CAPA_API_URL=https://cdn.capacms.com CAPA_KEY=cap_live_... npx -y @capacms/mcp
18
18
  ```
19
19
 
20
20
  An MCP client starts it the same way: the command is `npx`, the arguments are
@@ -22,7 +22,7 @@ An MCP client starts it the same way: the command is `npx`, the arguments are
22
22
 
23
23
  | variable | needed | value |
24
24
  |---|---|---|
25
- | `CAPA_API_URL` | always | the API, `https://api.capacms.com` |
25
+ | `CAPA_API_URL` | always | the API, `https://cdn.capacms.com` |
26
26
  | `CAPA_KEY` | always | the key the server reads with |
27
27
  | `CAPA_TENANT_ID` | a legacy key only: `pk_`, `sk_` or unprefixed | the tenant's id |
28
28
  | `CAPA_API_VERSION` | no | the dated `/api/` version, `2026-10-01` |
package/bin/capa-mcp.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * capa-mcp — stdio MCP server for Capa. Mostly reads; two tools write.
4
4
  *
5
5
  * Usage (Claude Code / Codex / any MCP client), on Node 20 or later:
6
- * CAPA_API_URL=https://api.capacms.com \ # or CAPA_BASE_URL
6
+ * CAPA_API_URL=https://cdn.capacms.com \ # or CAPA_BASE_URL
7
7
  * CAPA_KEY=<tenant api key> \ # or CAPA_API_KEY
8
8
  * CAPA_TENANT_ID=<tenant id> \ # legacy pk_/sk_ keys only
9
9
  * CAPA_API_VERSION=2026-10-01 \ # optional
package/lib/client.mjs CHANGED
@@ -175,7 +175,7 @@ export function loadConfig(env = process.env) {
175
175
  : ` CAPA_TENANT_ID legacy keys only (pk_, sk_ or unprefixed): the tenant the key belongs to\n`;
176
176
  throw new Error(
177
177
  `capa-mcp: missing ${missing.join(", ")}.\n` +
178
- ` CAPA_API_URL the API, e.g. https://api.capacms.com (or CAPA_BASE_URL)\n` +
178
+ ` CAPA_API_URL the API, e.g. https://cdn.capacms.com (or CAPA_BASE_URL)\n` +
179
179
  keyLine +
180
180
  tenantLine +
181
181
  ` CAPA_API_VERSION optional; the dated /api/ version, default ${DEFAULT_API_VERSION}`
@@ -184,7 +184,7 @@ export function loadConfig(env = process.env) {
184
184
  const route = routeIn(baseUrl);
185
185
  if (route) {
186
186
  throw new Error(
187
- `capa-mcp: CAPA_API_URL is the API's address with no route, e.g. https://api.capacms.com: drop ${route}.\n` +
187
+ `capa-mcp: CAPA_API_URL is the API's address with no route, e.g. https://cdn.capacms.com: drop ${route}.\n` +
188
188
  " Every tool adds the route it calls (/api/graphql, /api/entries), so a URL ending in one calls it twice.",
189
189
  );
190
190
  }
@@ -56,7 +56,7 @@ function noApiAt(config, error) {
56
56
  `${printable(config.baseUrl)} serves no /api/ route: GET /api/me answered 404 when this server started, and POST /api/graphql answered ${error.status}${error.code ? ` ${error.code}` : ""}. ` +
57
57
  "Either CAPA_API_URL is not the Capa API's address, or this deployment does not serve /api/.\n" +
58
58
  "Next: tell the person running this server to check that CAPA_API_URL is the API's address with no route after it, " +
59
- "e.g. https://api.capacms.com, and restart it; if it is, /api/ is off on this deployment."
59
+ "e.g. https://cdn.capacms.com, and restart it; if it is, /api/ is off on this deployment."
60
60
  );
61
61
  }
62
62
 
package/lib/server.mjs CHANGED
@@ -28,7 +28,7 @@ import { instructionsFor } from "./instructions.mjs";
28
28
  const PROTOCOL_VERSION = "2025-06-18";
29
29
  const SUPPORTED = new Set(["2025-06-18", "2025-03-26", "2024-11-05"]);
30
30
 
31
- export const SERVER_INFO = { name: "capa-mcp", version: "0.2.0" };
31
+ export const SERVER_INFO = { name: "capa-mcp", version: "0.2.1" };
32
32
 
33
33
  const ok = (id, result) => ({ jsonrpc: "2.0", id, result });
34
34
  const fail = (id, code, message) => ({ jsonrpc: "2.0", id, error: { code, message } });
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@capacms/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "stdio MCP server for Capa, shaped for agents rather than one tool per endpoint.",
5
5
  "license": "UNLICENSED",
6
- "homepage": "https://docs.capacms.com/api/ai-assistants",
6
+ "homepage": "https://docs.capacms.com/ai/mcp",
7
7
  "type": "module",
8
8
  "bin": {
9
9
  "capa-mcp": "bin/capa-mcp.mjs"