Logo CodeSeeker

CodeSeeker

Cộng đồng
mixelpixx

🔍 Advanced code search and transformation MCP server for AI assistants. Combines ugrep's speed with intelligent replace capabilities, dry-run previews, and language-aware refactoring across 11 tools.

Nhà phát hànhmixelpixx
Kho mãCodeSeeker-MCP
Ngôn ngữJavaScript
Bản fork
3
Sao
10
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    CodeSeeker cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    10 sao và 3 bản fork từ kho mã được liên kết.

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++

📋 Prerequisites

1. Install ugrep

Ubuntu/Debian:

bash
sudo apt-get install ugrep

macOS (Homebrew):

bash
brew install ugrep

Windows (Chocolatey):

bash
choco install ugrep

From source:

bash
git clone https://github.com/Genivia/ugrep.git
cd ugrep
./configure
make
sudo make install

Verify installation:

bash
ugrep --version
# Should show version 7.4 or higher

2. Install Node.js

Ensure you have Node.js 18+ installed:

bash
node --version
# Should show v18.0.0 or higher

🛠️ Installation

Clone and Build

bash
git clone https://github.com/yourusername/codeseeker-mcp.git
cd codeseeker-mcp
npm install
npm run build

Quick Test

bash
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

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: false

Boolean Search

Find TODO items that are urgent but not marked as later:
- Query: TODO AND urgent -NOT later
- File Types: cpp,h,js,py

Fuzzy Search

Find "function" with up to 2 character errors (matches "functoin", "functio", etc.):
- Pattern: function  
- Max Errors: 2
- File Types: js,ts,py

Search 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: true

Code 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 regex
  • path (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 exclude
  • contextLines (optional): Lines of context around matches
  • maxResults (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 for
  • maxErrors (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 pattern
  • path, maxResults: Same as basic search
  • archiveTypes (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 for
  • language (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 pattern
  • path (optional): Starting directory

Replace Tools

search_and_replace

Safe find and replace with preview.

Parameters:

  • pattern (required): Search pattern or regex
  • replacement (required): Replacement text (supports $1, $2 capture groups)
  • path (optional): Directory to process (default: current directory)
  • fileTypes (optional): File types to include
  • caseSensitive (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} objects
  • path, 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 find
  • newPattern (required): Replacement pattern
  • language (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 guide

Building

bash
npm run build           # Compile TypeScript
npm run dev            # Watch mode for development
npm run inspector      # Debug with MCP inspector

Testing the Server

bash
# 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 --version to 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 install to install dependencies
  • Ensure 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 maxResults parameter
  • Replace operations process files efficiently with streaming
  • Interactive mode requires a terminal and cannot run through MCP

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License - see the LICENSE file for details.

🔗 Related Projects

📊 Tool Summary

ToolPurposeInputOutput
basic_searchStandard text searchPattern + filtersMatches with context
boolean_searchLogical search queriesBoolean expressionFiltered results
fuzzy_searchApproximate matchingPattern + error toleranceFuzzy matches
archive_searchSearch compressed filesPattern + archive typesArchive contents
code_structure_searchFind code elementsStructure type + languageCode definitions
search_and_replaceFind and replace textPattern + replacementPreview/changes
bulk_replaceMultiple replacementsArray of operationsBatch results
code_refactorRefactor code structuresOld/new patterns + languageRefactored code
interactive_searchLaunch TUI modeInitial patternCommand to run
list_file_typesShow supported typesNoneAvailable extensions
get_search_statsSearch metricsSearch parametersPerformance stats

CodeSeeker - Intelligence in every search, precision in every change.

Total Tools Available: 11 (8 search + 3 replace)

Dùng MCP CodeSeeker với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối CodeSeeker, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm CodeSeeker làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của CodeSeeker.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "codeseeker-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của CodeSeeker, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của CodeSeeker.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng CodeSeeker giúp tôi làm việc này không?
CodeSeeker
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng CodeSeeker.

Câu hỏi thường gặp

Máy chủ MCP CodeSeeker dùng để làm gì?

CodeSeeker là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP CodeSeeker với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng CodeSeeker với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP CodeSeeker với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối CodeSeeker, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP CodeSeeker với TypingMind?

CodeSeeker hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP CodeSeeker cung cấp những công cụ nào trong TypingMind?

CodeSeeker cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP CodeSeeker không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu CodeSeeker yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇