The analysis tool answers the question that decides everything else — how many tokens this tree is — and the context tool then packs only what you chose to include. That order is what keeps a large repository from becoming a truncated prompt.
An MCP server around the codetoprompt library, which packs a codebase into a single prompt with filtering, formatting and compression options exposed as tool parameters.
- A whole directory rendered into one prompt, with codetoprompt's filtering, formatting and compression options available on the call
- A statistical read of the codebase first: token counts, line counts and a breakdown by file type
- The contents of specific files formatted as a prompt, when only part of the tree matters
- The same packing behaviour the CLI gives you, available to an agent without shelling out
Pip install codetoprompt-mcp, which brings in codetoprompt and the mcp library, then a single `ctp-mcp` command in your client config. No account and no key — it reads the files you point it at.
One command — pip install codetoprompt-mcp
