MCP-Grep
通过模型上下文协议 (MCP) 公开 grep 功能的 grep 服务器实现。
安装
用法
MCP-Grep 作为服务器运行,可供 MCP 兼容客户端使用:
该服务器公开以下 MCP 功能:
资源:
grep://info
- 返回有关系统 grep 二进制文件的信息工具:
grep
- 使用系统 grep 二进制文件搜索文件中的模式
特征
有关系统 grep 二进制文件的信息(路径、版本、支持的功能)
使用正则表达式在文件中搜索模式
支持常见的 grep 选项:
不区分大小写的匹配
上下文行(匹配之前和之后)
最大匹配数
固定字符串匹配(非正则表达式)
递归目录搜索
自然语言提示理解,更易于与法学硕士 (LLM) 一起使用
通过 MCP Inspector 进行交互式调试和测试
API 使用示例
使用 MCP Python 客户端:
自然语言提示
MCP-Grep 能够理解自然语言提示,使其更易于与 LLM 一起使用。示例:
MCP 检查器集成
MCP-Grep 包含一个 MCP Inspector 集成,用于交互式调试和测试:
这将打开一个基于 Web 的用户界面,您可以在其中执行以下操作:
探索可用的资源和工具
使用不同的参数测试 grep 操作
查看格式化的结果
调试 grep 查询的问题
发展
执照
麻省理工学院
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
通过模型上下文协议公开 grep 功能的服务器实现,允许 MCP 兼容客户端使用正则表达式在文件中搜索模式。
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.Last updated -91157MIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for querying the CVE-Search API. This server provides comprehensive access to CVE-Search, browse vendor and product、get CVE per CVE-ID、get the last updated CVEs.Last updated -656MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides tools to find regex pattern positions in files and list allowed directories, enabling text analysis with LSP-like functionality.Last updated -2MIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that scrapes, indexes, and searches documentation for third-party software libraries and packages, supporting versioning and hybrid search.Last updated -542676MIT License