Overview
The Slack integration allows Nectr to pull relevant team messages during PR reviews. When reviewing a PR, Nectr can query Slack for:- Discussions about the feature being implemented
- Design decisions made in team channels
- Questions or concerns raised by team members
- Context about why certain changes are needed
This is an inbound MCP integration — Nectr acts as an MCP client connecting to a Slack MCP server.
How It Works
1
PR references feature or discussion
Developer submits a PR with title: “Add rate limiting as discussed in #eng-infra”
2
Nectr extracts search keywords
During PR review, Nectr parses PR title, description, and changed files to identify relevant search terms
3
MCP query to Slack
Nectr calls the Slack MCP server to search for messages:
4
Context included in review
Slack messages are injected into the AI review prompt:
5
AI review validates against team decisions
Claude can now verify:
- Does the PR implement what the team discussed?
- Are there gaps between the Slack discussion and implementation?
- Should the PR address additional points raised in Slack?
Setup
1. Create Slack App
1
Go to Slack API portal
Navigate to api.slack.com/apps
2
Create new app
Click “Create New App” → “From scratch”
- App Name: “Nectr MCP”
- Workspace: Select your workspace
3
Add OAuth scopes
Go to OAuth & Permissions → Bot Token ScopesRequired scopes:
channels:history- Read public channel messageschannels:read- View basic channel informationsearch:read- Search workspace messagesusers:read- View user information (for @mentions)
4
Install app to workspace
Click Install to Workspace and authorize
5
Copy Bot User OAuth Token
Copy the token starting with
xoxb-2. Deploy Slack MCP Server
You need a Slack MCP server running separately from Nectr. Build your own Slack MCP server:3. Configure Nectr
Set environment variables in your Nectr backend:Unlike Linear and Sentry integrations, the Slack bot token is stored in the MCP server itself, not passed from Nectr. This simplifies configuration since the bot token has workspace-level access.
API Reference
MCPClientManager (Slack Support)
The MCPClientManager doesn’t have a dedicated get_slack_messages() method yet. Use the generic query_mcp_server() method:
Source: app/mcp/client.py:118
Usage:
[] if:
SLACK_MCP_URLis not configured- Slack MCP server is unreachable
- MCP call times out (10-second timeout)
- No messages match the query
- Channel not found
Adding a Dedicated Method
For consistency with other integrations, add a dedicated method:Usage in PR Review Flow
Here’s how Slack context can be pulled during a review:Example Review with Slack Context
Here’s how Slack context appears in an AI-generated review:Channel Auto-Detection
Automatically determine which channels to search based on PR metadata:Best Practices
Limit search scope
Only search 1-2 most relevant channels to avoid noise and rate limits
Use focused queries
Extract specific keywords from PR title/body rather than searching entire PR text
Cache results
Cache Slack search results for 10-15 minutes to avoid duplicate queries
Link to threads
Always include permalink so reviewers can read full thread context
Troubleshooting
No Slack context appearing in reviews
1
Check environment variable
2
Test Slack MCP server directly
3
Verify bot has channel access
Slack bot must be invited to the channel:Or make the bot token have workspace-level search permissions.
4
Check channel name format
Use channel name without
#: "eng-infra" not "#eng-infra"Bot permissions errors
channels:historychannels:readsearch:readusers:read
- Go to Slack API portal → Your App → Install App
- Click Reinstall to Workspace
Rate limiting
- Tier 2 methods (conversations.history): 50 requests/min
- Tier 3 methods (search.messages): 20 requests/min
Privacy Considerations
Redacting Sensitive Information
Related Integrations
Linear Integration
Pull linked issues and task context
Sentry Integration
Surface production errors for changed files
Related Files
app/mcp/client.py:118- Genericquery_mcp_server()methodapp/services/pr_review_service.py- How external context is used in reviewsapp/core/config.py:70-SLACK_MCP_URLsetting