Repository Management
Open and analyze local or remote repositories with Kit's powerful tools
Overview
Repository management is the foundation of Kit MCP. Once you open a repository, you get access to all of Kit's code intelligence features: symbol extraction, dependency analysis, code search, and more.
open_repository
Opens a local directory or GitHub repository for analysis
open_repository(path="/path/to/repo")
get_file_tree
Returns the complete file structure of the repository
get_file_tree(repo_id="...")
grep_code
Fast literal string search across repository files
grep_code(repo_id="...", pattern="TODO")
extract_symbols
Extract symbols (functions, classes, etc.) from a file
extract_symbols(repo_id="...", file_path="main.py")
Opening Repositories
Open a local repository by providing the absolute path:
# Ask your AI:
"Open the repository at /Users/me/my-project"
# Or be specific:
"Using Kit, open the project at /Users/me/my-project"
# The AI will execute:
open_repository(path="/Users/me/my-project")
Tip: The repository ID returned is used for all subsequent operations.
Working with Code
Explore repository structure:
get_file_tree(repo_id="...")
Returns structured file tree with paths and metadata
Search for patterns in code:
grep_code(repo_id="...", pattern="TODO")
Fast literal string search across all files
Code Analysis Tools
Additional tools for analyzing and understanding code:
Find where symbols are used across the codebase
Review git diffs with AI-powered analysis
Search code using AST patterns for semantic search
Best Practices
All other operations require an open repository with a valid repo_id
Fast literal string search is great for finding TODOs, imports, and specific code patterns
AST patterns let you find code by structure, not just text