llm-context
MCP ServerFree** - Share code context with LLMs via Model Context Protocol or clipboard.
Capabilities10 decomposed
rule-based file selection with gitignore pattern matching
Medium confidenceIntelligently selects files from repositories by applying .gitignore patterns and custom inclusion/exclusion rules defined in YAML frontmatter. The system reads rule files from .llm-context/rules/ directory, parses gitignore-style patterns, and maintains persistent selection state across sessions. Files are categorized as either full-content or outline candidates based on rule configuration, enabling selective context injection without manual file enumeration.
Combines .gitignore pattern matching with YAML-frontmatter rule files stored in .llm-context/rules/, enabling both system rules (lc-prefixed) and user-defined rules that can extend base rules. This two-tier rule system with persistent state management differentiates it from simple glob-based file pickers.
More sophisticated than basic glob patterns because it respects .gitignore conventions developers already maintain, while offering rule composition and state persistence that simple file dialogs lack.
code structure outlining and definition extraction
Medium confidenceParses source code files to extract structural information (function/class definitions, imports, comments) and generates condensed outlines instead of full file content. Supports 40+ languages through language-specific parsers, enabling LLMs to understand codebase architecture without token-heavy full file dumps. Definitions are extracted as key-value pairs mapping symbol names to their locations, allowing LLMs to navigate code semantically.
Uses language-specific parsers (likely tree-sitter based on DeepWiki references) to extract definitions and generate outlines for 40+ languages, categorizing files as outline vs full-content candidates based on rule configuration. This enables intelligent token optimization by choosing representation granularity per file.
More accurate than regex-based outline generation because it uses proper AST parsing, and more flexible than fixed-format summaries because outline depth is configurable per rule.
jinja2-based template system for context formatting
Medium confidenceFormats selected files and extracted code structures into LLM-ready context using Jinja2 templates. The system provides default templates for common scenarios (documentation review, code refactoring) and allows custom templates to be defined in .llm-context/templates/. Templates receive context variables including file lists, outlines, definitions, and project metadata, enabling flexible output formatting for different LLM chat interfaces and prompt engineering strategies.
Provides both default templates for common LLM tasks and extensible custom template support via .llm-context/templates/, allowing users to define project-specific formatting without modifying core code. Templates receive rich context variables including file lists, outlines, and project notes.
More flexible than hardcoded formatting because templates are user-customizable, and more powerful than simple string concatenation because Jinja2 enables conditional logic, loops, and filters for sophisticated context assembly.
model context protocol (mcp) server integration
Medium confidenceExposes llm-context functionality as an MCP server, allowing Claude and other MCP-compatible LLMs to request context generation on-demand through standardized protocol calls. The MCP server implements tools for file selection, context generation, and template rendering, enabling LLMs to interactively refine context without returning to the CLI. This creates a bidirectional integration where LLMs can request specific context based on their analysis needs.
Implements llm-context as an MCP server that exposes file selection and context generation as callable tools, enabling LLMs to request context dynamically rather than receiving static context. This bidirectional integration pattern is distinct from one-way context injection via clipboard.
More interactive than clipboard-based context sharing because LLMs can request specific files or refine selections mid-conversation, and more integrated than manual CLI usage because the LLM stays in a single conversation context.
clipboard-based context export with format options
Medium confidenceGenerates formatted context and copies it directly to the system clipboard, enabling one-click context injection into any LLM chat interface. Supports multiple output formats (markdown, plain text, structured JSON) and integrates with the template system to produce chat-ready context. The clipboard integration bypasses the need for file uploads or API integrations, making it compatible with any LLM interface that accepts pasted text.
Provides direct clipboard integration as an alternative to MCP, enabling context export to any LLM interface without requiring API keys or special client support. Supports multiple output formats through the template system, making it adaptable to different chat interface preferences.
More accessible than MCP because it works with any LLM chat interface (web, mobile, etc.), and faster than manual file selection because it automates the entire context preparation and copying workflow.
project notes and user notes management
Medium confidenceStores project-level and user-level notes in .llm-context/project-notes.md and .llm-context/user-notes.md respectively, which are automatically included in generated context. These notes provide persistent metadata about the project (architecture decisions, conventions, known issues) and user preferences (preferred coding style, analysis focus areas) that inform LLM understanding without requiring manual re-entry per session. Notes are treated as first-class context components alongside code files.
Treats project and user notes as first-class context components that are automatically included in every context generation, rather than optional metadata. This enables persistent project knowledge to be maintained separately from code files while remaining tightly integrated into the context pipeline.
More persistent than per-session prompting because notes are stored in the project and automatically included, and more discoverable than external documentation because notes are co-located with context configuration in .llm-context/.
execution environment with context state persistence
Medium confidenceManages the execution context through a ContextSpec object that tracks project configuration, rule selections, and file state across CLI invocations. The system persists state in .llm-context/state.json or equivalent, enabling users to save context configurations and resume them without re-specifying rules or file selections. The execution environment coordinates between file selection, context generation, and output integration, providing a unified interface for context management.
Implements a ContextSpec-based execution environment that persists state between CLI invocations, enabling saved context configurations and resumable workflows. This architectural pattern treats context as a first-class managed entity rather than ephemeral CLI output.
More sophisticated than stateless CLI tools because it enables configuration reuse and state tracking, and more flexible than hardcoded configurations because state can be modified and persisted dynamically.
multi-language code parsing and highlighting
Medium confidenceParses and highlights source code in 40+ languages using language-specific syntax rules, enabling LLMs to understand code structure and semantics beyond plain text. The system applies syntax highlighting markers (markdown code blocks with language identifiers, or inline markers) to code snippets, improving LLM comprehension of language-specific constructs. Language detection is automatic based on file extension, with fallback to user specification.
Supports 40+ languages through language-specific parsers integrated into the context generation pipeline, automatically detecting language from file extension and applying appropriate highlighting. This enables consistent code presentation across polyglot projects.
More comprehensive than generic syntax highlighting because it uses language-specific parsers for accurate structure understanding, and more integrated than external code formatters because highlighting is applied during context generation.
custom rule composition with base rule inheritance
Medium confidenceEnables users to define custom rules that extend system rules (prefixed with 'lc-') through a 'base' property in YAML frontmatter. Rules are stored as markdown files in .llm-context/rules/ with YAML frontmatter defining file selection patterns and LLM instructions in the markdown body. This composition pattern allows rule reuse and specialization without duplication, enabling teams to build rule libraries for common scenarios (documentation review, security audit, performance analysis).
Implements rule composition through YAML frontmatter 'base' property, allowing custom rules to extend system rules without duplication. Rules are stored as markdown files with embedded YAML, enabling both machine-readable configuration and human-readable documentation in a single file.
More flexible than monolithic rule sets because rules can be composed and specialized, and more maintainable than copy-paste rule definitions because inheritance eliminates duplication.
cli command interface with project setup and context generation workflows
Medium confidenceProvides a comprehensive command-line interface organized into logical command groups: project setup (initialize .llm-context directory structure), file selection (apply rules and filter files), context generation (format and prepare output), and clipboard integration (copy to clipboard). Commands are composable, allowing users to chain operations (e.g., select files with rule X, generate context with template Y, copy to clipboard). The CLI supports both interactive and scripted workflows.
Organizes commands into logical groups (setup, file selection, context generation, clipboard) that map to user workflows, with composable commands that can be chained in shell scripts. This enables both interactive CLI usage and automation in CI/CD pipelines.
More structured than generic Python scripts because commands are organized into semantic groups, and more automatable than GUI tools because it supports shell scripting and CI/CD integration.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with llm-context, ranked by overlap. Discovered automatically through the match graph.
code2prompt
A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
Gitingest
Turn any Git repository into a simple text digest of its codebase so it can be fed into any LLM. [#opensource](https://github.com/cyclotruc/gitingest)
Gito
AI code reviewer for GitHub Actions or local use, compatible with any LLM and integrated with...
auto-md
Convert Files / Folders / GitHub Repos Into AI / LLM-ready Files
create-python-server
Create a Python MCP server
Git
** - Tools to read, search, and manipulate Git repositories
Best For
- ✓developers managing large codebases with complex directory structures
- ✓teams using LLMs for code review or documentation tasks requiring selective context
- ✓projects with existing .gitignore files that can be leveraged for LLM context
- ✓developers working with large codebases where full file context exceeds token budgets
- ✓teams using LLMs for code navigation and refactoring tasks
- ✓polyglot projects requiring multi-language code understanding
- ✓developers with specific prompt engineering requirements
- ✓teams standardizing on context format across multiple projects
Known Limitations
- ⚠Rule system requires YAML frontmatter knowledge; no GUI for rule creation
- ⚠File selection state persists locally; no built-in synchronization across team members
- ⚠Pattern matching limited to gitignore syntax; no regex-based custom patterns
- ⚠Outline extraction accuracy depends on language-specific parser quality; complex nested structures may be misrepresented
- ⚠Definition extraction does not resolve cross-file dependencies or type information
- ⚠Supported languages limited to those with implemented parsers; custom language support requires parser implementation
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
About
** - Share code context with LLMs via Model Context Protocol or clipboard.
Categories
Alternatives to llm-context
Are you the builder of llm-context?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →