Slack Channel MCP Server
Enables Slackbot to create Slack channels through natural language conversation via the Slack API's conversations.create method.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Slack Channel MCP Servercreate a private channel called eng-team with description "Engineering team discussions""
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Slack Channel MCP Server
An MCP (Model Context Protocol) server that enables Slackbot to create Slack channels through natural language conversation.
Overview
This server exposes a single tool create_slack_channel that allows you to create Slack channels by talking to Slackbot. It uses the Slack API's conversations.create method.
Architecture:
User ā Slackbot (Slack's AI) ā MCP Server (HTTP) ā Slack APIRelated MCP server: Slack MCP Server
Quick Start
1. Prerequisites
Node.js 18+ - For running the server
npm - For dependency management
ngrok - For exposing localhost to the internet (for local development)
Slack workspace - Where you want to create channels
Slack app credentials - Bot token with appropriate scopes
2. Install Dependencies
cd /Users/asalinerojeffrey/Projects/slack-channel-mcp-server
npm install3. Get Your Slack Bot Token
Click "Create New App" ā "From scratch"
App name:
Channel Creator MCPSelect your workspace
Go to "OAuth & Permissions" in the left sidebar
Under "Scopes", add these Bot Token Scopes:
mcp:connect(required for MCP)channels:manage(to create public channels)groups:write(to create private channels)
Click "Install to Workspace" at the top
Copy the Bot User OAuth Token (starts with
xoxb-)Save it to your
.envfile
4. Configure Environment
# Copy the example file
cp .env.example .env
# Edit .env and add your bot token
# SLACK_BOT_TOKEN=xoxb-your-token-here5. Start the Server Locally
npm run devYou should see:
š Slack Channel MCP Server running on http://localhost:3000
MCP endpoint: http://localhost:3000/mcp
Health check: http://localhost:3000/health6. Expose with ngrok (New Terminal)
# Install ngrok if needed
brew install ngrok
# Start ngrok
ngrok http 3000You'll see something like:
Forwarding https://1a2b3c4d.ngrok.io -> http://localhost:3000Copy the HTTPS URL (e.g., https://1a2b3c4d.ngrok.io) - you'll need this next.
7. Configure Slack App for MCP
Go back to https://api.slack.com/apps ā Your app
In the left sidebar under "Features", click "MCP Servers"
Click "Add MCP Server"
Fill in:
Display name:
Channel CreatorHTTPS endpoint URL: Paste your ngrok URL +
/mcp(e.g.,https://1a2b3c4d.ngrok.io/mcp)Authentication method:
No Auth(for demo)
Click "Save"
Server should show as "Connected" ā
8. Test with Slackbot
Open your Slack workspace
Find Slackbot in Direct Messages or @mention it in a channel
Try asking:
"Create a channel called test-demo"
"Make a private channel for our team"
"Set up a new channel named project-alpha"
Slackbot will:
Recognize your intent
Offer the
create_slack_channeltoolAsk you to authorize it (first time only)
Execute the tool and confirm
Testing Before Slackbot
Test with MCP Inspector
The MCP Inspector is a UI tool to test MCP servers locally:
# Terminal 3: Start MCP Inspector
npx @modelcontextprotocol/inspectorSelect "Streamable HTTP" from the dropdown
Enter the URL:
http://localhost:3000/mcpClick "Connect"
You'll see the
create_slack_channeltoolTest it by entering:
name:
mcp-test-123is_private:
false
Click "Call Tool"
Check your Slack workspace - the channel should appear!
Test with curl
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'Should return JSON with tool definitions.
Test the tool directly
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_slack_channel",
"arguments": {
"name": "curl-test-channel",
"is_private": false
}
}
}'Tool Reference
create_slack_channel
Creates a new Slack channel.
Parameters:
Parameter | Type | Required | Description |
| string | ā Yes | Channel name (1-80 chars, lowercase, no spaces, alphanumeric + |
| boolean | ā No | Create as private channel (default: |
| string | ā No | Channel topic/description |
Example:
{
"name": "project-alpha",
"is_private": false,
"description": "Planning and development for Project Alpha"
}Response on Success:
{
"success": true,
"message": "Channel created successfully",
"channel": {
"id": "C12345678",
"name": "project-alpha",
"is_private": false,
"created": 1704067200,
"url": "https://slack.com/app_redirect?channel=C12345678"
}
}Response on Error:
{
"success": false,
"error": "Channel name \"my-channel\" is already taken. Please choose a different name."
}Common Errors & Solutions
"Unexpected error" in Slack
Check if ngrok is running:
curl https://<your-ngrok-url>/healthVerify server is accessible:
curl https://<your-ngrok-url>/mcp -X POSTCheck Slack app MCP configuration has correct URL (with
/mcpat the end)
Tool doesn't appear in Slackbot
Verify MCP server is "Connected" in Slack app settings
Test with MCP Inspector: Is the tool listed?
Restart Slack client
Try a fresh conversation with Slackbot
"name_taken" error
Channel name already exists. Try a different name or check existing channels in Slack.
"missing_scope" error
Your Slack app is missing required permissions:
Go to OAuth & Permissions in your Slack app
Verify you have these scopes:
mcp:connectchannels:managegroups:write
If missing, add them and reinstall the app to your workspace
"not_authed" error
Bot token is invalid or expired:
Generate a new token at https://api.slack.com/apps ā Your app ā OAuth & Permissions
Update
.envwith the new tokenRestart the server
60 second timeout
Tool took too long to respond. This could be:
Network latency to Slack API
Slack API rate limiting
Invalid token causing retry logic
Try again or check your Slack app's token permissions.
Troubleshooting
Server won't start
# Check if port 3000 is in use
lsof -i :3000
# Use a different port
PORT=3001 npm run devngrok URL expires
Free ngrok URLs change every time you restart ngrok:
Get the new URL
Update Slack app MCP server configuration
No need to restart anything else
For permanent URLs: Upgrade to paid ngrok or deploy to a cloud provider.
Bot missing permissions
Solution: Reinstall the app after adding scopes:
Go to https://api.slack.com/apps ā Your app
Click "Install to Workspace"
Re-authorize the app
Copy the new token to
.envRestart server
Production Deployment
To deploy beyond local testing, see Deployment Options in the plan file.
Option 1: Render (Recommended for simplicity)
Push code to GitHub
Connect to Render.com
Create new Web Service
Set environment variable
SLACK_BOT_TOKENDeploy
Use Render URL (https://...) in Slack app MCP configuration
Option 2: Railway
Similar to Render, supports Node.js deployments with free tier.
Option 3: Fly.io
Offers generous free tier and quick deployment.
Option 4: Cloudflare Workers
For serverless deployment with minimal cost.
Security Notes
ā ļø For demo/development only:
Using "No Auth" authentication mode
Bot token in environment variable
š For production:
Implement request signature verification
Use "Slack Identity" authentication to receive user context
Verify
_meta.slackrequest signature before trustingAdd request logging and monitoring
Rate limit tool calls
Deploy on HTTPS only
Development
Build for production
npm run build
npm startProject structure
src/
āāā server.ts # Main MCP server implementation
package.json # Dependencies
tsconfig.json # TypeScript config
.env.example # Environment template
README.md # This fileAPI Reference
See the Slack conversations.create API documentation
MCP Specification
Learn more about the Model Context Protocol:
Support
For issues:
Check this README's troubleshooting section
Test with MCP Inspector
Verify your Slack app token and scopes
Check server logs for error details
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Enable interaction with Slack workspaces. Supports subscribing to Slack events through Resources.
Human-authenticated setup for routing GitHub pull requests into the right Slack channel.
Human-authenticated setup for routing GitHub pull requests into the right Slack channel.
Manage projects, tasks, time tracking, and team collaboration through natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Slack workspaces through comprehensive integration capabilities. Supports channel management, messaging, thread replies, reactions, and message history retrieval through natural language commands.25 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Slack workspaces through natural language, supporting channel management, message operations, user profiles, reactions, and threaded conversations.-
- FlicenseAqualityBmaintenanceEnables interaction with Slack channels including checking Xcode Cloud build status, reading and searching messages, sending messages, and listing channels.51-
- AlicenseAqualityDmaintenanceEnables Slack workspace integration including channel creation, user invites, message posting, and thread management through natural language.61MIT