kadenzo-mcp 1.3.1 → 1.3.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/index.js +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -16,12 +16,15 @@ import { basename } from 'node:path'
16
16
  const API_KEY = process.env.KADENZO_API_KEY
17
17
  const BASE = (process.env.KADENZO_API_BASE || 'https://studio.kadenzo.app/api/v1').replace(/\/$/, '')
18
18
 
19
+ // Note: we do NOT exit when KADENZO_API_KEY is missing — the server still starts
20
+ // and can be introspected (tools/list works without a key). A key is only needed
21
+ // when a tool is actually called; missing-key errors surface per-call instead.
19
22
  if (!API_KEY) {
20
- console.error('KADENZO_API_KEY is not set. Generate a key at https://studio.kadenzo.app/dashboard/settings?section=api and set it in your MCP client config.')
21
- process.exit(1)
23
+ console.error('KADENZO_API_KEY is not set — the server will start and list tools, but calls will fail until it is set. Generate a key at https://studio.kadenzo.app/dashboard/settings?section=api')
22
24
  }
23
25
 
24
26
  async function api(method, path, { body, query } = {}) {
27
+ if (!API_KEY) throw new Error('KADENZO_API_KEY is not set. Generate one at studio.kadenzo.app/dashboard/settings?section=api and set it in your MCP client config.')
25
28
  const url = new URL(BASE + path)
26
29
  if (query) for (const [k, v] of Object.entries(query)) if (v != null) url.searchParams.set(k, String(v))
27
30
  const res = await fetch(url, {
@@ -120,6 +123,7 @@ server.tool(
120
123
  { path: z.string().describe('Absolute path to a local image/video file.') },
121
124
  async ({ path }) => {
122
125
  try {
126
+ if (!API_KEY) throw new Error('KADENZO_API_KEY is not set. Generate one at studio.kadenzo.app/dashboard/settings?section=api')
123
127
  const buf = await readFile(path)
124
128
  const fd = new FormData()
125
129
  fd.append('file', new Blob([buf]), basename(path))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kadenzo-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "mcpName": "io.github.jors7/kadenzo-mcp",
5
5
  "description": "MCP server for Kadenzo — schedule, manage, generate, and analyze social posts across 11 networks from any AI agent (Claude, Cursor, ChatGPT).",
6
6
  "type": "module",