Atlas / MCP servers / pro-target / ai-r

ai-rCAUTION

mcp/pro-target/ai-r

Read local AI agent sessions (Claude Code, Codex, OpenCode, Antigravity, Pi): intents, plans, tools

Verdict
CAUTION
Grade
F
Trust score
51 /100
Exposed tools
20 17r · 3w · 0d
Transport
stdio · streamable-http
License
MIT
Stars
3
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://github.com/pro-target/ai-r/actions) [](https://github.com/pro-target/ai-r/actions) [](https://github.com/pro-target/ai-r/actions) [](./LICENSE) [](https://www.python.org/downloads/)

English | Русский | 中文 | 日本語 | Español

An agent reported "done." There's nothing to check it against.

ai-r reads the session history of any of the five coding agents and lets a fresh agent cold-check what git can't answer:

  • did it lie, did it break anything — did it keep its word, did it run anything

dangerous (and roll it back if it did), what it actually changed, what it cost;

  • why it went that way — under which plan, with what intent, and whose hand was

behind the edit.

Across our own corpus — 1600+ sessions of five agents in 20+ projects — that's how we found 312 risky commands (rm -rf, curl|sh, git push --force): the agent caught and rolled back two itself; the other 310 ran silently — git won't show them.

git shows what made it into the code; ai-r shows whether you can trust how the agent got there. Read-only: no LLM calls, no network.

Quick example — an agent asks about history

The primary mode is MCP: an agent (Claude, Codex, ...) calls ai-r directly and asks about history in plain language. For example — pull the plan the previous agent settled on, drafts discarded:

Show me the plan from the last session — final only, no intermediate revisions.
→ plan(session=..., kind="final")  →  get_body(id, shallow=true)

plan:            "Migrate auth to
Read from source at commit 02f774875659OBSERVED · 2026-10-11
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code (pypi)
claude mcp add agent-session-reader -- uvx agent-session-reader==0.4.2
03

Exposed tools (20)

17 read · 3 write · 0 destructive.

ToolRiskDescription
aggregatereadRoll a list of row dicts up by ``group_by`` — the generic stats verb.
audit_briefreadToken-lean, budgeted session digest for auditors — the *audit_brief* preset.
detect_currentreadReturn the current runtime identity (session + agent) from env/fs.
diffwriteStitch edit rows into a per-file chronological diff — the diff verb.
find_file_editswriteFind every file edit across sessions, cross-agent by default.
find_tool_callsreadFind every tool call across sessions, cross-agent by default.
get_bodyreadReturn the on-demand body for an event / plan ``id``.
incidentsreadDangerous shell commands + regret reactions — the *incidents* preset.
list_sessionsreadList discoverable sessions, optionally filtered by ``agent``.
locatereadFind a session across all agents by uuid / id-prefix / title — *locate*.
networkreadNetwork-egress audit — the *network* preset (F4.3).
planreadNormalized plan atoms for a session — final vs drafts, grouped by task.
queryreadFilter/search the unified session **event** stream — the workhorse verb.
quotesreadUser quotes of prior in-session content — the *quotes* preset.
read_sessionreadRead a single session by ``uuid``; ``agent`` is an optional hint.
rendezvouswrite# Blocks until all N calls arrive — only possible if they run in
search_sessionsreadCase-insensitive search across sessions.
session_diffreadReconstruct *what the agent changed* in one session — without git.
session_statsreadSummarise sessions, grouped and ranked — the *bird
whoamireadseen[
04

Trust audit

CAUTIONgrade F · trust 51/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (8 observation(s))
Shell
none-observed
Dependencies
pinned
Secrets in source
found

Findings (25)

MEDIUMNetwork egress · net.beacon_words · CWE-200, CWE-319
src/ai_r/network.py:93
"secret_in_query",        # ...or on the search-query text (exfil shape)
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
install.sh:262
log "then set agent MCP configs to http://127.0.0.1:8756/mcp"
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
src/ai_r/serve.py:174
"http://127.0.0.1:*",
MEDIUMObfuscation / stealth · obf.homoglyph · CWE-506, CWE-94
src/ai_r/outcome.py:109
_marker("работает", r"\bзаработал[оа]?\b|\bработает\b|\bсработало\b"),
MEDIUMObfuscation / stealth · obf.homoglyph · CWE-506, CWE-94
src/ai_r/outcome.py:110
_marker("готово", r"\bготово\b"),
MEDIUMObfuscation / stealth · obf.homoglyph · CWE-506, CWE-94
src/ai_r/outcome.py:111
_marker("отлично", r"\bотлично\b|\bсупер\b|\bкласс\b|\bогонь\b|\bидеально\b"),
MEDIUMObfuscation / stealth · obf.homoglyph · CWE-506, CWE-94
src/ai_r/outcome.py:112
_marker("спасибо", r"\bспасибо\b|\bблагодарю\b"),
MEDIUMObfuscation / stealth · obf.homoglyph · CWE-506, CWE-94
src/ai_r/outcome.py:113
_marker("ок", r"\bок\b|\bокей\b"),
MEDIUMHard-coded secrets · secret.anthropic · CWE-798, CWE-321
tests/test_redact.py:42
ANTHROPIC_KEY = "sk-ant-api03-abc123def456ghi789"
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
tests/test_incidents.py:386
secret = "sk-abc123def456ghi789jkl012mno345"
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
tests/test_quotes.py:211
secret = "sk-abc123def456ghi789jkl0mno"
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
tests/test_tool_resolution.py:384
token = "ghp_0123456789abcdef0123456789abcdef0123"
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
docs/scenarios.md:1157
- **Preconditions:** none. `[hermetic-ok]` (seed under `AI_R_HOME` one claude session whose title AND a message body contain a fake `ghp_0123456789abcdefghijklmnopqrstuvwxyzA`).
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
tests/conftest.py:236
"ghp_0123456789abcdef0123456789abcdef0123\n"
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
tests/test_get_body_tool_call.py:144
assert "ghp_0123456789abcdef0123456789abcdef0123" in raw_serialized
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
tests/test_tool_resolution.py:384
token = "ghp_0123456789abcdef0123456789abcdef0123"
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
tests/test_user_refs.py:575
"ghp_0123456789abcdef0123456789abcdef0123")},
MEDIUMHard-coded secrets · secret.private_key · CWE-798, CWE-321
tests/test_redact.py:69
"-----BEGIN RSA PRIVATE KEY-----\n"
MEDIUMHard-coded secrets · secret.slack · CWE-798, CWE-321
tests/test_redact.py:47
SLACK_TOKEN = "xoxb-1234567890-abcdefghij"
MEDIUMHard-coded secrets · secret.stripe · CWE-798, CWE-321
docs/scenarios.md:1149
- **Preconditions:** none. `[hermetic-ok]` (seed one synthetic claude session whose turns paste a fake `sk_live_0123456789abcdefghij`, a fake three-segment `eyJhbGciOi....eyJzdWIi....sig` JWT, and a f
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/ai_r/parsers/opencode.py:345
h = hashlib.sha1(db_path.encode()).hexdigest()[:16]
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/mcp-registration.md:20
> claude mcp add --transport http ai-r http://127.0.0.1:8756/mcp
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/shared-server.md:103
3. Point each agent at `http://127.0.0.1:8756/mcp` (Claude:
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/shared-server.md:106
`claude mcp add --transport http ai-r http://127.0.0.1:8756/mcp -s user` —
INFOSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.es.md:23
> `curl|sh`, `git push --force`): el agente detectó y revirtió dos por sí mismo;

Gates applied: no_behavioural_pass.

Audited 2026-10-11 · audit v0.4.1 · source sha 02f774875659full audit observations/trust-audit/mcp-server/pro-target__ai-r.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-1102f774875659CAUTIONF51first audit
06

Questions

What is the ai-r MCP server?

Read local AI agent sessions (Claude Code, Codex, OpenCode, Antigravity, Pi): intents, plans, tools

What tools does ai-r expose?

20 in total: 17 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is ai-r safe to connect to an agent?

With care. The audit graded it F (51/100) and found 25 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does ai-r need?

It reads AI_R_DEDUP_KEY_LEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does ai-r run?

It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as agent-session-reader.

How current is this page?

The grade is for one exact copy of the source (02f774875659), read on 2026-10-11. The repository is watched and re-audited when it changes.

Advertisement