@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.
- package/README.md +75 -6
- package/docs/COMMUNICATION-STYLE.md +65 -0
- package/docs/DEPLOYMENT-MODES.md +48 -0
- package/docs/HN-LAUNCH.md +61 -0
- package/docs/INDEX.md +28 -0
- package/docs/SETUP.md +29 -5
- package/docs/SUPPORT-BOUNDARIES.md +49 -0
- package/docs/TROUBLESHOOTING.md +32 -2
- package/docs/USE_CASE_RECIPES.md +69 -0
- package/docs/WEB-API.md +2 -0
- package/lib/handlers.js +1 -1
- package/lib/slack-client.js +1 -1
- package/package.json +4 -2
- package/public/demo-claude.html +56 -9
- package/public/demo-video.html +56 -1
- package/public/demo.html +49 -6
- package/scripts/check-owner-attribution.sh +80 -0
- package/scripts/setup-git-hooks.sh +15 -0
- package/scripts/setup-wizard.js +148 -42
- package/scripts/verify-install-flow.js +87 -0
- package/src/cli.js +1 -0
- package/src/server-http.js +1 -1
- package/src/server.js +2 -2
- package/src/web-server.js +3 -3
|
@@ -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
package/src/server-http.js
CHANGED
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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}`);
|