# Agentgrep

> Read-only search for local AI agent prompts and history (Codex, Claude, Cursor)

- **Type:** MCP server
- **Install:** `agentstack add mcp-tony-agentgrep`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tony](https://agentstack.voostack.com/s/tony)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tony](https://github.com/tony)
- **Source:** https://github.com/tony/agentgrep
- **Website:** https://agentgrep.org

## Install

```sh
agentstack add mcp-tony-agentgrep
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# agentgrep

[](https://pypi.org/project/agentgrep/)
[](https://pypi.org/project/agentgrep/)
[](LICENSE)

Read-only search for local AI agent prompts and opt-in conversations
across Codex, Claude Code, Cursor, Gemini, Antigravity, Grok, Pi, OpenCode, and VS Code.

`agentgrep` provides a CLI and an MCP server over the same discovery + parsing layer:

- **A terminal CLI** (`agentgrep`) with a Textual TUI for interactive
  browsing of normalized records.
- **An MCP server** (`agentgrep-mcp`) that exposes search, discovery,
  catalog, and validation tools to any client that speaks Model
  Context Protocol.

> **Pre-alpha.** APIs may change.

## Install

```console
$ uvx agentgrep --help
```

Other install methods (pipx, uv add, pip install) and full setup
snippets live in the
[installer widget on agentgrep.org/cli/](https://agentgrep.org/cli/).

## CLI quickstart

Search your prompts across every configured agent — ranked, deduped,
newest first:

```console
$ agentgrep search "deploy"
```

Search prompts and conversations together in one sweep:

```console
$ agentgrep search "deploy" --scope all
```

Prefer ripgrep-shaped flags? `grep` mirrors `rg` / `ag` against the
same records:

```console
$ agentgrep grep "deploy" --scope conversations
```

Stream JSON so a non-MCP agent or shell pipeline can consume the
results:

```console
$ agentgrep find --json
```

Open the read-only Textual explorer, seeded with a query:

```console
$ agentgrep ui "deploy"
```

`--json` and `--ndjson` make every command pipe-friendly, and any
search-shaped subcommand takes `--ui` to hand the same query to the
explorer (e.g. `agentgrep grep "deploy" --ui`). Agents that don't
speak MCP can drive the CLI directly; see
 for the per-subcommand reference.

## MCP server: quickest setup

In Claude Code:

```console
$ claude mcp add agentgrep -- uvx --from agentgrep agentgrep-mcp
```

For Claude Desktop / Codex / Cursor / Gemini snippets, see
.

## Library quickstart

```python
from pathlib import Path

import agentgrep

backends = agentgrep.select_backends()
query = agentgrep.SearchQuery(
    terms=("hello",),
    scope="all",
    any_term=False,
    regex=False,
    case_sensitive=False,
    agents=agentgrep.AGENT_CHOICES,
    limit=10,
)
for record in agentgrep.run_search_query(Path.home(), query, backends=backends):
    print(record.agent, record.title or record.path)
```

## Links

- Documentation: 
- Source: 
- Issues: 
- Changelog: [CHANGES](CHANGES)
- License: [MIT](LICENSE)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tony](https://github.com/tony)
- **Source:** [tony/agentgrep](https://github.com/tony/agentgrep)
- **License:** MIT
- **Homepage:** https://agentgrep.org

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** yes
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-tony-agentgrep
- Seller: https://agentstack.voostack.com/s/tony
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
