# Slack MCP Server
<!-- mcp-name: io.github.stevenvo/slack-mcp-server -->
MCP server for reading Slack conversations and threads you're involved in. Built specifically for use with Claude Code.
## Features
- **Read Channel Messages**: Get recent messages from any channel with time-based filtering
- **Read Thread Messages**: Read entire conversation threads
- **Get Channel Info**: View channel details and metadata
- **Get User Info**: Look up user profiles and information
- **List Your Channels**: See all channels you're a member of
- **Search Conversations**: Find messages where you're mentioned or involved
- **Get Message Links**: Generate permanent links to specific messages
## Installation
1. Clone or download this directory
2. Install dependencies:
```bash
cd slack-mcp-server
pip install -r requirements.txt
```
3. Set up your Slack token (see Authentication section below)
## Authentication
### Option 1: User Token (Recommended)
A User Token uses your personal Slack permissions and can access all channels you're a member of.
1. Go to https://api.slack.com/apps
2. Create a new app (or use existing)
3. Navigate to "OAuth & Permissions"
4. Add the following **User Token Scopes**:
- `channels:history` - View messages in public channels
- `channels:read` - View basic channel info
- `groups:history` - View messages in private channels
- `groups:read` - View basic private channel info
- `im:history` - View messages in direct messages
- `im:read` - View basic DM info
- `mpim:history` - View messages in group DMs
- `mpim:read` - View basic group DM info
- `users:read` - View user information
- `search:read` - Search messages
5. Install the app to your workspace
6. Copy the "User OAuth Token" (starts with `xoxp-`)
### Option 2: Bot Token
A Bot Token is more limited but easier to set up for team-wide access.
1. Follow steps 1-2 above
2. Add **Bot Token Scopes** instead (same list but in bot section)
3. Install the app
4. Copy the "Bot User OAuth Token" (starts with `xoxb-`)
5. Invite the bot to channels you want to read: `/invite @YourBotName`
### Configure Environment
Create a `.env` file:
```bash
cp .env.example .env
```
Edit `.env` and add your token:
```bash
# Use one of these:
SLACK_USER_TOKEN=xoxp-your-user-token-here
# OR
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
```
## Add to Claude Code
Add this to your `~/.claude.json` file in the `mcpServers` section:
```json
{
"mcpServers": {
"slack": {
"command": "python",
"args": ["/path/to/slack-mcp-server/server.py"],
"env": {
"SLACK_USER_TOKEN": "xoxp-your-user-token-here",
"SLACK_WORKSPACE_URL": "https://your-workspace.slack.com"
}
}
}
}
```
Or if using uvx:
```json
{
"mcpServers": {
"slack": {
"command": "uvx",
"args": ["--from", "/path/to/slack-mcp-server", "slack-mcp"],
"env": {
"SLACK_USER_TOKEN": "xoxp-your-user-token-here",
"SLACK_WORKSPACE_URL": "https://your-workspace.slack.com"
}
}
}
}
```
Restart Claude Code and verify with:
```bash
claude mcp list
```
## Available Tools
### 1. `read_channel_messages`
Read recent messages from a channel.
**Parameters:**
- `channel_id` (required): Slack channel ID (e.g., `C1234567890`)
- `lookback_hours` (optional): Hours to look back (default: 24)
- `limit` (optional): Max messages to retrieve (default: 100, max: 1000)
**Example:**
```
Read the last 48 hours of messages from channel C1234567890
```
### 2. `read_thread_messages`
Read all messages in a thread.
**Parameters:**
- `channel_id` (required): Channel ID where thread exists
- `thread_ts` (required): Thread timestamp (from parent message)
**Example:**
```
Read the full thread with timestamp 1699564800.123456 in channel C1234567890
```
### 3. `get_channel_info`
Get channel metadata.
**Parameters:**
- `channel_id` (required): Channel ID
**Example:**
```
Get info about channel C1234567890
```
### 4. `get_user_info`
Get user profile information.
**Parameters:**
- `user_id` (required): User ID (e.g., `U1234567`)
**Example:**
```
Get info about user U1234567
```
### 5. `list_my_channels`
List all channels you're a member of.
**Parameters:**
- `types` (optional): Comma-separated types (default: `public_channel,private_channel`)
- Options: `public_channel`, `private_channel`, `mpim`, `im`
**Example:**
```
List all my channels
```
### 6. `search_my_conversations`
Search for messages where you're mentioned or involved.
**Parameters:**
- `query` (required): Search terms
- `count` (optional): Number of results (default: 20, max: 100)
**Example:**
```
Search my conversations for "deployment" in the last week
```
### 7. `get_message_permalink`
Get a permanent link to a specific message.
**Parameters:**
- `channel_id` (required): Channel ID
- `message_ts` (required): Message timestamp
**Example:**
```
Get permalink for message 1699564800.123456 in channel C1234567890
```
## Usage with Claude Code
Once configured, you can ask Claude to:
- "Show me messages from the #general channel in the last 24 hours"
- "Read the thread starting at timestamp 1699564800.123456 in channel C1234567890"
- "Search my Slack conversations for mentions of 'deployment'"
- "List all channels I'm in"
- "Get info about user U1234567"
## Finding Channel IDs
### Method 1: From Slack URL
When you're in a channel, the URL looks like:
```
https://your-workspace.slack.com/archives/C1234567890/p1234567890
```
The part after `/archives/` is the channel ID: `C1234567890`
### Method 2: Using the MCP Server
Ask Claude:
```
List all my channels
```
### Method 3: Right-click in Slack
1. Right-click on the channel name
2. Click "Copy link"
3. Extract the channel ID from the URL
## Troubleshooting
### "Missing required scopes"
Make sure you've added all the required scopes in your Slack app configuration.
### "Channel not found"
- Verify the channel ID is correct
- If using a bot token, make sure the bot is invited to the channel (`/invite @BotName`)
- If using a user token, make sure you're a member of the channel
### "Not authenticated"
- Check that your `SLACK_USER_TOKEN` or `SLACK_BOT_TOKEN` is set correctly
- Verify the token hasn't expired
- Make sure there are no extra spaces in the `.env` file
### MCP Server Not Showing Up
```bash
# Check MCP server status
claude mcp list
# Check logs
tail -f ~/.claude/debug/*.log
```
## Security Notes
- Never commit your `.env` file or expose your Slack tokens
- User tokens have access to everything you can see in Slack - use with care
- Consider using bot tokens for shared/team setups
- Tokens can be revoked at https://api.slack.com/apps
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "slack-mcp-server-v2",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, llm, mcp, model-context-protocol, slack",
"author": null,
"author_email": "Steven Vo <findme@stevenvo.info>",
"download_url": "https://files.pythonhosted.org/packages/bb/18/2bd77b7a61d3ac601622b2362c78ea27970bb56370af6014da6f25ff892f/slack_mcp_server_v2-0.1.0.tar.gz",
"platform": null,
"description": "# Slack MCP Server\n\n<!-- mcp-name: io.github.stevenvo/slack-mcp-server -->\n\nMCP server for reading Slack conversations and threads you're involved in. Built specifically for use with Claude Code.\n\n## Features\n\n- **Read Channel Messages**: Get recent messages from any channel with time-based filtering\n- **Read Thread Messages**: Read entire conversation threads\n- **Get Channel Info**: View channel details and metadata\n- **Get User Info**: Look up user profiles and information\n- **List Your Channels**: See all channels you're a member of\n- **Search Conversations**: Find messages where you're mentioned or involved\n- **Get Message Links**: Generate permanent links to specific messages\n\n## Installation\n\n1. Clone or download this directory\n2. Install dependencies:\n\n```bash\ncd slack-mcp-server\npip install -r requirements.txt\n```\n\n3. Set up your Slack token (see Authentication section below)\n\n## Authentication\n\n### Option 1: User Token (Recommended)\n\nA User Token uses your personal Slack permissions and can access all channels you're a member of.\n\n1. Go to https://api.slack.com/apps\n2. Create a new app (or use existing)\n3. Navigate to \"OAuth & Permissions\"\n4. Add the following **User Token Scopes**:\n - `channels:history` - View messages in public channels\n - `channels:read` - View basic channel info\n - `groups:history` - View messages in private channels\n - `groups:read` - View basic private channel info\n - `im:history` - View messages in direct messages\n - `im:read` - View basic DM info\n - `mpim:history` - View messages in group DMs\n - `mpim:read` - View basic group DM info\n - `users:read` - View user information\n - `search:read` - Search messages\n5. Install the app to your workspace\n6. Copy the \"User OAuth Token\" (starts with `xoxp-`)\n\n### Option 2: Bot Token\n\nA Bot Token is more limited but easier to set up for team-wide access.\n\n1. Follow steps 1-2 above\n2. Add **Bot Token Scopes** instead (same list but in bot section)\n3. Install the app\n4. Copy the \"Bot User OAuth Token\" (starts with `xoxb-`)\n5. Invite the bot to channels you want to read: `/invite @YourBotName`\n\n### Configure Environment\n\nCreate a `.env` file:\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env` and add your token:\n\n```bash\n# Use one of these:\nSLACK_USER_TOKEN=xoxp-your-user-token-here\n# OR\nSLACK_BOT_TOKEN=xoxb-your-bot-token-here\n```\n\n## Add to Claude Code\n\nAdd this to your `~/.claude.json` file in the `mcpServers` section:\n\n```json\n{\n \"mcpServers\": {\n \"slack\": {\n \"command\": \"python\",\n \"args\": [\"/path/to/slack-mcp-server/server.py\"],\n \"env\": {\n \"SLACK_USER_TOKEN\": \"xoxp-your-user-token-here\",\n \"SLACK_WORKSPACE_URL\": \"https://your-workspace.slack.com\"\n }\n }\n }\n}\n```\n\nOr if using uvx:\n\n```json\n{\n \"mcpServers\": {\n \"slack\": {\n \"command\": \"uvx\",\n \"args\": [\"--from\", \"/path/to/slack-mcp-server\", \"slack-mcp\"],\n \"env\": {\n \"SLACK_USER_TOKEN\": \"xoxp-your-user-token-here\",\n \"SLACK_WORKSPACE_URL\": \"https://your-workspace.slack.com\"\n }\n }\n }\n}\n```\n\nRestart Claude Code and verify with:\n\n```bash\nclaude mcp list\n```\n\n## Available Tools\n\n### 1. `read_channel_messages`\n\nRead recent messages from a channel.\n\n**Parameters:**\n- `channel_id` (required): Slack channel ID (e.g., `C1234567890`)\n- `lookback_hours` (optional): Hours to look back (default: 24)\n- `limit` (optional): Max messages to retrieve (default: 100, max: 1000)\n\n**Example:**\n```\nRead the last 48 hours of messages from channel C1234567890\n```\n\n### 2. `read_thread_messages`\n\nRead all messages in a thread.\n\n**Parameters:**\n- `channel_id` (required): Channel ID where thread exists\n- `thread_ts` (required): Thread timestamp (from parent message)\n\n**Example:**\n```\nRead the full thread with timestamp 1699564800.123456 in channel C1234567890\n```\n\n### 3. `get_channel_info`\n\nGet channel metadata.\n\n**Parameters:**\n- `channel_id` (required): Channel ID\n\n**Example:**\n```\nGet info about channel C1234567890\n```\n\n### 4. `get_user_info`\n\nGet user profile information.\n\n**Parameters:**\n- `user_id` (required): User ID (e.g., `U1234567`)\n\n**Example:**\n```\nGet info about user U1234567\n```\n\n### 5. `list_my_channels`\n\nList all channels you're a member of.\n\n**Parameters:**\n- `types` (optional): Comma-separated types (default: `public_channel,private_channel`)\n - Options: `public_channel`, `private_channel`, `mpim`, `im`\n\n**Example:**\n```\nList all my channels\n```\n\n### 6. `search_my_conversations`\n\nSearch for messages where you're mentioned or involved.\n\n**Parameters:**\n- `query` (required): Search terms\n- `count` (optional): Number of results (default: 20, max: 100)\n\n**Example:**\n```\nSearch my conversations for \"deployment\" in the last week\n```\n\n### 7. `get_message_permalink`\n\nGet a permanent link to a specific message.\n\n**Parameters:**\n- `channel_id` (required): Channel ID\n- `message_ts` (required): Message timestamp\n\n**Example:**\n```\nGet permalink for message 1699564800.123456 in channel C1234567890\n```\n\n## Usage with Claude Code\n\nOnce configured, you can ask Claude to:\n\n- \"Show me messages from the #general channel in the last 24 hours\"\n- \"Read the thread starting at timestamp 1699564800.123456 in channel C1234567890\"\n- \"Search my Slack conversations for mentions of 'deployment'\"\n- \"List all channels I'm in\"\n- \"Get info about user U1234567\"\n\n## Finding Channel IDs\n\n### Method 1: From Slack URL\nWhen you're in a channel, the URL looks like:\n```\nhttps://your-workspace.slack.com/archives/C1234567890/p1234567890\n```\nThe part after `/archives/` is the channel ID: `C1234567890`\n\n### Method 2: Using the MCP Server\nAsk Claude:\n```\nList all my channels\n```\n\n### Method 3: Right-click in Slack\n1. Right-click on the channel name\n2. Click \"Copy link\"\n3. Extract the channel ID from the URL\n\n## Troubleshooting\n\n### \"Missing required scopes\"\nMake sure you've added all the required scopes in your Slack app configuration.\n\n### \"Channel not found\"\n- Verify the channel ID is correct\n- If using a bot token, make sure the bot is invited to the channel (`/invite @BotName`)\n- If using a user token, make sure you're a member of the channel\n\n### \"Not authenticated\"\n- Check that your `SLACK_USER_TOKEN` or `SLACK_BOT_TOKEN` is set correctly\n- Verify the token hasn't expired\n- Make sure there are no extra spaces in the `.env` file\n\n### MCP Server Not Showing Up\n```bash\n# Check MCP server status\nclaude mcp list\n\n# Check logs\ntail -f ~/.claude/debug/*.log\n```\n\n## Security Notes\n\n- Never commit your `.env` file or expose your Slack tokens\n- User tokens have access to everything you can see in Slack - use with care\n- Consider using bot tokens for shared/team setups\n- Tokens can be revoked at https://api.slack.com/apps\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MCP server for reading Slack conversations and threads",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/stevenvo/slack-mcp-server",
"Issues": "https://github.com/stevenvo/slack-mcp-server/issues",
"Repository": "https://github.com/stevenvo/slack-mcp-server"
},
"split_keywords": [
"ai",
" llm",
" mcp",
" model-context-protocol",
" slack"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f0c4991877fb871417cd4adb028a8ea8b0a4a1f4fa3984e716df426b1aed5c76",
"md5": "b7463f6794c526551ee19d15759775f6",
"sha256": "262e9607ac77ba3a828d2275f2ed341cf2f1ad6af92e4852c3f4342377ba5f49"
},
"downloads": -1,
"filename": "slack_mcp_server_v2-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b7463f6794c526551ee19d15759775f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 17348,
"upload_time": "2025-11-07T00:36:05",
"upload_time_iso_8601": "2025-11-07T00:36:05.162135Z",
"url": "https://files.pythonhosted.org/packages/f0/c4/991877fb871417cd4adb028a8ea8b0a4a1f4fa3984e716df426b1aed5c76/slack_mcp_server_v2-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bb182bd77b7a61d3ac601622b2362c78ea27970bb56370af6014da6f25ff892f",
"md5": "99bff5bbe81b98f7662793ab6155a356",
"sha256": "bb7fa55cbe0566db298509acffa8315d988c49315e8760d834a98ff7e5ee033d"
},
"downloads": -1,
"filename": "slack_mcp_server_v2-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "99bff5bbe81b98f7662793ab6155a356",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 8350,
"upload_time": "2025-11-07T00:36:06",
"upload_time_iso_8601": "2025-11-07T00:36:06.813632Z",
"url": "https://files.pythonhosted.org/packages/bb/18/2bd77b7a61d3ac601622b2362c78ea27970bb56370af6014da6f25ff892f/slack_mcp_server_v2-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-11-07 00:36:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "stevenvo",
"github_project": "slack-mcp-server",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "mcp",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "slack-sdk",
"specs": [
[
">=",
"3.35.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"1.0.0"
]
]
}
],
"lcname": "slack-mcp-server-v2"
}