Skip to main content
Glama

Slack MCP Server

by lbeatu
post-message.usecase.ts872 B
import { ISlackService } from "../../core/interfaces/slack.interface.js"; import { PostMessageRequest } from "../../core/types/slack.types.js"; export class PostMessageUseCase { constructor(private readonly slackService: ISlackService) {} async execute(request: PostMessageRequest) { const result = await this.slackService.postMessage(request); if (!result.success) { return { content: [ { type: "text" as const, text: `❌ Failed to post message: ${result.error}`, }, ], }; } const message = result.data!; return { content: [ { type: "text" as const, text: `✅ **Message posted successfully!** 📤\n\n**Channel**: <#${request.channel_id}>\n**Timestamp**: ${message.ts}\n**Content**: ${request.text}`, }, ], }; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lbeatu/slack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server