Tarantella Slack MCP Server

Tarantella Slack MCP Server

Enables AI assistants to search Slack messages and channels using the Slack Web API, with filtering options by user, date, channel, and content type.

Category
访问服务器

README

Tarantella MCPs - Slack MCP Server

A Model Context Protocol (MCP) server implementation that provides Slack search capabilities to Claude and other MCP clients.

Overview

This MCP server enables AI assistants to search Slack messages and channels using the Slack Web API. It provides two main tools:

  • search-messages: Search across all accessible Slack messages
  • search-in-channel: Search within a specific Slack channel

Prerequisites

  • Node.js v22 or later (see .nvmrc)
  • A Slack workspace with API access
  • A Slack Bot Token with appropriate permissions

Slack Setup

1. Create a Slack App

  1. Go to https://api.slack.com/apps
  2. Click "Create New App" and choose "From scratch"
  3. Give your app a name (e.g., "MCP Search Bot") and select your workspace
  4. Click "Create App"

2. Configure OAuth Scopes

  1. Navigate to "OAuth & Permissions" in the sidebar
  2. Under "Bot Token Scopes", add the following scopes:
    • search:read - Search workspace content
    • channels:read - View basic channel information
    • groups:read - View basic private channel information
    • im:read - View basic direct message information
    • mpim:read - View basic group direct message information

3. Install App to Workspace

  1. Scroll to "OAuth Tokens for Your Workspace"
  2. Click "Install to Workspace"
  3. Authorize the app
  4. Copy the "Bot User OAuth Token" (starts with xoxb-)

4. Set Environment Variable

Export your token as an environment variable:

export SLACK_BOT_TOKEN="xoxb-your-token-here"

Or create a .env file (not committed to git):

SLACK_BOT_TOKEN=xoxb-your-token-here
PORT=3000

Installation

# Install dependencies
npm install

# Run development server with hot reload
npm run dev

# Build for production
npm run build

# Run production server
npm start

Environment Variables

Variable Required Default Description
SLACK_BOT_TOKEN Yes - Slack Bot User OAuth Token (starts with xoxb-)
PORT No 3000 Port number for the HTTP server

Available MCP Tools

1. search-messages

Search across all accessible Slack messages in your workspace.

Parameters:

  • query (required): Search query string
  • limit (optional): Number of results to return (1-100, default: 20)
  • from_user (optional): Filter by user ID
  • in_channel (optional): Filter by channel ID
  • after (optional): Filter messages after this date (YYYY-MM-DD)
  • before (optional): Filter messages before this date (YYYY-MM-DD)
  • exclude_bots (optional): Exclude messages from bots (boolean)
  • has_attachments (optional): Only messages with attachments (boolean)
  • has_links (optional): Only messages with links (boolean)

Example:

{
  "query": "bug fix",
  "limit": 10,
  "exclude_bots": true,
  "after": "2024-01-01"
}

2. search-in-channel

Search messages within a specific Slack channel.

Parameters:

  • channel_id (required): Slack channel ID (e.g., C1234567890)
  • query (required): Search query string
  • limit (optional): Number of results to return (1-100, default: 20)
  • from_user (optional): Filter by user ID
  • after (optional): Filter messages after this date (YYYY-MM-DD)
  • before (optional): Filter messages before this date (YYYY-MM-DD)
  • exclude_bots (optional): Exclude messages from bots (boolean)

Example:

{
  "channel_id": "C1234567890",
  "query": "deployment",
  "limit": 5
}

MCP Client Configuration

Claude Desktop

Add this to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "slack": {
      "url": "http://localhost:3000/mcp/slack/sse",
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token-here"
      }
    }
  }
}

Other MCP Clients

Connect to the SSE endpoint:

http://localhost:3000/mcp/slack/sse

Development

Code Quality

# Format and lint code
npm run check

# Type checking only
npm run typecheck

# Linting only
npm run lint

# Format only
npm run format

Testing

# Run tests (watch mode)
npm test

# Run tests with UI
npm run test:ui

# Run tests with coverage (80% threshold)
npm run test:coverage

# Run mutation testing (74% threshold)
npm run test:mutation

CI Pipeline

Run the full continuous integration pipeline:

npm run ci

This runs:

  1. TypeScript type checking
  2. Biome linting
  3. Unit tests
  4. Mutation tests

Project Structure

src/
├── mcps/
│   └── slack/
│       ├── __tests__/          # Integration tests
│       ├── services/           # Slack API client
│       │   ├── __tests__/
│       │   └── slack-client.ts
│       ├── tools/              # MCP tool implementations
│       │   ├── __tests__/
│       │   ├── search-messages.ts
│       │   └── search-in-channel.ts
│       └── index.ts            # MCP server setup
├── shared/
│   ├── __tests__/
│   ├── config.ts               # Environment validation
│   └── types.ts                # Shared TypeScript types
└── server.ts                   # HTTP server entry point

Technology Stack

  • Runtime: Node.js v22
  • Language: TypeScript 5.6+ (ESM modules)
  • MCP SDK: @modelcontextprotocol/sdk v1.25.1
  • Web Framework: Express v5.2.1
  • Validation: Zod v4.2.1
  • Testing: Vitest 2.x
  • Linter/Formatter: Biome 2.x
  • Mutation Testing: Stryker 8.x

License

See LICENSE file for details.

Contributing

  1. Follow the TypeScript strictness guidelines in CLAUDE.md
  2. Write tests for all new features (80% coverage minimum)
  3. Run npm run ci before committing
  4. Use named exports only (no default exports)
  5. Extract magic numbers to named constants
  6. Use bracket notation for process.env access

Troubleshooting

"SLACK_BOT_TOKEN environment variable is required" error

Make sure you've set the SLACK_BOT_TOKEN environment variable:

export SLACK_BOT_TOKEN="xoxb-your-token-here"

Search returns no results

  1. Verify your bot token has the search:read scope
  2. Ensure the bot has been added to channels you want to search
  3. Check that your search query matches actual message content

API rate limiting

Slack has rate limits on API calls. If you hit rate limits:

  • Reduce the search frequency
  • Use more specific queries
  • Implement caching (not currently included)

Connection issues

If the MCP client can't connect:

  1. Verify the server is running: curl http://localhost:3000/
  2. Check the port matches your configuration
  3. Review server logs for error messages

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选