Back to course

Daily Repetition 8: The 'Local Search' (Grep) Tool

Model Context Protocol (MCP) Server Engineering

Daily Repetition: Tool #8

Searching through many files is common. Let's build a tool that searches for a string inside a directory.

Implementation

Use the grep command (via child_process) or a library like fast-glob.

Assignment: Implement a search_files tool and find where "TODO" is mentioned in your project.