@upstash/context7-mcp 1.0.19 → 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/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.19",
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
  /**
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/context7-mcp","version":"1.0.19","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"}}