Skip to main content
Glama
a-g-e-n-t-s

Slack Message Sender

by a-g-e-n-t-s

MCP_Slack_Server

MCP Server that provides Slack message sending capabilities for Claude Desktop and KADI agents.

Overview

This server is part of the KADI Slack bot architecture. It:

  1. Provides stateless message sending tools

  2. Resolves channel names to IDs automatically

  3. Supports both direct messages and thread replies

  4. Works with Claude Desktop and Agent_TypeScript via KADI broker

Related MCP server: Slack MCP Server

Architecture

Claude Desktop / Agent_TypeScript
              ↓
      KADI Broker (MCP Upstream)
              ↓
    MCP_Slack_Server (this project)
              ↓
      Slack Web API
              ↓
         Slack Channel

Installation

cd C:\p4\Personal\SD\MCP_Slack_Server
npm install

Configuration

Create .env file:

SLACK_BOT_TOKEN=xoxb-your-bot-token
MCP_LOG_LEVEL=info

Required Slack Scopes

  • chat:write - Send messages to channels

  • chat:write.public - Send messages to public channels without joining

  • channels:read - List and resolve channel names

  • groups:read - Access private channels (if needed)

Usage

Development Mode

npm run dev

Production Mode

npm run build
npm start

As MCP Upstream (via KADI Broker)

Add to kadi-broker/mcp-upstreams.json:

{
  "id": "slack-server",
  "name": "Slack Message Sender",
  "type": "stdio",
  "prefix": "slack",
  "networks": ["global", "slack"],
  "stdio": {
    "command": "node",
    "args": ["C:/p4/Personal/SD/MCP_Slack_Server/dist/index.js"],
    "env": {
      "SLACK_BOT_TOKEN": "xoxb-..."
    }
  }
}

Tools

send_message

Send a message to a Slack channel.

Input:

{
  "channel": "#general",  // or "C09T6RU41HP"
  "text": "Hello from Claude!",
  "thread_ts": "1234567890.123456"  // optional
}

Output:

{
  "success": true,
  "message": "Message sent successfully",
  "timestamp": "1234567890.123456",
  "channel": "C09T6RU41HP"
}

send_reply

Reply to a message in a thread.

Input:

{
  "channel": "C09T6RU41HP",
  "thread_ts": "1234567890.123456",
  "text": "This is a threaded reply"
}

Output:

{
  "success": true,
  "message": "Reply sent successfully",
  "timestamp": "1234567890.654321",
  "channel": "C09T6RU41HP",
  "thread_ts": "1234567890.123456"
}

Integration Examples

From Claude Desktop

Send a message to #general saying "Hello team!"

From Agent_TypeScript

await client.getBrokerProtocol().invokeTool({
  targetAgent: 'slack-server',
  toolName: 'slack_send_message',
  toolInput: {
    channel: '#general',
    text: 'Hello from Agent_TypeScript!'
  },
  timeout: 10000
});

Reply to Slack Mention

// After getting mention from MCP_Slack_Client
const mention = mentions[0];

await client.getBrokerProtocol().invokeTool({
  targetAgent: 'slack-server',
  toolName: 'slack_send_reply',
  toolInput: {
    channel: mention.channel,
    thread_ts: mention.thread_ts,
    text: claudeResponse
  },
  timeout: 10000
});

License

MIT

Available Tools

2 tools
send_messageB

Send a message to a Slack channel. Can be used by Claude Desktop and KADI agents to send messages to channels or start new threads.

ParametersJSON Schema
NameRequiredDescriptionDefault
channelYesChannel ID or name (e.g., #general, C09T6RU41HP)
textYesMessage text to send
thread_tsNoOptional thread timestamp to reply in an existing thread

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description only states the basic action. It fails to disclose behavioral traits such as authentication requirements, side effects (e.g., message appears immediately), error handling, or whether the operation is destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with only two sentences, front-loading the primary purpose and briefly mentioning target users and capability. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with three simple parameters and no output schema, the description covers the basic functionality. However, it lacks information about return values, error conditions, and formatting options like markdown, which would be helpful for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds no additional semantic information beyond what is in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'send' and resource 'message to a Slack channel', specifying it can start new threads. However, it does not explicitly distinguish from sibling 'send_reply' beyond mentioning threads, which is slightly ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for sending new messages or starting threads but provides no explicit guidance on when to use this tool versus the sibling 'send_reply', nor any conditions or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_replyA

Reply to a message in a Slack thread. Useful for maintaining conversation context.

ParametersJSON Schema
NameRequiredDescriptionDefault
channelYesChannel ID where the thread exists
thread_tsYesThread timestamp to reply to
textYesReply message text

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states it replies to a message, but does not disclose failure conditions, permissions, or effects of invalid parameters like thread_ts. Minimal behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the action, and contains no unnecessary words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with three parameters and no output schema, the description is adequate but lacks behavioral details such as success/failure indicators or required permissions. Sibling tool provides context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear parameter descriptions. The tool description does not add any additional semantics beyond what the schema provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'reply' and resource 'message in a Slack thread', clearly distinguishing from the sibling tool 'send_message' which sends new messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'useful for maintaining conversation context' implies use within a thread, but no explicit when-not-to-use or alternative guidance is provided. However, the distinction from send_message is clear from sibling name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedsend_message
    • First observedsend_reply

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one sends a new message or starts a thread, the other replies within a thread. No ambiguity.

Naming Consistency5/5

Both tools follow a consistent 'send_' prefix and verb_noun pattern ('send_message', 'send_reply'), making the naming predictable.

Tool Count3/5

With only 2 tools, the server is very focused. While this is appropriate for a minimal message sender, it feels slightly thin for general Slack interaction.

Completeness3/5

The tool set covers sending and replying, but lacks other common Slack operations (e.g., reading, editing, deleting messages), leaving notable gaps.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers