npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

slack-mcp-user

v1.0.0

Published

Slack MCP server using User OAuth Token — post and read messages as yourself

Readme

Slack MCP Server

Slack MCP server that uses User OAuth Token (xoxp-) to send and read messages as yourself.

Depends only on @modelcontextprotocol/sdk — no third-party Slack libraries.

Features

  • Channel name resolution: No need to look up IDs — just use #general or dev_team
  • User name resolution: <@U123> in messages is automatically resolved to display names
  • Thread auto-expansion: Replies are fetched in parallel and displayed inline
  • Message links: Each message includes a direct Slack URL
  • @mention resolution: @username in posts is automatically converted to <@ID>
  • Token persistence: OAuth token is stored in ~/.config/slack-mcp/token.json — authenticate once, use forever

Quick Start (npx)

No git clone needed. Just configure your MCP client:

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "slack-mcp-user"],
      "env": {
        "SLACK_CLIENT_ID": "YOUR_CLIENT_ID",
        "SLACK_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

On first launch, a browser window opens for Slack OAuth. After granting access, the token is persisted and subsequent launches require no interaction.

Alternative: Pass token directly

If you already have a User Token (e.g., for non-interactive environments):

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "slack-mcp-user"],
      "env": {
        "SLACK_USER_TOKEN": "xoxp-your-token-here"
      }
    }
  }
}

Token Resolution Order

  1. SLACK_USER_TOKEN environment variable (explicit, highest priority)
  2. ~/.config/slack-mcp/token.json (persisted from OAuth)
  3. .env file in the project directory (local development fallback)
  4. None found → OAuth flow is triggered (requires SLACK_CLIENT_ID and SLACK_CLIENT_SECRET)

Slack App Setup

  1. Go to https://api.slack.com/apps and click "Create New App"
  2. Select "From an app manifest"
  3. Choose your workspace
  4. Paste the following manifest:
{
  "display_information": {
    "name": "slack-mcp"
  },
  "oauth_config": {
    "redirect_urls": [
      "http://localhost:3000/callback"
    ],
    "scopes": {
      "user": [
        "bookmarks:read",
        "channels:history",
        "channels:read",
        "channels:write",
        "chat:write",
        "dnd:read",
        "emoji:read",
        "files:read",
        "files:write",
        "groups:history",
        "groups:read",
        "groups:write",
        "identify",
        "im:history",
        "im:read",
        "im:write",
        "links:read",
        "lists:read",
        "lists:write",
        "mpim:history",
        "mpim:read",
        "mpim:write",
        "pins:read",
        "pins:write",
        "reactions:read",
        "reactions:write",
        "reminders:read",
        "reminders:write",
        "search:read",
        "stars:read",
        "stars:write",
        "team:read",
        "usergroups:read",
        "users:read",
        "users:read.email",
        "users.profile:read",
        "users.profile:write"
      ]
    }
  },
  "settings": {
    "org_deploy_enabled": false,
    "socket_mode_enabled": false,
    "token_rotation_enabled": false
  }
}
  1. After creation, note the Client ID and Client Secret from the Basic Information page

Tools (40+)

Reading

| Tool | Description | |------|-------------| | slack_list_channels | List channels (public/private/DM/group DM) | | slack_get_channel_history | Get channel history (name-based lookup, thread expansion) | | slack_get_channel_info | Channel details (created, purpose, member count) | | slack_get_channel_members | Channel members (username, email, title) | | slack_get_thread | Get thread replies | | slack_get_pins | Pinned messages (with thread expansion) | | slack_get_bookmarks | Channel bookmarks | | slack_get_unread | Unread channel summary | | slack_search_messages | Search messages (Slack search syntax) | | slack_list_files | Search files (by channel/user/type) | | slack_get_reactions | Get reactions on a message |

Writing

| Tool | Description | |------|-------------| | slack_post_message | Post message (as yourself, thread replies supported) | | slack_send_dm | Send DM (username lookup) | | slack_schedule_message | Schedule a message | | slack_list_scheduled_messages | List scheduled messages | | slack_cancel_scheduled_message | Cancel scheduled message | | slack_update_message | Edit a message | | slack_delete_message | Delete a message | | slack_upload_file | Upload a file |

Reactions & Pins

| Tool | Description | |------|-------------| | slack_add_reaction | Add reaction | | slack_remove_reaction | Remove reaction | | slack_add_pin | Pin a message | | slack_remove_pin | Unpin a message |

Users & Groups

| Tool | Description | |------|-------------| | slack_list_users | All workspace users | | slack_get_user_info | User profile details | | slack_find_user | Search users (name/email partial match) | | slack_get_presence | Online status | | slack_get_dnd | DND (Do Not Disturb) status | | slack_list_usergroups | User groups (@team mentions) | | slack_get_usergroup_members | Group members |

Channel Management

| Tool | Description | |------|-------------| | slack_create_channel | Create channel | | slack_invite_to_channel | Invite to channel | | slack_set_topic | Update topic | | slack_archive_channel | Archive channel | | slack_mark_read | Mark as read |

Status, Reminders & More

| Tool | Description | |------|-------------| | slack_set_status | Change your Slack status | | slack_add_reminder | Set a reminder | | slack_list_reminders | List reminders | | slack_list_emoji | Custom emoji list | | slack_list_saved / slack_remove_saved | Saved items | | slack_get_lists / slack_create_list / ... | Slack Lists (TODO) |

MCP Client Examples

Kiro

~/.kiro/settings/mcp.json:

"slack": {
  "command": "npx",
  "args": ["-y", "slack-mcp-user"],
  "env": {
    "SLACK_CLIENT_ID": "YOUR_CLIENT_ID",
    "SLACK_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
  },
  "disabled": false
}

Claude Desktop

claude_desktop_config.json:

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "slack-mcp-user"],
      "env": {
        "SLACK_CLIENT_ID": "YOUR_CLIENT_ID",
        "SLACK_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

Troubleshooting

| Symptom | Fix | |---------|-----| | token_revoked | Token expired. Re-run OAuth or set SLACK_USER_TOKEN | | missing_scope | Add required User Token Scopes in api.slack.com, then re-authenticate | | channel_not_found | Check channel ID. Private channels need groups:read scope | | not_in_channel | Ensure you're a member of the channel | | spawn node ENOENT | Use the full path to node (e.g., /opt/homebrew/bin/node) |

Security

  • User Token operates with your account's permissions
  • Token is stored in ~/.config/slack-mcp/token.json with 600 permissions (owner-only)
  • No secrets are hardcoded in the source code
  • Client ID/Secret are passed via environment variables

License

MIT