MCP Servers
Sweep supports integration with Model Context Protocol (MCP) servers that allow you to extend Sweep's capabilities. We currently only support local MCP installations.
Best Practices
When using MCP servers with Sweep, follow these guidelines:
Core Principles
- Install only what you need: Only install the MCP servers that are necessary for your specific use case
- Less is more: The more tools you provide, the worse an agent performs at using all of them effectively
Avoid Duplicate Functionality
Don't install MCP servers that replicate functionality Sweep already provides:
Sweep's built-in capabilities:
- Explore and navigate your codebase
- Create and modify files
- Execute terminal commands
- Use the IDE's LSP to find code usages
- Internal planning for more complex tasks
Examples to avoid:
- Filesystem MCP servers (Sweep already has file access)
- Code editing tools (Sweep has built-in editing capabilities)
- Terminal/shell servers (Sweep can execute commands)
Walkthrough: GitHub MCP Server Configuration
Scenario: Enabling PR review in Sweep
In this example, we'll demonstrate how to install and configure the GitHub MCP server to give Sweep PR review abilities.
Step 1: Access MCP Configuration
- Open Sweep settings (double-press shift ->
Sweep Settings
) - Navigate to the MCP Servers section
- Click on "Edit MCP Config File" button
This should open a JSON file like this:
{
"mcpServers": {
}
}
Step 2: Add GitHub MCP Server
Modify the configuration file to add the GitHub MCP server:
{
"mcpServers": {
"github": {
"command": "/opt/homebrew/bin/npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<your_github_pat>"
}
}
}
}
Configuration breakdown:
command
: The path to npx/your desired executable (usewhich npx
orGet-Command npx
to find your system's path)args
: Arguments to install and run the GitHub MCP serverenv
: Any environment variables, in this case your GitHub Personal Access Token
Step 3: Create a GitHub Token
- Generate a GitHub Personal Access Token (PAT) from GitHub Settings → Developer settings → Personal access tokens (opens in a new tab)
- Replace
<your_github_pat>
with your actual token - Save the configuration file
Step 4: Manage Available Tools
After saving:
- Return to Sweep settings
- The GitHub MCP server should show as enabled with 26/26 tools
- Important: Disable tools you don't need to improve performance
- Only enable the tools you need for PR review workflows (
get_pull_request
,get_pull_request_files
andcreate_pull_request_review
)
Troubleshooting
Common Issues
- Connection Timed Out
- Ensure the command you passed in your configuration file is correct
- Run
which <server-command>
orGet-Command <server-command>
to get the correct path - For example, if
which npx
returns/opt/homebrew/bin/npx
then that is what needs to go into the command field
Stay Updated
We are actively working on improving support for MCP so email team@sweep.dev or join our discord (opens in a new tab) for any questions/feedback.