Advanced code search and transformation powered by ugrep and ast-grep for modern development workflows.
Advanced code search and transformation for AI assistants
A comprehensive Model Context Protocol (MCP) server that combines the power of ugrep and ast-grep philosophies to deliver intelligent search and replace capabilities for modern development workflows.
CodeSeeker provides AI assistants with complete search AND replace capabilities:
Ubuntu/Debian:
sudo apt-get install ugrep
macOS (Homebrew):
brew install ugrep
Windows (Chocolatey):
choco install ugrep
From source:
git clone https://github.com/Genivia/ugrep.git
cd ugrep
./configure
make
sudo make install
Verify installation:
ugrep --version
# Should show version 7.4 or higher
Ensure you have Node.js 18+ installed:
node --version
# Should show v18.0.0 or higher
git clone https://github.com/yourusername/codeseeker-mcp.git
cd codeseeker-mcp
npm install
npm run build
npm test
# Should show all tests passing
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"codeseeker": {
"command": "node",
"args": ["/absolute/path/to/codeseeker-mcp/build/index.js"]
}
}
}
Note: Replace /absolute/path/to/codeseeker-mcp
with the actual path to your installation.
Search for "function" in JavaScript files:
- Pattern: function
- File Types: js,ts
- Path: ./src
- Case Sensitive: false
Find TODO items that are urgent but not marked as later:
- Query: TODO AND urgent -NOT later
- File Types: cpp,h,js,py
Find "function" with up to 2 character errors (matches "functoin", "functio", etc.):
- Pattern: function
- Max Errors: 2
- File Types: js,ts,py
Replace old function names with new ones (safe preview first):
- Pattern: oldFunctionName
- Replacement: newFunctionName
- File Types: js,ts
- Dry Run: true (preview changes)
- Backup: true (create backups)
Multiple replacements in one operation:
- Replace "var " with "const "
- Replace "== " with "=== "
- File Types: js,ts
- Dry Run: true
Refactor function names across a codebase:
- Structure Type: function
- Old Pattern: getUserData
- New Pattern: fetchUserData
- Language: typescript
- Dry Run: true
basic_search
Standard pattern search with filtering options.
Parameters:
pattern
(required): Search pattern or regexpath
(optional): Directory to search (default: current directory)caseSensitive
(optional): Case-sensitive search (default: false)fileTypes
(optional): Comma-separated file types (e.g., "js,py,cpp")excludeTypes
(optional): File types to excludecontextLines
(optional): Lines of context around matchesmaxResults
(optional): Maximum results (default: 100)boolean_search
Google-like search with boolean operators.
Parameters:
query
(required): Boolean query (supports AND, OR, NOT, parentheses)path
, fileTypes
, maxResults
: Same as basic searchExample queries:
"error AND (critical OR fatal)"
"TODO AND urgent -NOT completed"
"function OR method -NOT test"
fuzzy_search
Approximate pattern matching.
Parameters:
pattern
(required): Pattern to search formaxErrors
(optional): Character errors allowed 1-9 (default: 2)path
, fileTypes
, maxResults
: Same as basic searcharchive_search
Search compressed files and archives.
Parameters:
pattern
(required): Search patternpath
, maxResults
: Same as basic searcharchiveTypes
(optional): Archive types to searchcode_structure_search
Find specific code structures.
Parameters:
structureType
(required): Type to search for (function, class, method, import, variable)name
(optional): Specific name to search forlanguage
(required): Programming language (js, ts, py, java, cpp)path
, maxResults
: Same as basic searchinteractive_search
Launch interactive TUI mode.
Parameters:
initialPattern
(optional): Starting search patternpath
(optional): Starting directorysearch_and_replace
Safe find and replace with preview.
Parameters:
pattern
(required): Search pattern or regexreplacement
(required): Replacement text (supports $1, $2 capture groups)path
(optional): Directory to process (default: current directory)fileTypes
(optional): File types to includecaseSensitive
(optional): Case-sensitive search (default: false)dryRun
(optional): Preview mode (default: true)maxFiles
(optional): Maximum files to process (default: 50)backup
(optional): Create backups (default: true)bulk_replace
Multiple search/replace operations.
Parameters:
replacements
(required): Array of {pattern, replacement, description} objectspath
, fileTypes
, caseSensitive
, dryRun
, backup
: Same as search_and_replacecode_refactor
Language-aware code refactoring.
Parameters:
structureType
(required): Code structure type (function, class, variable, import)oldPattern
(required): Pattern to findnewPattern
(required): Replacement patternlanguage
(required): Programming language (js, ts, py, java, cpp)path
, dryRun
, backup
: Same as search_and_replacelist_file_types
Get all supported file types for filtering.
get_search_stats
Get detailed search statistics and performance metrics.
codeseeker-mcp/
βββ src/
β βββ index.ts # Main server implementation
βββ build/ # Compiled JavaScript output
βββ package.json # Node.js dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ test.js # Test suite
βββ README.md # This file
βββ SETUP.md # Quick setup guide
npm run build # Compile TypeScript
npm run dev # Watch mode for development
npm run inspector # Debug with MCP inspector
# Test basic functionality
npm test
# Use MCP inspector for interactive testing
npm run inspector
# Test with Claude Desktop
# (Add to config and restart Claude Desktop)
All replace operations default to dry-run mode for safety:
When making changes:
"ugrep not found"
ugrep --version
to verify installation"Permission denied"
chmod +x build/index.js
(on Unix systems)"Module not found errors"
npm install
to install dependencies"Claude Desktop not showing tools"
"No files found to process"
maxResults
parametergit checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)MIT License - see the LICENSE file for details.
Tool | Purpose | Input | Output |
---|---|---|---|
basic_search | Standard text search | Pattern + filters | Matches with context |
boolean_search | Logical search queries | Boolean expression | Filtered results |
fuzzy_search | Approximate matching | Pattern + error tolerance | Fuzzy matches |
archive_search | Search compressed files | Pattern + archive types | Archive contents |
code_structure_search | Find code elements | Structure type + language | Code definitions |
search_and_replace | Find and replace text | Pattern + replacement | Preview/changes |
bulk_replace | Multiple replacements | Array of operations | Batch results |
code_refactor | Refactor code structures | Old/new patterns + language | Refactored code |
interactive_search | Launch TUI mode | Initial pattern | Command to run |
list_file_types | Show supported types | None | Available extensions |
get_search_stats | Search metrics | Search parameters | Performance stats |
CodeSeeker - Intelligence in every search, precision in every change.
Total Tools Available: 11 (8 search + 3 replace)
An MCP server (and command-line tool) to provide a dynamic map of chat-related files from the repository with their function prototypes and related files in order of relevance. Based on the "Repo Map" functionality in Aider.chat
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMaticβs API.
Provides real-time access to Chainlink's decentralized on-chain price feeds.
An MCP (Model Context Protocol) aggregator that allows you to combine multiple MCP servers into a single endpoint allowing to filter specific tools.
Navigate and explore the Model Context Protocol specification with dynamic markdown tree generation and intelligent section navigation.
Obtains latest dependency details for Clojure libraries.
An MCP server and client implementation for EdgeOne Pages Functions, supporting OpenAI-formatted requests.
A server for Zep, a long-term memory store for AI applications, requiring a ZEP_API_KEY for access.
Manages penetration testing reports and vulnerabilities via a REST API.
Provides multi-cluster Kubernetes management and operations using MCP, featuring a management interface, logging, and nearly 50 built-in tools covering common DevOps and development scenarios. Supports both standard and CRD resources.