@upstash/context7-mcp 2.1.8 → 2.2.0

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
@@ -720,9 +720,35 @@ See [JetBrains AI Assistant Documentation](https://www.jetbrains.com/help/ai-ass
720
720
 
721
721
  See [Kiro Model Context Protocol Documentation](https://kiro.dev/docs/mcp/configuration/) for details.
722
722
 
723
+ [![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=context7&config=%7B%22url%22%3A%22https%3A%2F%2Fmcp.context7.com%2Fmcp%22%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)
724
+
723
725
  1. Navigate `Kiro` > `MCP Servers`
724
726
  2. Add a new MCP server by clicking the `+ Add` button.
725
- 3. Paste the configuration given below:
727
+ 3. Paste one of the configurations below:
728
+
729
+ #### Kiro Remote Server Connection
730
+
731
+ ```json
732
+ {
733
+ "mcpServers": {
734
+ "Context7": {
735
+ "url": "https://mcp.context7.com/mcp"
736
+ }
737
+ }
738
+ }
739
+ ```
740
+
741
+ To use an API key in Kiro, add:
742
+
743
+ ```json
744
+ "headers": {
745
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
746
+ }
747
+ ```
748
+
749
+ You can create an API key at [context7.com/dashboard](https://context7.com/dashboard) for authenticated usage and higher rate limits.
750
+
751
+ #### Kiro Local Server Connection
726
752
 
727
753
  ```json
728
754
  {
package/dist/index.js CHANGED
@@ -194,7 +194,7 @@ server.registerTool("query-docs", {
194
194
 
195
195
  You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.
196
196
 
197
- IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best information you have.`,
197
+ Workflow: call first without researchMode. If that doesn't answer the question, retry with researchMode: true. Do not call each tool more than 3 times per question`,
198
198
  inputSchema: {
199
199
  libraryId: z
200
200
  .string()
@@ -202,12 +202,16 @@ IMPORTANT: Do not call this tool more than 3 times per question. If you cannot f
202
202
  query: z
203
203
  .string()
204
204
  .describe("The question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'auth' or 'hooks'. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."),
205
+ researchMode: z
206
+ .boolean()
207
+ .optional()
208
+ .describe(`Retry the query with deep research: spins up sandboxed agents that read the actual source repos and runs a live web search, then synthesizes a fresh answer. Set true on retry if you weren't satisfied with the first answer and want a more thorough one. Requires an API key — you can get one free at https://context7.com.`),
205
209
  },
206
210
  annotations: {
207
211
  readOnlyHint: true,
208
212
  },
209
- }, async ({ query, libraryId }) => {
210
- const response = await fetchLibraryContext({ query, libraryId }, getClientContext());
213
+ }, async ({ query, libraryId, researchMode }) => {
214
+ const response = await fetchLibraryContext({ query, libraryId, researchMode }, getClientContext());
211
215
  return {
212
216
  content: [
213
217
  {
package/dist/lib/api.js CHANGED
@@ -120,6 +120,8 @@ export async function fetchLibraryContext(request, context = {}) {
120
120
  const url = new URL(`${CONTEXT7_API_BASE_URL}/v2/context`);
121
121
  url.searchParams.set("query", request.query);
122
122
  url.searchParams.set("libraryId", request.libraryId);
123
+ if (request.researchMode)
124
+ url.searchParams.set("researchMode", "true");
123
125
  const headers = generateHeaders(context);
124
126
  const response = await fetch(url, { headers });
125
127
  if (!response.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstash/context7-mcp",
3
- "version": "2.1.8",
3
+ "version": "2.2.0",
4
4
  "mcpName": "io.github.upstash/context7",
5
5
  "description": "MCP server for Context7",
6
6
  "repository": {