CodeSeeker-MCP
CodeSeeker-MCP is a powerful server for advanced code search and transformation, integrating ugrep and ast-grep with built-in safety features like dry-runs and automatic backups.
Core Capabilities:
Search Operations: Basic pattern searches, boolean logic searches, fuzzy matching, searching within archives, and interactive terminal-based searching
Code-Aware Features: Search by code structures (functions, classes, variables) across various programming languages
Transformation Tools: Safe find & replace with previews, bulk replacements, and language-aware code refactoring
Advanced Features: JSON output format, file type filtering, context line display, and detailed search statistics
Safety Mechanisms: Default dry-run mode and automatic backups ensure code integrity
Integration: Seamless workflow with Claude Desktop
Utility: Check ugrep installation status and get setup instructions
Supports installation of the required ugrep dependency through Chocolatey package manager on Windows systems
Provides instructions for installing the required ugrep dependency on Debian-based Linux distributions
Provides instructions for installing ugrep from source using Git for cloning the repository
Supports installation of the required ugrep dependency through Homebrew package manager on macOS systems
Requires Node.js 18+ as a prerequisite for running the MCP server
Provides instructions for installing the required ugrep dependency on Ubuntu/Debian Linux distributions
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CodeSeeker-MCPsearch for 'TODO' in JavaScript files in the src directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CodeSeeker
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.
š Features
CodeSeeker provides AI assistants with complete search AND replace capabilities:
š Core Search Tools
Basic Search: Standard pattern matching with file type filtering and context
Boolean Search: Google-like search with AND, OR, NOT operators
Fuzzy Search: Approximate pattern matching allowing character errors
Archive Search: Search inside compressed files and archives (zip, tar, 7z, etc.)
Interactive Search: Launch ugrep's TUI for real-time search
Code Structure Search: Find functions, classes, methods, imports, and variables
š§ Search & Replace Tools
Search and Replace: Safe find & replace with dry-run preview and automatic backups
Bulk Replace: Multiple search/replace operations in a single command
Code Refactor: Language-aware refactoring for code structures across multiple languages
ā” Advanced Features
JSON Output: Structured results perfect for AI processing
File Type Filtering: Search specific programming languages or document types
Context Lines: Show surrounding lines for better understanding
Search Statistics: Get detailed metrics about search operations
Archive Support: Search nested archives without extraction
Safety First: Dry-run mode by default with automatic backup creation
Language Awareness: Smart patterns for JavaScript, TypeScript, Python, Java, C++
Related MCP server: ast-editor
š Prerequisites
1. Install ugrep
Ubuntu/Debian:
sudo apt-get install ugrepmacOS (Homebrew):
brew install ugrepWindows (Chocolatey):
choco install ugrepFrom source:
git clone https://github.com/Genivia/ugrep.git
cd ugrep
./configure
make
sudo make installVerify installation:
ugrep --version
# Should show version 7.4 or higher2. Install Node.js
Ensure you have Node.js 18+ installed:
node --version
# Should show v18.0.0 or higherš ļø Installation
Clone and Build
git clone https://github.com/yourusername/codeseeker-mcp.git
cd codeseeker-mcp
npm install
npm run buildQuick Test
npm test
# Should show all tests passingāļø Configuration
Claude Desktop Integration
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.
š Usage Examples
Basic Search
Search for "function" in JavaScript files:
- Pattern: function
- File Types: js,ts
- Path: ./src
- Case Sensitive: falseBoolean Search
Find TODO items that are urgent but not marked as later:
- Query: TODO AND urgent -NOT later
- File Types: cpp,h,js,pyFuzzy Search
Find "function" with up to 2 character errors (matches "functoin", "functio", etc.):
- Pattern: function
- Max Errors: 2
- File Types: js,ts,pySearch and Replace
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)Bulk Replace
Multiple replacements in one operation:
- Replace "var " with "const "
- Replace "== " with "=== "
- File Types: js,ts
- Dry Run: trueCode Refactor
Refactor function names across a codebase:
- Structure Type: function
- Old Pattern: getUserData
- New Pattern: fetchUserData
- Language: typescript
- Dry Run: trueš§ Tool Reference
Search Tools
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 search
Example 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 search
archive_search
Search compressed files and archives.
Parameters:
pattern(required): Search patternpath,maxResults: Same as basic searcharchiveTypes(optional): Archive types to search
code_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 search
interactive_search
Launch interactive TUI mode.
Parameters:
initialPattern(optional): Starting search patternpath(optional): Starting directory
Replace Tools
search_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_replace
code_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_replace
Utility Tools
list_file_types
Get all supported file types for filtering.
get_search_stats
Get detailed search statistics and performance metrics.
šļø Development
Project Structure
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 guideBuilding
npm run build # Compile TypeScript
npm run dev # Watch mode for development
npm run inspector # Debug with MCP inspectorTesting the Server
# 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)šØ Safety Features
Dry Run Mode
All replace operations default to dry-run mode for safety:
Preview changes before applying
See exactly what will be modified
No accidental overwrites
Automatic Backups
When making changes:
Backup files created automatically with timestamps
Original files preserved
Easy rollback if needed
Error Handling
Comprehensive error messages
Graceful failure handling
File permission checking
š Troubleshooting
Common Issues
"ugrep not found"
Ensure ugrep is installed and in your PATH
Run
ugrep --versionto verify installation
"Permission denied"
Make sure the build/index.js file is executable
Run
chmod +x build/index.js(on Unix systems)
"Module not found errors"
Run
npm installto install dependenciesEnsure you're using Node.js 18 or higher
"Claude Desktop not showing tools"
Verify the configuration file path is correct
Restart Claude Desktop after configuration changes
Check Claude Desktop logs for connection errors
"No files found to process"
Check that the path exists and contains matching files
Verify file type filters are correct
Ensure ugrep can access the specified directories
ā” Performance Notes
ugrep is extremely fast, often outperforming other grep tools
JSON output adds minimal overhead
Archive searching may be slower depending on compression
Large result sets are limited by
maxResultsparameterReplace operations process files efficiently with streaming
Interactive mode requires a terminal and cannot run through MCP
š¤ Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
š License
MIT License - see the LICENSE file for details.
š Related Projects
ugrep - The ultra-fast grep replacement
ast-grep - AST-based code search and rewrite tool
Model Context Protocol - Open standard for AI-data connections
Claude Desktop - AI assistant with MCP support
š Tool Summary
Tool | Purpose | Input | Output |
| Standard text search | Pattern + filters | Matches with context |
| Logical search queries | Boolean expression | Filtered results |
| Approximate matching | Pattern + error tolerance | Fuzzy matches |
| Search compressed files | Pattern + archive types | Archive contents |
| Find code elements | Structure type + language | Code definitions |
| Find and replace text | Pattern + replacement | Preview/changes |
| Multiple replacements | Array of operations | Batch results |
| Refactor code structures | Old/new patterns + language | Refactored code |
| Launch TUI mode | Initial pattern | Command to run |
| Show supported types | None | Available extensions |
| Search metrics | Search parameters | Performance stats |
CodeSeeker - Intelligence in every search, precision in every change.
Total Tools Available: 11 (8 search + 3 replace)
Available Tools
1 toolcheck_ugrep_installationB
Check if ugrep is installed and get installation instructions
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does (check installation status and provide instructions) but doesn't describe how it performs these checks (e.g., system calls, file existence), what format the instructions come in, whether it has side effects, or any error handling. For a tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the core purpose ('Check if ugrep is installed') and adds secondary function ('and get installation instructions') without waste. Every word earns its place, making it highly concise and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (no parameters, no output schema, no annotations), the description is minimally complete but lacks depth. It covers the basic 'what' but not the 'how' or behavioral details. Without annotations or output schema, the description should ideally explain what the return value looks like (e.g., boolean status plus text instructions) to be more helpful, but it's adequate for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters with 100% schema description coverage (empty schema), so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and it doesn't need to compensate for any schema gaps. This is efficient and avoids unnecessary information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('check' and 'get') and resources ('ugrep installation'), making it immediately understandable. It distinguishes between two related functions (verification and instruction retrieval) but doesn't need sibling differentiation since there are no sibling tools. The description avoids tautology by not simply restating the tool name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context (when you need to verify ugrep installation or get installation help) but doesn't provide explicit guidance on when to use this tool versus alternatives. Since there are no sibling tools, the lack of comparative guidance is less critical, but it still doesn't specify prerequisites, timing, or exclusion criteria beyond the implied context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- First observed
check_ugrep_installation
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined and distinct by default.
The single tool follows a consistent verb_noun pattern (check_ugrep_installation), and with only one tool, there is no inconsistency to evaluate. The naming is clear and predictable.
A single tool is too few for a server named 'CodeSeeker-MCP', which suggests a broader purpose related to code searching or analysis. This minimal toolset feels thin and under-scoped for the implied domain.
The toolset is severely incomplete for the apparent domain of code seeking. It only checks for ugrep installation, lacking any tools for actual code searching, analysis, or other related operations, creating significant gaps that will cause agent failures.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Nifty's MCP server ā exposes tasks, projects, messages, and files as tools for AI agents.
AI-native git hosting ā repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Related MCP Servers
- AlicenseAqualityAmaintenanceUnified MCP server combining hybrid search (vector + BM25 + code graph), structural code analysis, and persistent semantic memory. 15 tools, 25+ languages, <350MB RAM, fully local.10MIT
- AlicenseAqualityCmaintenanceAST-targeted code editing MCP server with 28 surgical tools for structural edits across 11 languages. Built on tree-sitter, replaces brittle search/replace with byte-correct edits keyed by symbol names.28MIT
- AlicenseAqualityCmaintenanceMCP server that combines Read+Edit file operations into single tool calls. 80-95% fewer tool calls formulti-file refactoring across Claude, Cursor, Windsurf, and more.3213MIT
- AlicenseNot gradedqualityDmaintenanceA modular MCP server for code analysis using ast-grep, enabling structural pattern matching and transformations across multiple languages.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mixelpixx/CodeSeeker-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server