mcp-bot
このMCPボットは、Slack上で動作するAIアシスタントで、Claude 3.5 Sonnetを活用し、Microsoftの技術を融合させています。MCPを利用することで、ツールの動的管理や拡張性を実現し、チャンネルの要約やスレッドの会話における文脈認識を提供します。これにより、ユーザーはより効率的にコミュニケーションを図ることができます。
GitHubスター
3
ユーザー評価
未評価
フォーク
0
イシュー
5
閲覧数
2
お気に入り
0
Microsoft Bot - AI Assistant with MCP Integration
A Slack AI assistant powered by Claude 3.5 Sonnet that combines Microsoft's enthusiasm with modern AI capabilities. The bot integrates the Model Context Protocol (MCP) to enable dynamic tool usage and extensibility.
Features
- 🤖 Microsoft-themed AI assistant with Claude 3.5 Sonnet integration
- 🔧 Dynamic tool management through MCP (Model Context Protocol)
- 📊 Channel summarization capabilities
- 💬 Threaded conversations with context awareness
- 🛠️ Extensible tool system with runtime server management
Prerequisites
- Slack workspace with admin permissions
- Anthropic API key
- Node.js installed
- (Optional) Python with uv installed for Python-based tools
Environment Variables
Create a .env
file with the following:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
ANTHROPIC_API_KEY=your-anthropic-key
Installation
- Clone the repository
- Install dependencies:
npm install
- Create and configure your Slack app:
- Create a new Slack app at https://api.slack.com/apps
- Add necessary bot scopes (messages, channels, etc.)
- Install the app to your workspace
- Copy the bot and app tokens to your
.env
file
MCP Server Integration
The bot supports dynamic integration with MCP servers. Two example servers are included:
- Amazon Fresh Server
- Python Local Server
You can add new MCP servers at runtime using the bot's commands:
add_mcp_server [name] [command] [args...]
remove_mcp_server [name]
list_mcp_servers
Running the Bot
npm start
Features in Detail
Channel Summarization
Users can request a summary of recent channel activity using the command:
Assistant, please summarize the activity in this channel!
Conversation Context
The bot maintains conversation context within threads and can:
- Process message history
- Handle tool calls dynamically
- Maintain consistent Microsoft-themed personality
- Format messages appropriately for Slack
Tool Integration
- Dynamic tool discovery from MCP servers
- Runtime server management
- Tool call processing with result handling
- Automatic server reconnection
Development
Project Structure
src/app.ts
: Main application logicsrc/mcp-manager.ts
: MCP server management- Tool servers: Separate processes that provide additional functionality
Adding New Tools
- Create a new MCP-compatible server
- Add the server using the bot's
add_mcp_server
command - Tools will be automatically discovered and made available
License
[Add your license information here]