# grep_regex

Search using a direct regex pattern

Agent View of the PolicyLayer registry record for `grep_regex`. HTML page: https://policylayer.com/tools/247arjun-mcp-grep/grep-regex

## Facts

- Tool: `grep_regex`
- Server: Grep MCP Server (`247arjun/mcp-grep`) — https://policylayer.com/tools/247arjun-mcp-grep.md
- Homepage: https://github.com/247arjun/mcp-grep
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "grep_regex",
    "arguments": {}
  }
}
```

## Why grep_regex is rated Low

This tool performs read-only text search operations using regex patterns against files. It retrieves and returns matching content without creating, modifying, deleting, or executing any operations. The grep utility in this context is used for search only, not for command injection or execution of arbitrary code.

From the tool's own definition: "Tool name 'grep_regex' and description 'Search using a direct regex pattern' indicate text search functionality with no data modification or command execution capabilities."

## Use case

AI agents call grep_regex to retrieve information from Grep MCP Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Grep MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "grep_regex": {}
  }
}
```

## Other tools on Grep MCP Server (4)

- `grep_advanced` — Execute — https://policylayer.com/tools/247arjun-mcp-grep/grep-advanced.md
- `grep_count` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-count.md
- `grep_files_with_matches` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-files-with-matches.md
- `grep_search_intent` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-search-intent.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=247arjun-mcp-grep · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/247arjun-mcp-grep
