@cite42/mcp 0.1.7 → 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/README.md CHANGED
@@ -1,33 +1,33 @@
1
1
  # @cite42/mcp
2
2
 
3
- MCP server for [Cite42](https://cite42.dev) — AI search visibility, SEO keywords, and trend research tools for your AI agent.
3
+ MCP server for [Cite42](https://cite42.dev): AI search visibility, SEO keywords, and trend research tools for your AI agent.
4
4
 
5
5
  Once installed, your MCP client (Claude Code, Claude Desktop, Codex CLI, Cursor, Windsurf, etc.) can:
6
6
 
7
7
  - **Query AI models** (ChatGPT, Claude, Perplexity, Gemini, Google AI Overviews) and see each model's answer and the sources it cites
8
- - **Track brand visibility** in AI answers — rankings, head-to-head comparisons, and sentiment
9
- - **Pull SEO data** — keyword search volume, CPC, competition, and Google Trends
8
+ - **Track brand visibility** in AI answers: rankings, head-to-head comparisons, and sentiment
9
+ - **Pull SEO data**: keyword search volume, CPC, competition, and Google Trends
10
10
  - **Mine Reddit and YouTube** for audience questions, pain points, and rising content
11
- - **Run full research workflows** — content gaps, topic demand, AI prompt maps, competitor analysis, and content briefs in a single call
11
+ - **Run full research workflows**: content gaps, topic demand, AI prompt maps, competitor analysis, and content briefs in a single call
12
12
 
13
13
  ---
14
14
 
15
15
  ## Requirements
16
16
 
17
17
  - **Node.js 18 or newer** (`node --version` to check)
18
- - **A Cite42 API key** — free to create at [cite42.dev/app/keys](https://cite42.dev/app/keys)
18
+ - **A Cite42 API key**, free to create at [cite42.dev/app/keys](https://cite42.dev/app/keys)
19
19
 
20
20
  ## Installation
21
21
 
22
- There is nothing to install manually — every client below runs the server on demand with `npx -y @cite42/mcp`. You only need to register it once.
22
+ There is nothing to install manually. Every client below runs the server on demand with `npx -y @cite42/mcp`. You only need to register it once.
23
23
 
24
- ### Step 1 — Get your API key
24
+ ### Step 1: Get your API key
25
25
 
26
26
  1. Sign in at [cite42.dev](https://cite42.dev)
27
27
  2. Open **Dashboard → API Keys**: [cite42.dev/app/keys](https://cite42.dev/app/keys)
28
28
  3. Create a key and copy it (it looks like `cite42_live_...`)
29
29
 
30
- ### Step 2 — Add the server to your client
30
+ ### Step 2: Add the server to your client
31
31
 
32
32
  Pick **one** of the clients below and replace `cite42_live_your_key_here` with your real key.
33
33
 
@@ -65,22 +65,22 @@ Add this to `claude_desktop_config.json` (**Settings → Developer → Edit Conf
65
65
 
66
66
  Use the same JSON block as Claude Desktop in your client's `mcpServers` config (Cursor: `~/.cursor/mcp.json` or **Settings → MCP**).
67
67
 
68
- ### Step 3 — Restart so the server loads
68
+ ### Step 3: Restart so the server loads
69
69
 
70
70
  MCP servers are started by the client, so the config is only picked up on a fresh start:
71
71
 
72
- - **Claude Code / Codex CLI** — exit the current session and open a **new terminal** (or start a new `claude` / `codex` session)
73
- - **Claude Desktop / Cursor / Windsurf** — fully quit and reopen the app
72
+ - **Claude Code / Codex CLI**: exit the current session and open a **new terminal** (or start a new `claude` / `codex` session)
73
+ - **Claude Desktop / Cursor / Windsurf**: fully quit and reopen the app
74
74
 
75
- ### Step 4 — Verify it's running
75
+ ### Step 4: Verify it's running
76
76
 
77
- - **Claude Code:** run `claude mcp list` — `cite42` should show as ✔ connected. Or type `/mcp` inside a session.
77
+ - **Claude Code:** run `claude mcp list` and check that `cite42` shows as ✔ connected. Or type `/mcp` inside a session.
78
78
  - **Codex CLI:** run `codex mcp list`.
79
- - **Claude Desktop / Cursor:** look for `cite42` in the MCP/tools indicator — 15 tools should be listed.
79
+ - **Claude Desktop / Cursor:** look for `cite42` in the MCP/tools indicator. 15 tools should be listed.
80
80
 
81
81
  If it doesn't appear, see [Troubleshooting](#troubleshooting).
82
82
 
83
- ## Try it — example prompts
83
+ ## Try it: example prompts
84
84
 
85
85
  After restarting, just ask in plain language. Your agent picks the right Cite42 tool automatically.
86
86
 
@@ -100,12 +100,12 @@ After restarting, just ask in plain language. Your agent picks the right Cite42
100
100
 
101
101
  > Across ChatGPT, Claude, Perplexity, and Gemini, the most-cited sources are:
102
102
  >
103
- > 1. **freshbooks.com** — cited by 4/5 models
104
- > 2. **wave.com** — cited by 3/5 models
105
- > 3. **zoho.com/invoice** — cited by 3/5 models
106
- > 4. **bonsai.com** — cited by 2/5 models
103
+ > 1. **freshbooks.com** (cited by 4/5 models)
104
+ > 2. **wave.com** (cited by 3/5 models)
105
+ > 3. **zoho.com/invoice** (cited by 3/5 models)
106
+ > 4. **bonsai.com** (cited by 2/5 models)
107
107
  >
108
- > Your domain wasn't cited by any model. FreshBooks is cited mainly via comparison/"best of" listicles — a citation-gap analysis (`cite42_find_ai_citation_gaps`) can show which queries you're missing from.
108
+ > Your domain wasn't cited by any model. FreshBooks is cited mainly via comparison/"best of" listicles. A citation-gap analysis (`cite42_find_ai_citation_gaps`) can show which queries you're missing from.
109
109
 
110
110
  ## Available tools
111
111
 
@@ -143,7 +143,7 @@ After restarting, just ask in plain language. Your agent picks the right Cite42
143
143
 
144
144
  | Variable | Required | Default | Description |
145
145
  | --- | --- | --- | --- |
146
- | `CITE42_API_KEY` | Yes | — | Your API key from [cite42.dev/app/keys](https://cite42.dev/app/keys) |
146
+ | `CITE42_API_KEY` | Yes | (none) | Your API key from [cite42.dev/app/keys](https://cite42.dev/app/keys) |
147
147
  | `CITE42_API_BASE` | No | `https://api.cite42.dev/v1` | Override the API base URL |
148
148
 
149
149
  You can also pass these as CLI flags instead of environment variables:
@@ -158,10 +158,10 @@ Tool calls consume Cite42 credits from your account. Calls fail with a clear err
158
158
 
159
159
  ## Troubleshooting
160
160
 
161
- - **Server not listed after setup** — make sure you fully restarted the client (new terminal for CLI clients, full quit for desktop apps).
162
- - **`command not found: npx`** — install Node.js 18+ from [nodejs.org](https://nodejs.org), then restart your terminal.
163
- - **Tool calls fail with an auth error** — check the key was passed correctly (`CITE42_API_KEY`, no quotes or trailing spaces) and is active at [cite42.dev/app/keys](https://cite42.dev/app/keys).
164
- - **Tool calls fail with a credits error** — top up credits at [cite42.dev/app](https://cite42.dev/app).
161
+ - **Server not listed after setup**: make sure you fully restarted the client (new terminal for CLI clients, full quit for desktop apps).
162
+ - **`command not found: npx`**: install Node.js 18+ from [nodejs.org](https://nodejs.org), then restart your terminal.
163
+ - **Tool calls fail with an auth error**: check the key was passed correctly (`CITE42_API_KEY`, no quotes or trailing spaces) and is active at [cite42.dev/app/keys](https://cite42.dev/app/keys).
164
+ - **Tool calls fail with a credits error**: top up credits at [cite42.dev/app](https://cite42.dev/app).
165
165
 
166
166
  ## Links
167
167
 
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 = readFlag("api-key") ?? process.env.CITE42_API_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 = readFlag("api-key") ?? process.env.CITE42_API_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,7 +1,7 @@
1
1
  {
2
2
  "name": "@cite42/mcp",
3
- "version": "0.1.7",
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.",
3
+ "version": "0.1.9",
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",
7
7
  "bin": {
@@ -29,7 +29,16 @@
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "keywords": ["mcp", "model-context-protocol", "cite42", "ai-search", "seo", "keywords", "trends", "claude"],
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
  }