Llm Context.py logo

Llm Context.py

by cyberchitta

Curates focused code context for LLMs through MCP, clipboard output, reusable rules, previews, and change tracking.

Install Llm Context.py

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "cyberchitta-llm-context-py": {
      "command": "uvx",
      "args": [
        "--from",
        "llm-context",
        "lc-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command didn't complete successfully in our automated test.

uvx --from llm-context lc-mcp

Downloading pydantic-core (2.0MiB) Downloading cryptography (4.5MiB) Downloading tree-sitter-language-pack (2.3MiB) Downloaded tree-sitter-language-pack Downloaded pydantic-core Downloaded cryptography Installed 37 packages in 21ms Traceback (most recent call last): File "/home/user/.cache/uv/archive-v0/u2-iGgYWEt3GkehH/bin/lc-mcp", line 6, in <module> from llm_context.mcp import run_server File "/home/user/.cache/uv/archive-v0/u2-iGgYWEt3GkehH/lib/python3.11/site-packages/llm_context

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 25d ago.

Overview

The cyberchitta/llm-context.py MCP server helps coding agents select, inspect, and package relevant files from a project. It uses reusable YAML-based rules to distinguish complete files from structural excerpts, then exposes MCP tools for missing files, changed files, outlines, and previews. Install it with the Python package and run its stdio MCP command through an MCP client. Reach for it when manually assembling code context is slow, incomplete, or likely to exceed a model's context window.

Use cases

  • Curate focused context for a refactor
  • Preview files selected by a context rule
  • Pack code for a sub-agent through a pipe
  • Check whether source files changed after a pack
  • Paste selected project context into a chat

Key features

  • Reusable YAML context rules
  • Full-file and structural-excerpt packing
  • MCP tools for missing and changed files
  • Code-graph-aware context previews
  • Clipboard and stdout output
  • Sub-agent fetch instructions

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

20/20 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · llm-context (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars307Stargazers on the source repository.
Last commit9d agoMost recent push to the default branch.
Install checkInconclusiveInstall command did not finish in our automated test.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Llm Context.py works

What cyberchitta/llm-context.py does

The cyberchitta/llm-context.py MCP server curates code context from a local project for an agent, a chat prompt, or a dispatched sub-agent. It turns file-selection decisions into reusable rules instead of requiring a developer to copy files manually for every task.

A generated context pack can contain complete contents for selected files, structural excerpts for supporting files, a filtered listing of included and excluded paths, and a timestamp. This lets a consumer see what it received and gives follow-up commands a reference point for resolving missing or changed files.

The package also supports clipboard-based workflows. Without MCP, a developer can select and pack context for pasting into a chat. With MCP, the model can request additional context and check whether source files changed after the pack was created.

How it works

After initialization, the project receives an lc-curate-context skill under .claude/skills/, along with the .llm-context/ working area. The skill guides an agent through identifying needed files, writing a rule, validating the selection, and producing a pack. Claude Code loads the skill automatically; other environments can read the installed files directly.

Rules use YAML frontmatter and can compose filters, excerpting behavior, full-file patterns, and explanatory text. Files expected to be edited can be included in full, while supporting code can be represented through signatures and definitions. Selection is also affected by .gitignore files, so the resulting listing is intentionally limited to paths visible to the rule and repository filters.

The command-line workflow can send a pack to stdout for a pipe or redirect. An optional mode includes shell fetch instructions that a child agent can use to request omitted files from the repository root.

Setup and configuration

Install the package with uv tool install "llm-context>=0.6.0", change to the project root, and run lc-init. The MCP configuration runs lc-mcp through uvx:

config.json
{
  "mcpServers": {
    "llm-context": {
      "command": "uvx",
      "args": ["--from", "llm-context", "lc-mcp"]
    }
  }
}

The cyberchitta/llm-context.py MCP server does not document required environment variables. Upgrades use uv tool upgrade llm-context; subsequent lc-* commands refresh the installed skill, rules, and templates.

Tools and capabilities

The MCP workflow exposes these documented tools:

  • lc_missing: identifies files not included in the available context.
  • lc_changed: checks for files changed since the pack timestamp.
  • lc_outlines: provides structural information about code.
  • lc_preview: reports selected files, context size, and related definitions found through the code graph.

The related CLI includes lc-select, lc-context, lc-preview, and lc-init. lc-context can copy a pack to the clipboard or write it to stdout when requested. lc-preview is useful for checking whether a rule omitted a definition required by the selected files.

The cyberchitta/llm-context.py MCP server is best suited to local repositories where an agent needs focused, inspectable context rather than an indiscriminate dump of the project. It does not replace repository access: packs are partial, and the generated listing can omit files excluded by repository filters or the rule.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Llm Context.py

cyberchitta/llm-context.py is an MCP server that connects an AI coding workflow to a local project’s code context. Its main tools are lc_missing, lc_changed, lc_outlines, and lc_preview, which find omitted files, detect later changes, expose code structure, and inspect a rule’s selected files and context size.

Install it with `uv tool install "llm-context>=0.6.0"`, then run `lc-init` from the project root. Configure an MCP client to execute `uvx --from llm-context lc-mcp`; initialization also installs the context-curation skill and creates the project working directory.

It includes complete contents for files selected as full files, structural excerpts for supporting files, and a filtered file listing. Rules and `.gitignore` files affect selection, so a pack can be partial and may omit repository files that are not selected.

Yes. Its MCP tools `lc_missing` and `lc_changed` use the pack’s timestamp to identify omitted files and files that changed afterward. `lc_preview` can also show related definitions found through the code graph before the context is sent to a model.

Yes. The installed `lc-curate-context` skill loads automatically in Claude Code. Other MCP-capable environments can run the documented stdio configuration, while environments without MCP can use the command-line and clipboard workflow.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLlm Context.py AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/cyberchitta-llm-context-py?style=directory)](https://allmcps.com/mcp/cyberchitta-llm-context-py)
HTML Embed
<a href="https://allmcps.com/mcp/cyberchitta-llm-context-py"><img src="https://allmcps.com/api/badge/cyberchitta-llm-context-py?style=directory" alt="Llm Context.py on AllMCPs" /></a>