Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Pi Lean Ctx

MCP server by yvgude Verified · npm:pi-lean-ctx

Pi Lean Ctx is a Pi Coding Agent integration for LeanCTX, a context gateway for AI systems. It selects task-relevant context and applies configured controls before the assistant reads it. It is for developers who use AI coding tools and want leaner context.

  • Score 93
  • 4k stars
  • 2.5k a week
  • Apache-2.0
  • Updated

Install Pi Lean Ctx

Built from the published package, never by AI.

claude mcp add pi-lean-ctx -- npx -y pi-lean-ctx

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Pi Lean Ctx in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the pi-lean-ctx block.

About

LeanCTX sits between AI tools and the files, command output and web content they read. It selects task-relevant context using search, structural views, compression and reuse, and it can apply configured path permissions, content filters and context budgets to supported calls. It also keeps local task, finding and decision records across sessions, within the configured access and retention rules.

The open-source LeanCTX | OSS runs locally through CLI, MCP, hooks and proxy paths. The source describes it as a way to improve the context path of existing AI tools such as Claude Code, Cursor or Codex. The host application keeps control of the task, agent loop and model. The listing is aimed at developers who want to reduce repeated context use and inspect what context was delivered.

Written from the project's README and checked against it.

Tools it gives your assistant

  • ctx_url_readPulls a public web page, PDF or YouTube transcript into context as compressed, citation-backed text.
  • ctx_expandExpands compact views to source or archived content, and searches previously archived tool outputs.
  • ctx_patchEdits a whole symbol body with op=replace_symbol through supported language servers.
  • ctx_callgraphFinds references for a symbol through supported language servers.
  • ctx_agentExperimental local agent handoff with context transfer bundles and shared state.
  • ctx_proofExports an audit trail of recorded context operations and policy checks.

Try asking

  • Read this large file in map mode so I can see its structure first
  • Summarize this PDF with citations using ctx_url_read
  • Find all references to this function using ctx_callgraph

Good to know

  • Agent handoff, context packages and addons are experimental Research features.
  • Shadow Mode savings are simulated estimates, not measured answer quality.
  • A filesystem boundary is not an operating-system sandbox.
  • A context-only integration cannot prove the host's later model call.

Security check

C
  • Downloads a script from the internet and runs itIn README.md: curl -fsSL https://leanctx.com/install.sh | sh

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Pi Lean Ctx

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

Pi Lean Ctx: common questions

Does LeanCTX train my AI model?

The source says its learning features provide context continuity and do not train your model. The host keeps control of the model.

Which AI tools does LeanCTX work with?

The source recommends starting with Claude Code, Cursor or Codex for coding workflows. It also mentions a installation matrix for other compatibility references.

Does LeanCTX run locally?

Yes. The open-source LeanCTX | OSS runs locally through CLI, MCP, hooks and proxy paths.

How do I install Pi Lean Ctx?

In Claude Code run claude mcp add pi-lean-ctx -- npx -y pi-lean-ctx. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Pi Lean Ctx the official server?

Pi Lean Ctx is published by npm:pi-lean-ctx from its verified domain in the official MCP Registry.

Is Pi Lean Ctx free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is Pi Lean Ctx safe to use?

It scores 93 of 100. Grades: maintenance A, licence A, quality A. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.

What are alternatives to Pi Lean Ctx?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does Pi Lean Ctx work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Pi Lean Ctx Install

Add to stack

Loading.