Skip to main content
Glama

Notion MCP Server

test_slack.js1.16 kB
import { WebClient } from '@slack/web-api'; import dotenv from 'dotenv'; async function testSlackConnection() { // Load environment variables dotenv.config(); const botToken = process.env.SLACK_BOT_TOKEN; if (!botToken) { console.error('❌ Error: SLACK_BOT_TOKEN not found in .env file'); return false; } try { // Initialize Slack client const client = new WebClient(botToken); // Test auth const auth = await client.auth.test(); console.log('✅ Successfully connected to Slack!'); console.log(`Bot User: ${auth.user}`); console.log(`Team: ${auth.team}`); // List channels const result = await client.conversations.list({ types: 'public_channel' }); console.log('\n📚 Available channels:'); result.channels.forEach(channel => { console.log(`- #${channel.name}`); }); return true; } catch (error) { console.error('❌ Error connecting to Slack:', error.message); return false; } } testSlackConnection();

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/emmanuelsystems/mcpnotionslack'

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