Project 21: Slack Integration Agent (Team Communication)
Project 21: Slack Integration Agent (Team Communication)
Build an MCP integration that connects Kiro CLI to Slack - reading messages, posting updates, and searching channel history with AI assistance.
Learning Objectives
By completing this project, you will:
- Understand MCP server architecture and how to expose external APIs to AI agents
- Master Slack API fundamentals including OAuth 2.0, Bot tokens, and app scopes
- Implement rate limiting and backoff strategies for production API integrations
- Design conversational AI workflows that bridge team communication with development tasks
- Apply Block Kit formatting to create rich, interactive Slack messages
Deep Theoretical Foundation
The Communication Integration Problem
Modern development teams live in chat platforms. Slack has become the de facto operating system for team communication, yet developers constantly context-switch between their IDE, terminal, and Slack. This creates friction:
Traditional Workflow:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Terminal โโโโโบโ Browser โโโโโบโ Slack โ
โ (coding) โ โ (tab switch)โ โ (reading) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโ Context Lost โโโโโโโโโโโโโโ
Integrated Workflow:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Kiro CLI โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ File Ops โ โ MCP โ โ Slack โ โ
โ โ Agent โโโโค Router โโโบโ Server โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โฒ โ โ
โ โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ โ
โ Unified Context โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Model Context Protocol (MCP) Architecture
MCP provides a standardized way for AI agents to interact with external systems. Think of it as โUSB for AIโ - a universal connector that lets any AI system plug into any data source:
MCP Communication Flow:
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ AI Agent โโโโโโโโโโบโ MCP Client โโโโโโโโโโบโ MCP Server โ
โ (Kiro CLI) โ JSON โ (in Kiro) โ stdio โ (Slack) โ
โโโโโโโโโโโโโโโโ RPC โโโโโโโโโโโโโโโโ or โโโโโโโโโโโโโโโโ
HTTP โ
โ
โผ
โโโโโโโโโโโโโโโโ
โ Slack API โ
โ (External) โ
โโโโโโโโโโโโโโโโ
Key MCP Concepts:
| Concept | Description | Slack Mapping |
|---|---|---|
| Tools | Actions the AI can invoke | post_message, search_messages |
| Resources | Data the AI can read | Channel lists, user profiles |
| Prompts | Pre-built conversation starters | โSummarize #engineering todayโ |
Slack API Architecture
Slackโs API follows a layered architecture with three main access patterns:
Slack API Layers:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your Application โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Web API โ
โ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ conversations โ โ users โ โ chat โ โ
โ โ .history โ โ .list โ โ .postMsg โ โ
โ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Authentication โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Bot Token: xoxb-... โ โ
โ โ Scopes: channels:read, chat:write, users:read โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Rate Limiting Strategy
Slack enforces rate limits per method tier. Understanding this is crucial for production integrations:
Rate Limit Tiers:
Tier 1 (Generous): Tier 2 (Moderate): Tier 3 (Restrictive):
~1+ req/sec ~20 req/min ~1 req/min
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โconversationsโ โ chat.post โ โ admin.* โ
โ .list โ โ Message โ โ methods โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Backoff Strategy:
โโโโโโโโโโ 429 โโโโโโโโโโ Retry-After โโโโโโโโโโ
โ Requestโโโโโโโโโโโบโ Wait โโโโโโโโโโโโโโโโบโ Retry โ
โโโโโโโโโโ โ Header โ โโโโโโโโโโ
โโโโโโโโโโ
โ
Exponential backoff:
1s โ 2s โ 4s โ 8s โ max 60s
Block Kit: Rich Message Formatting
Slackโs Block Kit provides structured, interactive message layouts. Understanding this transforms your AI from text-only to richly formatted:
Block Kit Structure:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Message โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Section Block โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Text โ Accessory (optional) โ โ โ
โ โ โ "Summary of today..." โ [image/button/menu] โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Divider Block โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Actions Block โ โ
โ โ [Button 1] [Button 2] [Dropdown โผ] โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Real-World Analogy: The AI Team Assistant
Think of this integration like hiring a team assistant who sits in every Slack channel:
- They can listen - Read messages and understand context
- They can speak - Post updates on your behalf
- They can search - Find past conversations instantly
- They can summarize - Condense hours of chatter into key points
But unlike a human assistant, this one:
- Never forgets a conversation
- Can search thousands of messages in seconds
- Works 24/7 without breaks
- Can format information beautifully
Historical Context
The evolution of team chat integration follows a clear trajectory:
1990s: IRC Bots 2010s: Slack Apps 2024+: AI Agents
โ โ โ
โ Simple commands โ Interactive buttons โ Natural language
โ !weather NYC โ Click to approve โ "What did we discuss?"
โ โ โ
โ Pattern matching โ Webhooks/OAuth โ MCP Protocol
โ Regex triggers โ App Directory โ Context-aware
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโ
Book References
For deeper understanding, consult:
- โBuilding Bots with Node.jsโ by Eduardo Freitas - Chapters 4-6 cover Slack bot architecture
- โOAuth 2.0 in Actionโ by Justin Richer - Essential for understanding bot authentication
- โAPI Design Patternsโ by JJ Geewax - Chapters on rate limiting and pagination
- โDesigning Distributed Systemsโ by Brendan Burns - Sidecar patterns for API integration
Complete Project Specification
What You Are Building
An MCP server that exposes Slack functionality to Kiro CLI, enabling:
- Message Reading: Fetch messages from any accessible channel
- Message Posting: Send messages with rich formatting
- Channel Search: Search across channel history
- User Resolution: Convert user IDs to names and vice versa
- Conversation Summarization: AI-powered summaries of channel activity
Functional Requirements
| Feature | Input | Output |
|---|---|---|
| List channels | Workspace scope | Channel names + IDs |
| Read messages | Channel ID + time range | Message array with metadata |
| Post message | Channel ID + content | Message confirmation |
| Search messages | Query string + filters | Matching messages |
| Summarize channel | Channel ID + time range | AI-generated summary |
Non-Functional Requirements
- Latency: < 2 seconds for single channel operations
- Rate Limiting: Automatic backoff on 429 responses
- Token Security: Secure storage of Slack bot tokens
- Error Handling: Graceful degradation with helpful messages
Solution Architecture
High-Level Component Diagram
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Kiro CLI โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Agent Runtime โโ
โ โ โ โโ
โ โ โผ โโ
โ โ โโโโโโโโโโโโโโโโโโโโโโโ โโ
โ โ โ MCP Router โ โโ
โ โ โ (Tool Dispatcher) โ โโ
โ โ โโโโโโโโโโโโโโโโโโโโโโโ โโ
โ โ โ โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ stdio/HTTP
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Slack MCP Server โ
โ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ Tool Handler โ โ Rate Limiter โ โ Token Manager โ โ
โ โ - list_chans โ โ - Bucket alg โ โ - Env vars โ โ
โ โ - read_msgs โ โ - Backoff โ โ - Validation โ โ
โ โ - post_msg โ โ - Queue โ โ โ โ
โ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Slack Web API โ โ
โ โ Client โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ HTTPS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Slack Platform โ
โ api.slack.com โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Data Flow: Reading Channel Messages
User Request: "Show me the last 10 messages in #engineering"
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
โ User โโโโโโบโ Kiro โโโโโโบโ MCP โโโโโโบโ Slack โ
โ Prompt โ โ Agent โ โ Server โ โ API โ
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
โ โ โ
โ Parse intent โ โ
โ Map to tool โ โ
โโโโโโโโโโโโโโโโโ โ
โ โ
โ conversations.history โ
โ โโโโโโโโโโโโโโโโโโโบ
โ โ
โ Message Array (JSON) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ Format for display โ
โผ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Last 10 messages in #eng: โ โ
โ 1. @alice: "PR is ready..." โ โ
โ 2. @bob: "LGTM, merging..." โ โ
โ ... โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
Key Interfaces
// MCP Tool Definitions
interface SlackTools {
// List accessible channels
list_channels: () => Promise<Channel[]>;
// Read channel history
read_messages: (params: {
channel: string;
limit?: number;
oldest?: string; // Unix timestamp
latest?: string; // Unix timestamp
}) => Promise<Message[]>;
// Post a message
post_message: (params: {
channel: string;
text: string;
blocks?: Block[]; // Block Kit formatting
}) => Promise<MessageResponse>;
// Search across workspace
search_messages: (params: {
query: string;
channel?: string;
from?: string; // User ID
}) => Promise<SearchResult[]>;
}
// Data Types
interface Message {
user: string;
text: string;
ts: string;
thread_ts?: string;
reactions?: Reaction[];
}
interface Channel {
id: string;
name: string;
is_private: boolean;
num_members: number;
}
Technology Choices
| Component | Technology | Rationale |
|---|---|---|
| MCP Server | TypeScript + Bun | Fast startup, native TypeScript |
| Slack Client | @slack/web-api | Official SDK, well-maintained |
| Token Storage | Environment variables | Simple, secure, standard |
| Transport | stdio | Local integration, no network overhead |
| Rate Limiting | Token bucket | Industry standard, configurable |
Phased Implementation Guide
Phase 1: Foundation - Slack App Setup (Days 1-2)
Goal: Create a Slack app and establish basic API connectivity.
Tasks:
- Create a Slack app at api.slack.com/apps
- Configure required OAuth scopes
- Install app to your workspace
- Store bot token securely
- Test basic API calls with curl
Required Scopes:
channels:read - View basic channel info
channels:history - Read channel messages
chat:write - Send messages
users:read - Get user profiles
search:read - Search messages (if using search)
Hints:
- Start with a test workspace to avoid disrupting real channels
- The bot token starts with
xoxb- - Use
auth.testAPI method to verify your token works
Verification:
# Test your token
curl -X POST 'https://slack.com/api/auth.test' \
-H 'Authorization: Bearer xoxb-your-token' \
-H 'Content-Type: application/json'
Phase 2: MCP Server Skeleton (Days 3-4)
Goal: Create a minimal MCP server that Kiro can discover.
Tasks:
- Initialize a TypeScript/Bun project
- Implement MCP protocol handlers
- Define tool schemas (without implementation)
- Configure Kiro to connect to your server
- Verify tools appear in Kiroโs tool list
Hints:
- MCP servers communicate via stdin/stdout (stdio transport)
- Use the official MCP SDK:
@modelcontextprotocol/sdk - Tool schemas define what parameters the AI can pass
Kiro Configuration (.kiro/settings.json):
{
"mcpServers": {
"slack": {
"command": "bun",
"args": ["run", "/path/to/your/server/index.ts"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-..."
}
}
}
}
Verification:
# In Kiro chat
> /mcp
# Should list "slack" as an available server
Phase 3: Core Functionality (Days 5-8)
Goal: Implement the main Slack operations.
Tasks:
- Implement
list_channelstool - Implement
read_messagestool - Implement
post_messagetool - Add error handling for API failures
- Implement basic rate limiting
Hints:
- Use the @slack/web-api client for API calls
- Slack returns timestamps as strings (Unix epoch with decimals)
- Implement pagination for channels with many messages
- The
conversations.historyAPI returns messages newest-first
Rate Limiting Pattern:
if response.status == 429:
wait_time = response.headers['Retry-After']
sleep(wait_time)
retry()
Phase 4: Polish and Advanced Features (Days 9-14)
Goal: Add rich formatting, search, and summarization.
Tasks:
- Implement Block Kit message formatting
- Add
search_messagestool - Add user ID to name resolution
- Create helper prompts for common operations
- Add channel summarization capability
Hints:
- Block Kit has a visual builder at app.slack.com/block-kit-builder
- User IDs look like
U1234567890- resolve to names for readability - Summarization can use Kiroโs AI directly on fetched messages
- Consider caching user profiles to reduce API calls
Block Kit Example:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Channel Summary*\nโข 47 messages today\nโข 3 action items"
}
},
{
"type": "divider"
}
]
}
Testing Strategy
Unit Tests
Test individual components in isolation:
// Test rate limiter
describe('RateLimiter', () => {
it('should delay requests when limit exceeded', async () => {
const limiter = new RateLimiter({ maxRequests: 1, window: 1000 });
const start = Date.now();
await limiter.acquire();
await limiter.acquire();
expect(Date.now() - start).toBeGreaterThan(1000);
});
});
// Test message formatting
describe('MessageFormatter', () => {
it('should convert Block Kit to text', () => {
const blocks = [{ type: 'section', text: { text: 'Hello' } }];
expect(formatAsText(blocks)).toBe('Hello');
});
});
Integration Tests
Test against a real (test) Slack workspace:
describe('Slack Integration', () => {
it('should list channels', async () => {
const channels = await slackClient.listChannels();
expect(channels).toBeInstanceOf(Array);
expect(channels[0]).toHaveProperty('id');
expect(channels[0]).toHaveProperty('name');
});
it('should post and read messages', async () => {
// Post a test message
const posted = await slackClient.postMessage({
channel: TEST_CHANNEL,
text: `Test message ${Date.now()}`
});
// Read it back
const messages = await slackClient.readMessages({
channel: TEST_CHANNEL,
limit: 1
});
expect(messages[0].ts).toBe(posted.ts);
});
});
End-to-End Tests
Test the full MCP flow with Kiro:
# In Kiro chat session
> "List all public channels"
# Verify: Should return channel list
> "Read the last 5 messages from #test-channel"
# Verify: Should return formatted messages
> "Post 'Hello from Kiro!' to #test-channel"
# Verify: Message appears in Slack
Common Pitfalls and Debugging
Pitfall 1: Token Scope Errors
Symptom: missing_scope error from Slack API
Cause: Bot token doesnโt have required permissions
Solution:
# Check your token's scopes
curl -X POST 'https://slack.com/api/auth.test' \
-H 'Authorization: Bearer xoxb-your-token'
# Response shows: "team", "user_id", but NOT scopes
# Go to api.slack.com/apps > OAuth > Add missing scopes
# Reinstall app to workspace
Pitfall 2: Channel Not Found
Symptom: channel_not_found error
Causes:
- Using channel name instead of ID
- Bot not in private channel
- Channel is archived
Debugging:
# Get channel ID from name
curl -X POST 'https://slack.com/api/conversations.list' \
-H 'Authorization: Bearer xoxb-your-token' \
-d 'types=public_channel,private_channel'
# For private channels, bot must be invited
# Use: /invite @your-bot-name in Slack
Pitfall 3: MCP Server Not Starting
Symptom: Kiro shows โFailed to connect to MCP serverโ
Debugging Steps:
# 1. Test server directly
echo '{"jsonrpc":"2.0","method":"initialize","id":1}' | bun run index.ts
# 2. Check for syntax errors
bun check index.ts
# 3. Verify path in settings.json is absolute
# 4. Check environment variables are set
env | grep SLACK
Pitfall 4: Rate Limiting Issues
Symptom: Intermittent 429 Too Many Requests errors
Solution:
// Implement exponential backoff
async function withRetry<T>(fn: () => Promise<T>, maxRetries = 3): Promise<T> {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (error.code === 'slack_webapi_rate_limited') {
const delay = Math.pow(2, i) * 1000;
await sleep(delay);
continue;
}
throw error;
}
}
throw new Error('Max retries exceeded');
}
Extensions and Challenges
Extension 1: Thread Support
Add ability to read and reply to message threads:
interface ThreadTools {
read_thread: (params: { channel: string; thread_ts: string }) => Promise<Message[]>;
reply_to_thread: (params: { channel: string; thread_ts: string; text: string }) => Promise<void>;
}
Extension 2: Reaction Analysis
Track and analyze emoji reactions for sentiment:
Channel Sentiment for #engineering (Today):
Positive: 45% (+1, thumbsup, heart)
Neutral: 40% (eyes, thinking_face)
Negative: 15% (disappointed, x)
Extension 3: User Mention Resolution
Automatically expand <@U12345> to actual usernames in messages.
Extension 4: Multi-Workspace Support
Extend to support multiple Slack workspaces:
{
"workspaces": {
"company": { "token": "xoxb-..." },
"oss-community": { "token": "xoxb-..." }
}
}
Extension 5: Interactive Components
Handle button clicks and dropdown selections from posted messages.
Real-World Connections
How Companies Use Slack AI Integration
Incident Response: Automatically pull relevant Slack discussions when an alert fires, giving on-call engineers immediate context.
Daily Standups: AI summarizes what each team member shared, creating automatic standup reports.
Knowledge Discovery: โWhat did we decide about the API versioning strategy?โ searches across months of discussions.
Automated Updates: CI/CD pipelines post deployment notifications with rich formatting and action buttons.
Production Considerations
| Concern | Solution |
|---|---|
| Token rotation | Use Slackโs token rotation API |
| Audit logging | Log all bot actions for compliance |
| Access control | Limit channels bot can access |
| Multi-tenant | Separate tokens per workspace |
| High availability | Deploy MCP server redundantly |
Industry Patterns
The Slack integration pattern youโre building is used by tools like:
- Linear: Syncs issues with Slack threads
- GitHub: Posts PR notifications with action buttons
- PagerDuty: Creates incident channels automatically
- Notion: Shares page updates to channels
Self-Assessment Checklist
Knowledge Verification
- Can you explain how MCP servers communicate with AI agents?
- Do you understand the difference between Bot tokens and User tokens?
- Can you describe three Slack API rate limit tiers?
- What is Block Kit and when would you use it?
- How does the stdio transport work for MCP?
Implementation Verification
- Your server successfully lists channels
- Messages are read with proper timestamp formatting
- Posted messages appear in Slack with your botโs identity
- Rate limiting prevents 429 errors during heavy use
- Error messages are helpful and actionable
Advanced Verification
- Search works across multiple channels
- User IDs are resolved to readable names
- Block Kit formatting renders correctly in Slack
- The integration handles private channels appropriately
- You can summarize a dayโs activity in a channel
Integration Verification
- Kiro can invoke all your Slack tools naturally
- The MCP server starts reliably when Kiro launches
- Environment variables are properly secured
- The tool works in your actual development workflow
Summary
This project bridges the gap between AI-assisted development and team communication. By building an MCP server for Slack, you have learned:
- MCP Architecture: How AI agents extend their capabilities through standardized protocols
- API Integration: Working with OAuth, rate limits, and external services
- Message Formatting: Creating rich, interactive messages with Block Kit
- Production Patterns: Error handling, retries, and security considerations
The patterns you have learned here apply to any external service integration - whether it is Discord, Microsoft Teams, or custom internal tools. The MCP protocol provides a consistent way to expose any API to AI agents.
Next Project: P22-test-generator-hook.md - Automatic test generation using PostToolUse hooks