@cite42/mcp 0.1.1 → 0.1.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.
package/README.md CHANGED
@@ -17,7 +17,20 @@ Open your Claude Desktop config:
17
17
  - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
18
18
  - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
19
19
 
20
- Add the Cite42 MCP server:
20
+ Add the Cite42 MCP server (pass your key as an arg — one flat line):
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "cite42": {
26
+ "command": "npx",
27
+ "args": ["-y", "@cite42/mcp", "--api-key=cite42_live_your_key_here"]
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ Prefer an environment variable instead? This form works too:
21
34
 
22
35
  ```json
23
36
  {
@@ -25,15 +38,14 @@ Add the Cite42 MCP server:
25
38
  "cite42": {
26
39
  "command": "npx",
27
40
  "args": ["-y", "@cite42/mcp"],
28
- "env": {
29
- "CITE42_API_KEY": "cite42_live_your_key_here"
30
- }
41
+ "env": { "CITE42_API_KEY": "cite42_live_your_key_here" }
31
42
  }
32
43
  }
33
44
  }
34
45
  ```
35
46
 
36
- Get your API key from [cite42.dev/app/keys](https://cite42.dev/app/keys).
47
+ The same config works in Cursor, Claude Code, VS Code, Windsurf, and Claude Desktop. Get your API
48
+ key from [cite42.dev/app/keys](https://cite42.dev/app/keys).
37
49
 
38
50
  Restart Claude Desktop. You should see seven new tools available (see below).
39
51
 
@@ -60,10 +72,15 @@ Classic keyword data for a seed term: monthly search volume, CPC, competition, a
60
72
  ### `cite42_trends`
61
73
  Google Trends interest-over-time, related/rising queries, and a rising/falling/stable label for a term.
62
74
 
63
- ## Environment variables
75
+ ## Configuration
76
+
77
+ The key (and optional base URL) can be passed as a CLI flag or an environment variable. A flag
78
+ wins when both are set.
64
79
 
65
- - `CITE42_API_KEY` (required) Your Cite42 API key (`cite42_live_...`)
66
- - `CITE42_API_BASE` (optional) Override the API base URL. Defaults to `https://api.cite42.dev/v1`.
80
+ | Setting | Flag | Env var | Default |
81
+ | --- | --- | --- | --- |
82
+ | API key (required) | `--api-key=cite42_live_...` | `CITE42_API_KEY` | — |
83
+ | API base URL | `--api-base=...` | `CITE42_API_BASE` | `https://api.cite42.dev/v1` |
67
84
 
68
85
  ## Pricing
69
86
 
package/dist/stdio.cjs CHANGED
@@ -10,17 +10,27 @@ var import_zod = require("zod");
10
10
 
11
11
  // src/client.ts
12
12
  var DEFAULT_BASE_URL = "https://api.cite42.dev/v1";
13
+ function readFlag(name) {
14
+ const argv = process.argv.slice(2);
15
+ const prefix = `--${name}=`;
16
+ for (let i = 0; i < argv.length; i++) {
17
+ const arg = argv[i];
18
+ if (arg.startsWith(prefix)) return arg.slice(prefix.length);
19
+ if (arg === `--${name}` && i + 1 < argv.length) return argv[i + 1];
20
+ }
21
+ return void 0;
22
+ }
13
23
  function getApiKey() {
14
- const key = process.env.CITE42_API_KEY;
24
+ const key = readFlag("api-key") ?? process.env.CITE42_API_KEY;
15
25
  if (!key) {
16
26
  throw new Error(
17
- "CITE42_API_KEY environment variable is required. Set it in your MCP client config (e.g., Claude Desktop)."
27
+ "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."
18
28
  );
19
29
  }
20
30
  return key;
21
31
  }
22
32
  function getBaseUrl() {
23
- return process.env.CITE42_API_BASE || DEFAULT_BASE_URL;
33
+ return readFlag("api-base") ?? process.env.CITE42_API_BASE ?? DEFAULT_BASE_URL;
24
34
  }
25
35
  async function aivPost(path, body) {
26
36
  const url = `${getBaseUrl()}${path.startsWith("/") ? path : `/${path}`}`;
package/dist/stdio.mjs CHANGED
@@ -9,17 +9,27 @@ import { z } from "zod";
9
9
 
10
10
  // src/client.ts
11
11
  var DEFAULT_BASE_URL = "https://api.cite42.dev/v1";
12
+ function readFlag(name) {
13
+ const argv = process.argv.slice(2);
14
+ const prefix = `--${name}=`;
15
+ for (let i = 0; i < argv.length; i++) {
16
+ const arg = argv[i];
17
+ if (arg.startsWith(prefix)) return arg.slice(prefix.length);
18
+ if (arg === `--${name}` && i + 1 < argv.length) return argv[i + 1];
19
+ }
20
+ return void 0;
21
+ }
12
22
  function getApiKey() {
13
- const key = process.env.CITE42_API_KEY;
23
+ const key = readFlag("api-key") ?? process.env.CITE42_API_KEY;
14
24
  if (!key) {
15
25
  throw new Error(
16
- "CITE42_API_KEY environment variable is required. Set it in your MCP client config (e.g., Claude Desktop)."
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."
17
27
  );
18
28
  }
19
29
  return key;
20
30
  }
21
31
  function getBaseUrl() {
22
- return process.env.CITE42_API_BASE || DEFAULT_BASE_URL;
32
+ return readFlag("api-base") ?? process.env.CITE42_API_BASE ?? DEFAULT_BASE_URL;
23
33
  }
24
34
  async function aivPost(path, body) {
25
35
  const url = `${getBaseUrl()}${path.startsWith("/") ? path : `/${path}`}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cite42/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for the Cite42 AI search data API. Use Claude Desktop and other LLM clients to query AI search engines.",
5
5
  "license": "MIT",
6
6
  "type": "module",