@codo-tech/slack-mcp-server 1.1.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.
Files changed (2) hide show
  1. package/bin/index.js +63 -0
  2. package/package.json +39 -0
package/bin/index.js ADDED
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const childProcess = require('child_process');
6
+
7
+ const BINARY_MAP = {
8
+ darwin_x64: { name: '@codo-tech/slack-mcp-server-darwin-amd64', suffix: '' },
9
+ darwin_arm64: { name: '@codo-tech/slack-mcp-server-darwin-arm64', suffix: '' },
10
+ linux_x64: { name: '@codo-tech/slack-mcp-server-linux-amd64', suffix: '' },
11
+ linux_arm64: { name: '@codo-tech/slack-mcp-server-linux-arm64', suffix: '' },
12
+ win32_x64: { name: '@codo-tech/slack-mcp-server-windows-amd64', suffix: '.exe' },
13
+ win32_arm64: { name: '@codo-tech/slack-mcp-server-windows-arm64', suffix: '.exe' },
14
+ };
15
+
16
+ function resolveBinaryPath() {
17
+ // If DXT installation then we fix empty variables, it's a DXT bug.
18
+ if (process.env.SLACK_MCP_DXT) {
19
+ if (process.env.SLACK_MCP_XOXC_TOKEN === '${user_config.xoxc_token}') {
20
+ process.env.SLACK_MCP_XOXC_TOKEN = '';
21
+ }
22
+ if (process.env.SLACK_MCP_XOXD_TOKEN === '${user_config.xoxd_token}') {
23
+ process.env.SLACK_MCP_XOXD_TOKEN = '';
24
+ }
25
+ if (process.env.SLACK_MCP_XOXP_TOKEN === '${user_config.xoxp_token}') {
26
+ process.env.SLACK_MCP_XOXP_TOKEN = '';
27
+ }
28
+ if (process.env.SLACK_MCP_ADD_MESSAGE_TOOL === '${user_config.add_message_tool}') {
29
+ process.env.SLACK_MCP_ADD_MESSAGE_TOOL = '';
30
+ }
31
+ }
32
+
33
+ const key = `${process.platform}_${process.arch}`;
34
+ const binary = BINARY_MAP[key];
35
+ if (!binary) {
36
+ throw new Error(`Could not resolve binary for platform/arch: ${process.platform}/${process.arch}`);
37
+ }
38
+
39
+ if (process.env.SLACK_MCP_DXT) {
40
+ return require.resolve(path.join(__dirname, `${binary.name}${binary.suffix}`));
41
+ } else {
42
+ return require.resolve(`${binary.name}/bin/${binary.name}${binary.suffix}`);
43
+ }
44
+ }
45
+
46
+ const binPath = resolveBinaryPath();
47
+
48
+ // Workaround for https://github.com/anthropics/dxt/issues/13
49
+ if (process.env.SLACK_MCP_DXT) {
50
+ const stats = fs.statSync(binPath);
51
+ const execMask = fs.constants.S_IXUSR
52
+ | fs.constants.S_IXGRP
53
+ | fs.constants.S_IXOTH;
54
+
55
+ if ((stats.mode & execMask) !== execMask) {
56
+ const newMode = stats.mode | execMask;
57
+ fs.chmodSync(binPath, newMode);
58
+ }
59
+ }
60
+
61
+ childProcess.execFileSync(binPath, process.argv.slice(2), {
62
+ stdio: 'inherit',
63
+ });
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@codo-tech/slack-mcp-server",
3
+ "version": "1.1.0",
4
+ "description": "Model Context Protocol (MCP) server for Slack Workspaces. This integration supports both Stdio and SSE transports, proxy settings and does not require any permissions or bots being created or approved by Workspace admins",
5
+ "main": "bin/index.js",
6
+ "bin": {
7
+ "slack-mcp-server": "bin/index.js"
8
+ },
9
+ "optionalDependencies": {
10
+ "@codo-tech/slack-mcp-server-darwin-amd64": "1.1.0",
11
+ "@codo-tech/slack-mcp-server-darwin-arm64": "1.1.0",
12
+ "@codo-tech/slack-mcp-server-linux-amd64": "1.1.0",
13
+ "@codo-tech/slack-mcp-server-linux-arm64": "1.1.0",
14
+ "@codo-tech/slack-mcp-server-windows-amd64": "1.1.0",
15
+ "@codo-tech/slack-mcp-server-windows-arm64": "1.1.0"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/korotovsky/slack-mcp-server.git"
20
+ },
21
+ "keywords": [
22
+ "mcp",
23
+ "slack",
24
+ "slack-api",
25
+ "model context protocol",
26
+ "model",
27
+ "context",
28
+ "protocol"
29
+ ],
30
+ "author": {
31
+ "name": "Dmitrii Korotovskii",
32
+ "url": "https://www.linkedin.com/in/korotovsky/"
33
+ },
34
+ "license": "MIT",
35
+ "bugs": {
36
+ "url": "https://github.com/korotovsky/slack-mcp-server/issues"
37
+ },
38
+ "homepage": "https://github.com/korotovsky/slack-mcp-server#readme"
39
+ }