A tiny, local-first CLI that finds the files your AI coding agent actually needs — and packs them into a focused context.
pip install -e .
# or from PyPI once published:
# pip install agent-context
From your project root:
agent-context pack "implement OAuth callback" --tokens 12000
This writes .agent-context/context.md.
Then in Claude Code, point the agent at that file — for example:
Read .agent-context/context.md and implement the OAuth callback described in the Task section.
Stay within the listed files unless you discover a clear gap.
Or paste / attach the markdown directly into the session.
agent-context pack "implement OAuth callback" --verbose
agent-context analyze
agent-context explain
Expose read-only tools to Claude Code over stdio:
claude mcp add agent-context -- agent-context mcp
Tools:
| Tool | Purpose |
|---|---|
analyze_repository | File counts, token estimates, sensitive path names |
find_relevant_files | Ranked paths + scores for a task |
build_context | Packed markdown (secrets redacted) |
repository_map | Heuristic stack / layout summary |
The MCP server never executes project commands and never modifies source files.
agent-context itself stays local. Once Claude Code (or any cloud agent) receives the packed context, that agent's normal data-handling rules apply — review .agent-context/context.md before sharing sensitive repos.