@cite42/mcp 0.1.8 → 0.1.9
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/dist/stdio.cjs +12 -5
- package/dist/stdio.mjs +12 -5
- package/package.json +11 -2
package/dist/stdio.cjs
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
// src/stdio.ts
|
|
5
5
|
var import_mcp = require("@mastra/mcp");
|
|
6
6
|
|
|
7
|
-
// src/tools.ts
|
|
8
|
-
var import_tools = require("@mastra/core/tools");
|
|
9
|
-
var import_zod = require("zod");
|
|
10
|
-
|
|
11
7
|
// src/client.ts
|
|
12
8
|
var DEFAULT_BASE_URL = "https://api.cite42.dev/v1";
|
|
13
9
|
function readFlag(name) {
|
|
@@ -20,8 +16,11 @@ function readFlag(name) {
|
|
|
20
16
|
}
|
|
21
17
|
return void 0;
|
|
22
18
|
}
|
|
19
|
+
function resolveApiKey() {
|
|
20
|
+
return readFlag("api-key") ?? process.env.CITE42_API_KEY;
|
|
21
|
+
}
|
|
23
22
|
function getApiKey() {
|
|
24
|
-
const key =
|
|
23
|
+
const key = resolveApiKey();
|
|
25
24
|
if (!key) {
|
|
26
25
|
throw new Error(
|
|
27
26
|
"No Cite42 API key found. Pass --api-key=cite42_live_... in the server args, or set the CITE42_API_KEY environment variable in your MCP client config."
|
|
@@ -50,6 +49,8 @@ async function aivPost(path, body) {
|
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
// src/tools.ts
|
|
52
|
+
var import_tools = require("@mastra/core/tools");
|
|
53
|
+
var import_zod = require("zod");
|
|
53
54
|
var modelEnum = import_zod.z.enum(["chatgpt", "claude", "perplexity", "gemini", "google_ai_overview"]);
|
|
54
55
|
var QUERY_MAX_CHARS = 2e3;
|
|
55
56
|
var SHORT_TEXT_MAX_CHARS = 200;
|
|
@@ -233,6 +234,12 @@ var aivGenerateContentBrief = (0, import_tools.createTool)({
|
|
|
233
234
|
});
|
|
234
235
|
|
|
235
236
|
// src/stdio.ts
|
|
237
|
+
if (!resolveApiKey()) {
|
|
238
|
+
console.error(
|
|
239
|
+
"[@cite42/mcp] Missing API key. Set CITE42_API_KEY in your MCP client config (or pass --api-key=cite42_live_...). Get a key at https://cite42.dev/app/keys. Setup guide: https://www.npmjs.com/package/@cite42/mcp"
|
|
240
|
+
);
|
|
241
|
+
process.exit(1);
|
|
242
|
+
}
|
|
236
243
|
var server = new import_mcp.MCPServer({
|
|
237
244
|
id: "cite42",
|
|
238
245
|
name: "Cite42",
|
package/dist/stdio.mjs
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
// src/stdio.ts
|
|
4
4
|
import { MCPServer } from "@mastra/mcp";
|
|
5
5
|
|
|
6
|
-
// src/tools.ts
|
|
7
|
-
import { createTool } from "@mastra/core/tools";
|
|
8
|
-
import { z } from "zod";
|
|
9
|
-
|
|
10
6
|
// src/client.ts
|
|
11
7
|
var DEFAULT_BASE_URL = "https://api.cite42.dev/v1";
|
|
12
8
|
function readFlag(name) {
|
|
@@ -19,8 +15,11 @@ function readFlag(name) {
|
|
|
19
15
|
}
|
|
20
16
|
return void 0;
|
|
21
17
|
}
|
|
18
|
+
function resolveApiKey() {
|
|
19
|
+
return readFlag("api-key") ?? process.env.CITE42_API_KEY;
|
|
20
|
+
}
|
|
22
21
|
function getApiKey() {
|
|
23
|
-
const key =
|
|
22
|
+
const key = resolveApiKey();
|
|
24
23
|
if (!key) {
|
|
25
24
|
throw new Error(
|
|
26
25
|
"No Cite42 API key found. Pass --api-key=cite42_live_... in the server args, or set the CITE42_API_KEY environment variable in your MCP client config."
|
|
@@ -49,6 +48,8 @@ async function aivPost(path, body) {
|
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
// src/tools.ts
|
|
51
|
+
import { createTool } from "@mastra/core/tools";
|
|
52
|
+
import { z } from "zod";
|
|
52
53
|
var modelEnum = z.enum(["chatgpt", "claude", "perplexity", "gemini", "google_ai_overview"]);
|
|
53
54
|
var QUERY_MAX_CHARS = 2e3;
|
|
54
55
|
var SHORT_TEXT_MAX_CHARS = 200;
|
|
@@ -232,6 +233,12 @@ var aivGenerateContentBrief = createTool({
|
|
|
232
233
|
});
|
|
233
234
|
|
|
234
235
|
// src/stdio.ts
|
|
236
|
+
if (!resolveApiKey()) {
|
|
237
|
+
console.error(
|
|
238
|
+
"[@cite42/mcp] Missing API key. Set CITE42_API_KEY in your MCP client config (or pass --api-key=cite42_live_...). Get a key at https://cite42.dev/app/keys. Setup guide: https://www.npmjs.com/package/@cite42/mcp"
|
|
239
|
+
);
|
|
240
|
+
process.exit(1);
|
|
241
|
+
}
|
|
235
242
|
var server = new MCPServer({
|
|
236
243
|
id: "cite42",
|
|
237
244
|
name: "Cite42",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cite42/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Cite42 MCP server: query ChatGPT, Claude, Perplexity, Gemini & Google AI Overviews for brand rankings, AI citations, SEO keyword data, and Reddit/YouTube trends. Works with Claude Code, Claude Desktop, Codex CLI, Cursor, and any MCP client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,16 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"keywords": [
|
|
32
|
+
"keywords": [
|
|
33
|
+
"mcp",
|
|
34
|
+
"model-context-protocol",
|
|
35
|
+
"cite42",
|
|
36
|
+
"ai-search",
|
|
37
|
+
"seo",
|
|
38
|
+
"keywords",
|
|
39
|
+
"trends",
|
|
40
|
+
"claude"
|
|
41
|
+
],
|
|
33
42
|
"engines": {
|
|
34
43
|
"node": ">=18"
|
|
35
44
|
}
|