@contextstream/mcp-server 0.3.25 → 0.3.26
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 +27 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6504,6 +6504,20 @@ ${options.workspaceId ? `# Workspace ID: ${options.workspaceId}` : ""}
|
|
|
6504
6504
|
};
|
|
6505
6505
|
}
|
|
6506
6506
|
|
|
6507
|
+
// src/version.ts
|
|
6508
|
+
import { createRequire } from "module";
|
|
6509
|
+
function getVersion() {
|
|
6510
|
+
try {
|
|
6511
|
+
const require2 = createRequire(import.meta.url);
|
|
6512
|
+
const pkg = require2("../package.json");
|
|
6513
|
+
const version = pkg?.version;
|
|
6514
|
+
if (typeof version === "string" && version.trim()) return version.trim();
|
|
6515
|
+
} catch {
|
|
6516
|
+
}
|
|
6517
|
+
return "unknown";
|
|
6518
|
+
}
|
|
6519
|
+
var VERSION = getVersion();
|
|
6520
|
+
|
|
6507
6521
|
// src/tools.ts
|
|
6508
6522
|
function formatContent(data) {
|
|
6509
6523
|
return JSON.stringify(data, null, 2);
|
|
@@ -6624,6 +6638,18 @@ Upgrade: ${upgradeUrl2}` : "";
|
|
|
6624
6638
|
const ctx = sessionManager?.getContext();
|
|
6625
6639
|
return typeof ctx?.project_id === "string" ? ctx.project_id : void 0;
|
|
6626
6640
|
}
|
|
6641
|
+
registerTool(
|
|
6642
|
+
"mcp_server_version",
|
|
6643
|
+
{
|
|
6644
|
+
title: "Get MCP server version",
|
|
6645
|
+
description: "Return the running ContextStream MCP server package version",
|
|
6646
|
+
inputSchema: external_exports.object({})
|
|
6647
|
+
},
|
|
6648
|
+
async () => {
|
|
6649
|
+
const result = { name: "contextstream-mcp", version: VERSION };
|
|
6650
|
+
return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
|
|
6651
|
+
}
|
|
6652
|
+
);
|
|
6627
6653
|
registerTool(
|
|
6628
6654
|
"auth_me",
|
|
6629
6655
|
{
|
|
@@ -9537,7 +9563,6 @@ var SessionManager = class {
|
|
|
9537
9563
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
9538
9564
|
import { homedir } from "os";
|
|
9539
9565
|
import { join as join3 } from "path";
|
|
9540
|
-
var VERSION = "0.3.4";
|
|
9541
9566
|
function showFirstRunMessage() {
|
|
9542
9567
|
const configDir = join3(homedir(), ".contextstream");
|
|
9543
9568
|
const starShownFile = join3(configDir, ".star-shown");
|
|
@@ -9609,7 +9634,7 @@ async function main() {
|
|
|
9609
9634
|
registerTools(server, client, sessionManager);
|
|
9610
9635
|
registerResources(server, client, config.apiUrl);
|
|
9611
9636
|
registerPrompts(server);
|
|
9612
|
-
console.error(`ContextStream MCP server starting...`);
|
|
9637
|
+
console.error(`ContextStream MCP server v${VERSION} starting...`);
|
|
9613
9638
|
console.error(`API URL: ${config.apiUrl}`);
|
|
9614
9639
|
console.error(`Auth: ${config.apiKey ? "API Key" : config.jwt ? "JWT" : "None"}`);
|
|
9615
9640
|
console.error(`Auto-Context: ENABLED (context loads on first tool call)`);
|
package/package.json
CHANGED