@upstash/context7-mcp 1.0.34-canary.5 → 2.0.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/dist/index.js +1 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -177,7 +177,6 @@ async function main() {
|
|
|
177
177
|
const transportType = TRANSPORT_TYPE;
|
|
178
178
|
if (transportType === "http") {
|
|
179
179
|
const initialPort = CLI_PORT ?? DEFAULT_PORT;
|
|
180
|
-
let actualPort = initialPort;
|
|
181
180
|
const app = express();
|
|
182
181
|
app.use(express.json());
|
|
183
182
|
app.use((req, res, next) => {
|
|
@@ -207,12 +206,8 @@ async function main() {
|
|
|
207
206
|
};
|
|
208
207
|
const extractApiKey = (req) => {
|
|
209
208
|
return (extractBearerToken(req.headers.authorization) ||
|
|
210
|
-
extractHeaderValue(req.headers["Context7-API-Key"]) ||
|
|
211
|
-
extractHeaderValue(req.headers["X-API-Key"]) ||
|
|
212
209
|
extractHeaderValue(req.headers["context7-api-key"]) ||
|
|
213
210
|
extractHeaderValue(req.headers["x-api-key"]) ||
|
|
214
|
-
extractHeaderValue(req.headers["Context7_API_Key"]) ||
|
|
215
|
-
extractHeaderValue(req.headers["X_API_Key"]) ||
|
|
216
211
|
extractHeaderValue(req.headers["context7_api_key"]) ||
|
|
217
212
|
extractHeaderValue(req.headers["x_api_key"]));
|
|
218
213
|
};
|
|
@@ -266,8 +261,7 @@ async function main() {
|
|
|
266
261
|
}
|
|
267
262
|
});
|
|
268
263
|
httpServer.once("listening", () => {
|
|
269
|
-
|
|
270
|
-
console.error(`Context7 Documentation MCP Server running on HTTP at http://localhost:${actualPort}/mcp`);
|
|
264
|
+
console.error(`Context7 Documentation MCP Server running on HTTP at http://localhost:${port}/mcp`);
|
|
271
265
|
});
|
|
272
266
|
};
|
|
273
267
|
startServer(initialPort);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upstash/context7-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"mcpName": "io.github.upstash/context7",
|
|
5
5
|
"description": "MCP server for Context7",
|
|
6
6
|
"repository": {
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"format:check": "prettier --check .",
|
|
55
55
|
"dev": "tsc --watch",
|
|
56
56
|
"start": "node dist/index.js --transport http",
|
|
57
|
-
"pack-mcpb": "pnpm install && pnpm run build && rm -rf node_modules && pnpm install --prod &&
|
|
57
|
+
"pack-mcpb": "pnpm install && pnpm run build && rm -rf node_modules && pnpm install --prod && cp mcpb/manifest.json manifest.json && cp ../../public/icon.png icon.png && mcpb validate manifest.json && mcpb pack . mcpb/context7.mcpb && rm manifest.json icon.png && pnpm install"
|
|
58
58
|
}
|
|
59
59
|
}
|