clone_repo
Clones a repository into MCP cache for code analysis. Use to initialize a repo from URL, optionally specifying branch, as a prerequisite for other analysis tools.
Instructions
Initialize a repository for analysis by copying it to MCP's cache. This is a prerequisite for all other analysis tools.
WHEN TO USE:
First time analyzing a repository
When explicitly switching cache strategies
NOT needed if already cloned (check with list_repos first if unsure)
RETURNS:
'already_cloned': Repository ready for analysis, no action needed
'pending': Clone started, will complete in background. You can proceed with other tools
'switched_branch': Branch changed successfully (shared cache only)
'error': Operation failed, see error message
CACHE STRATEGIES:
'shared' (default): One cache per repo, can switch branches in-place
'per-branch': Separate cache for each branch, useful for comparing branches
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| branch | No | ||
| cache_strategy | No | shared |