@jtalk22/slack-mcp 1.2.1 → 1.2.3

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.
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from "node:child_process";
4
+ import { mkdtempSync, rmSync } from "node:fs";
5
+ import { tmpdir } from "node:os";
6
+ import { join } from "node:path";
7
+
8
+ const PKG = "@jtalk22/slack-mcp";
9
+
10
+ function runNpx(args, options = {}) {
11
+ const cmdArgs = ["-y", PKG, ...args];
12
+ const result = spawnSync("npx", cmdArgs, {
13
+ cwd: options.cwd,
14
+ env: options.env,
15
+ encoding: "utf8",
16
+ timeout: 120000,
17
+ });
18
+
19
+ return {
20
+ args: cmdArgs.join(" "),
21
+ status: result.status,
22
+ stdout: (result.stdout || "").trim(),
23
+ stderr: (result.stderr || "").trim(),
24
+ error: result.error,
25
+ };
26
+ }
27
+
28
+ function assert(condition, message, details = "") {
29
+ if (!condition) {
30
+ const suffix = details ? `\n${details}` : "";
31
+ throw new Error(`${message}${suffix}`);
32
+ }
33
+ }
34
+
35
+ function printResult(label, result) {
36
+ console.log(`\n[${label}] npx ${result.args}`);
37
+ console.log(`exit=${result.status}`);
38
+ if (result.stdout) {
39
+ console.log("stdout:");
40
+ console.log(result.stdout);
41
+ }
42
+ if (result.stderr) {
43
+ console.log("stderr:");
44
+ console.log(result.stderr);
45
+ }
46
+ }
47
+
48
+ function main() {
49
+ const testHome = mkdtempSync(join(tmpdir(), "slack-mcp-install-check-"));
50
+
51
+ // Force a clean environment so --status reflects missing credentials.
52
+ const env = { ...process.env, HOME: testHome, USERPROFILE: testHome };
53
+ delete env.SLACK_TOKEN;
54
+ delete env.SLACK_COOKIE;
55
+
56
+ try {
57
+ const versionResult = runNpx(["--version"], { cwd: testHome, env });
58
+ printResult("version", versionResult);
59
+ assert(
60
+ versionResult.status === 0,
61
+ "Expected --version to exit 0",
62
+ versionResult.stderr || versionResult.stdout,
63
+ );
64
+
65
+ const helpResult = runNpx(["--help"], { cwd: testHome, env });
66
+ printResult("help", helpResult);
67
+ assert(
68
+ helpResult.status === 0,
69
+ "Expected --help to exit 0",
70
+ helpResult.stderr || helpResult.stdout,
71
+ );
72
+
73
+ const statusResult = runNpx(["--status"], { cwd: testHome, env });
74
+ printResult("status", statusResult);
75
+ assert(
76
+ statusResult.status !== 0,
77
+ "Expected --status to exit non-zero when credentials are missing",
78
+ statusResult.stderr || statusResult.stdout,
79
+ );
80
+
81
+ console.log("\nInstall flow verification passed.");
82
+ } finally {
83
+ rmSync(testHome, { recursive: true, force: true });
84
+ }
85
+ }
86
+
87
+ main();
package/src/cli.js CHANGED
@@ -20,6 +20,7 @@ const firstArg = args[0];
20
20
  const WIZARD_ARGS = new Set([
21
21
  "--setup", "setup",
22
22
  "--status", "status",
23
+ "--doctor", "doctor",
23
24
  "--version", "-v",
24
25
  "--help", "-h", "help",
25
26
  ]);
@@ -30,7 +30,7 @@ import {
30
30
  } from "../lib/handlers.js";
31
31
 
32
32
  const SERVER_NAME = "slack-mcp-server";
33
- const SERVER_VERSION = "1.2.1";
33
+ const SERVER_VERSION = "1.2.3";
34
34
  const PORT = process.env.PORT || 3000;
35
35
 
36
36
  // Create MCP server
package/src/server.js CHANGED
@@ -11,7 +11,7 @@
11
11
  * - Network error retry with exponential backoff
12
12
  * - Background token health monitoring
13
13
  *
14
- * @version 1.2.1
14
+ * @version 1.2.3
15
15
  */
16
16
 
17
17
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -47,7 +47,7 @@ const BACKGROUND_REFRESH_INTERVAL = 4 * 60 * 60 * 1000;
47
47
 
48
48
  // Package info
49
49
  const SERVER_NAME = "slack-mcp-server";
50
- const SERVER_VERSION = "1.2.1";
50
+ const SERVER_VERSION = "1.2.3";
51
51
 
52
52
  // MCP Prompts - predefined prompt templates for common Slack operations
53
53
  const PROMPTS = [
package/src/web-server.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Exposes Slack MCP tools as REST endpoints for browser access.
6
6
  * Run alongside or instead of the MCP server for web-based access.
7
7
  *
8
- * @version 1.2.1
8
+ * @version 1.2.3
9
9
  */
10
10
 
11
11
  import express from "express";
@@ -116,7 +116,7 @@ function extractContent(result) {
116
116
  app.get("/", (req, res) => {
117
117
  res.json({
118
118
  name: "Slack Web API Server",
119
- version: "1.2.1",
119
+ version: "1.2.3",
120
120
  status: "running",
121
121
  endpoints: [
122
122
  "GET /health",
@@ -295,7 +295,7 @@ async function main() {
295
295
  app.listen(PORT, '127.0.0.1', () => {
296
296
  // Print to stderr to keep logs clean (stdout reserved for JSON in some setups)
297
297
  console.error(`\n${"═".repeat(60)}`);
298
- console.error(` Slack Web API Server v1.2.1`);
298
+ console.error(` Slack Web API Server v1.2.3`);
299
299
  console.error(`${"═".repeat(60)}`);
300
300
  console.error(`\n Dashboard: http://localhost:${PORT}/?key=${API_KEY}`);
301
301
  console.error(`\n API Key: ${API_KEY}`);