@upstash/context7-mcp 1.0.18 → 1.0.20

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
@@ -323,7 +323,7 @@ Add this to your Roo Code MCP configuration file. See [Roo Code MCP docs](https:
323
323
  "type": "streamable-http",
324
324
  "url": "https://mcp.context7.com/mcp",
325
325
  "headers": {
326
- "CONTEXT7_API_KEY": "YOUR_API_KEY",
326
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
327
327
  }
328
328
  }
329
329
  }
@@ -473,6 +473,7 @@ args = [
473
473
  "YOUR_API_KEY"
474
474
  ]
475
475
  ```
476
+
476
477
  Alternatively, you can use the following configuration:
477
478
 
478
479
  ```toml
@@ -491,6 +492,7 @@ startup_timeout_ms = 20_000
491
492
  ```
492
493
 
493
494
  This ensures Codex CLI works reliably on Windows.
495
+
494
496
  </details>
495
497
 
496
498
  <details>
package/dist/index.js CHANGED
@@ -77,7 +77,7 @@ function getClientIp(req) {
77
77
  function createServerInstance(clientIp, apiKey) {
78
78
  const server = new McpServer({
79
79
  name: "Context7",
80
- version: "1.0.18",
80
+ version: "1.0.20",
81
81
  }, {
82
82
  instructions: "Use this server to retrieve up-to-date documentation and code examples for any library.",
83
83
  });
package/dist/lib/api.js CHANGED
@@ -37,30 +37,36 @@ export async function searchLibraries(query, clientIp, apiKey) {
37
37
  if (!response.ok) {
38
38
  const errorCode = response.status;
39
39
  if (errorCode === 429) {
40
- console.error("Rate limited due to too many requests. Please try again later.");
40
+ const errorMessage = "Rate limited due to too many requests. Please try again later.";
41
+ console.error(errorMessage);
41
42
  return {
42
43
  results: [],
43
- error: "Rate limited due to too many requests. Please try again later.",
44
+ error: errorMessage,
44
45
  };
45
46
  }
46
47
  if (errorCode === 401) {
47
- console.error("Unauthorized. Please check your API key.");
48
+ const errorMessage = "Unauthorized. Please check your API key. The API key you provided (possibly incorrect) is: " +
49
+ apiKey +
50
+ ". API keys should start with 'ctx7sk'";
51
+ console.error(errorMessage);
48
52
  return {
49
53
  results: [],
50
- error: "Unauthorized. Please check your API key.",
54
+ error: errorMessage,
51
55
  };
52
56
  }
53
- console.error(`Failed to search libraries. Please try again later. Error code: ${errorCode}`);
57
+ const errorMessage = `Failed to search libraries. Please try again later. Error code: ${errorCode}`;
58
+ console.error(errorMessage);
54
59
  return {
55
60
  results: [],
56
- error: `Failed to search libraries. Please try again later. Error code: ${errorCode}`,
61
+ error: errorMessage,
57
62
  };
58
63
  }
59
64
  return await response.json();
60
65
  }
61
66
  catch (error) {
62
- console.error("Error searching libraries:", error);
63
- return { results: [], error: `Error searching libraries: ${error}` };
67
+ const errorMessage = `Error searching libraries: ${error}`;
68
+ console.error(errorMessage);
69
+ return { results: [], error: errorMessage };
64
70
  }
65
71
  }
66
72
  /**
@@ -97,7 +103,9 @@ export async function fetchLibraryDocumentation(libraryId, options = {}, clientI
97
103
  return errorMessage;
98
104
  }
99
105
  if (errorCode === 401) {
100
- const errorMessage = "Unauthorized. Please check your API key.";
106
+ const errorMessage = "Unauthorized. Please check your API key. The API key you provided (possibly incorrect) is: " +
107
+ apiKey +
108
+ ". API keys should start with 'ctx7sk'";
101
109
  console.error(errorMessage);
102
110
  return errorMessage;
103
111
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/context7-mcp","version":"1.0.18","description":"MCP server for Context7","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc && chmod 755 dist/index.js","format":"prettier --write .","lint":"eslint \"**/*.{js,ts,tsx}\" --fix","lint:check":"eslint \"**/*.{js,ts,tsx}\"","start":"node dist/index.js --transport http","pack-mcpb":"bun install && bun run build && rm -rf node_modules && bun install --production && mv mcpb/.mcpbignore .mcpbignore && mv mcpb/manifest.json manifest.json && mv public/icon.png icon.png && mcpb validate manifest.json && mcpb pack . mcpb/context7.mcpb && mv manifest.json mcpb/manifest.json && mv .mcpbignore mcpb/.mcpbignore && mv icon.png public/icon.png && bun install"},"repository":{"type":"git","url":"git+https://github.com/upstash/context7.git"},"keywords":["modelcontextprotocol","mcp","context7","vibe-coding","developer tools","documentation","context"],"author":"abdush","license":"MIT","type":"module","bin":{"context7-mcp":"dist/index.js"},"files":["dist"],"bugs":{"url":"https://github.com/upstash/context7/issues"},"homepage":"https://github.com/upstash/context7#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.17.5","commander":"^14.0.0","undici":"^6.6.3","zod":"^3.24.2"},"devDependencies":{"@types/node":"^22.13.14","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0","eslint":"^9.34.0","eslint-config-prettier":"^10.1.1","eslint-plugin-prettier":"^5.2.5","prettier":"^3.6.2","typescript":"^5.8.2","typescript-eslint":"^8.28.0"}}
1
+ {"name":"@upstash/context7-mcp","version":"1.0.20","description":"MCP server for Context7","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc && chmod 755 dist/index.js","format":"prettier --write .","lint":"eslint \"**/*.{js,ts,tsx}\" --fix","lint:check":"eslint \"**/*.{js,ts,tsx}\"","start":"node dist/index.js --transport http","pack-mcpb":"bun install && bun run build && rm -rf node_modules && bun install --production && mv mcpb/.mcpbignore .mcpbignore && mv mcpb/manifest.json manifest.json && mv public/icon.png icon.png && mcpb validate manifest.json && mcpb pack . mcpb/context7.mcpb && mv manifest.json mcpb/manifest.json && mv .mcpbignore mcpb/.mcpbignore && mv icon.png public/icon.png && bun install"},"repository":{"type":"git","url":"git+https://github.com/upstash/context7.git"},"keywords":["modelcontextprotocol","mcp","context7","vibe-coding","developer tools","documentation","context"],"author":"abdush","license":"MIT","type":"module","bin":{"context7-mcp":"dist/index.js"},"files":["dist"],"bugs":{"url":"https://github.com/upstash/context7/issues"},"homepage":"https://github.com/upstash/context7#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.17.5","commander":"^14.0.0","undici":"^6.6.3","zod":"^3.24.2"},"devDependencies":{"@types/node":"^22.13.14","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0","eslint":"^9.34.0","eslint-config-prettier":"^10.1.1","eslint-plugin-prettier":"^5.2.5","prettier":"^3.6.2","typescript":"^5.8.2","typescript-eslint":"^8.28.0"}}