agentgrep MCP server
Commit Nov 15, 2026Search local AI agent prompt histories and conversations across multiple platforms like Claude, Cursor, and Gemini.
Also known as tony/agentgrep
- Stars
- 9
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 15, 2026
- License
- MIT
What is agentgrep MCP?
agentgrep searches local AI agent prompt histories and conversations across multiple platforms like Claude, Cursor, and Gemini.
Summary generated from the project's README
About agentgrep MCP server
Finding specific instructions or past interactions within your local AI history is what agentgrep enables for developers using multiple coding assistants. It provides a read-only way to search through prompt histories and opt-in conversations across platforms like Claude Code, Cursor, Gemini, VS Code, and Grok. By normalizing records from various backends, it allows you to locate previous prompts or specific conversation threads without manually checking every application.
Users can connect to this functionality via an MCP server using the agentgrep-mcp package, which exposes tools for search, discovery, cataloging, and validation to any Model Context Protocol client. The system is designed for Linux and macOS, though it works on Windows via WSL. It requires Python 3.14 or higher to run. Because it functions as a discovery layer, it helps you manage the fragmented data left behind by different AI agents through a single interface.
What you can do with it
- 1Locate previous deployment instructionsSearch through your local prompt history to find exactly how you previously instructed an agent to handle a deployment.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachabletony/agentgrep is public and reachablegithub.com/tony/agentgrep ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-08github.com/tony/agentgrep ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubagentgrep
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.
Requires Python 3.14+. Runs on Linux and macOS; native Windows is not supported, but Windows Subsystem for Linux (WSL) is.
[!WARNING] Alpha. Releases carry an
-alphaprerelease tag. The API is not settled, and any release may change or remove exported identifiers without a deprecation period. Pin an exact version. Not recommended for production.
Install
$ uvx agentgrep --help
Other install methods (pipx, uv add, pip install) and full setup snippets live in the installer widget on agentgrep.org/cli/.
CLI quickstart
Search fast prompt-history stores — ranked by relevance, deduped, with newest as the stable tie-break:
$ agentgrep search "deploy"
Use prompt matches to search selected conversations. Targeted search attempts at most 25 conversations by default and reports approximate coverage:
$ agentgrep search "deploy" --deep
Search prompt records across every readable conversation backend:
$ agentgrep search "deploy" --exhaustive
Search prompts and conversations together in one explicit deep sweep:
$ agentgrep search "deploy" --exhaustive --scope all
Prefer ripgrep-shaped flags? grep mirrors rg / ag against the
same records:
$ agentgrep grep "deploy" --scope conversations
Stream JSON so a non-MCP agent or shell pipeline can consume the results:
$ agentgrep find --json
Open the read-only Textual explorer, seeded with a query:
$ 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
https://agentgrep.org/cli/ for the per-subcommand reference.
Results and JSON/NDJSON payloads write to stdout; progress and diagnostics
write to stderr, so a piped command never sees the spinner. search exits
0 for at least one result and 1 for none; grep follows rg's
convention and adds 2 for a search error such as invalid regex. See
https://agentgrep.org/cli/ for the exit codes of each command.
MCP server: quickest setup
In Claude Code:
$ claude mcp add agentgrep -- uvx --from agentgrep agentgrep-mcp
For Claude Desktop / Codex / Cursor / Gemini snippets, see https://agentgrep.org/mcp/.
Library quickstart
from pathlib import Path
import agentgrep
backends = agentgrep.select_backends()
query = agentgrep.SearchQuery(
terms=("hello",),
scope="prompts",
any_term=False,
regex=False,
case_sensitive=False,
agents=agentgrep.AGENT_CHOICES,
limit=10,
effort="prompt",
)
result = agentgrep.run_search_result(Path.home(), query, backends=backends)
for record in result.records:
print(record.agent, record.title or record.path)
print(result.summary.status.state, result.summary.coverage)
Links
- Documentation: https://agentgrep.org/
- Source: https://github.com/tony/agentgrep
- Issues: https://github.com/tony/agentgrep/issues
- Changelog: CHANGES
- License: MIT
agentgrep MCP questions
What platforms does agentgrep support?
It provides read-only search for Codex, Claude Code, Cursor, Gemini, Antigravity, Grok, Pi, OpenCode, and VS Code.
Does agentgrep work on Windows?
Native Windows is not supported, but you can use it via the Windows Subsystem for Linux (WSL).
Is agentgrep ready for production use?
No, it is currently in alpha, meaning the API is not settled and may change without notice.