LLM Code Context▌
by cyberchitta
LLM Code Context boosts code reviews and documentation with smart file selection, code outlining, and multi-language sup
Streamlines code context sharing with LLMs by implementing smart file selection, code outlining, and multi-language support for efficient code reviews and documentation generation.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / Developers doing code reviews with AI assistants
- / Sharing project context efficiently in LLM conversations
- / AI agents needing focused codebase access
- / Managing development session context
capabilities
- / Find files modified since a specific timestamp
- / Generate code outlines highlighting important sections
- / Retrieve missing context files on demand
- / Create custom file selection rules
- / Extract excerpted content from codebases
what it does
Provides smart file selection and code context management for sharing relevant project files with LLMs, avoiding token limits while ensuring complete coverage.
about
LLM Code Context is a community-built MCP server published by cyberchitta that provides AI assistants with tools and capabilities via the Model Context Protocol. LLM Code Context boosts code reviews and documentation with smart file selection, code outlining, and multi-language sup It is categorized under developer tools. This server exposes 4 tools that AI clients can invoke during conversations and coding sessions.
how to install
You can install LLM Code Context in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
Apache-2.0
LLM Code Context is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
LLM Context
Smart context management for LLM development workflows. Share relevant project files instantly through intelligent selection and rule-based filtering.
The Problem
Getting the right context into LLM conversations is friction-heavy:
- Manually finding and copying relevant files wastes time
- Too much context hits token limits, too little misses important details
- AI requests for additional files require manual fetching
- Hard to track what changed during development sessions
The Solution
llm-context provides focused, task-specific project context through composable rules.
For humans using chat interfaces:
lc-select # Smart file selection
lc-context # Copy formatted context to clipboard
# Paste and work - AI can access additional files via MCP
For AI agents with CLI access:
lc-preview tmp-prm-auth # Validate rule selects right files
lc-context tmp-prm-auth # Get focused context for sub-agent
For AI agents in chat (MCP tools):
lc_outlines- Generate excerpted context from current rulelc_preview- Validate rule effectiveness before uselc_missing- Fetch specific files/implementations on demand
Note: This project was developed in collaboration with several Claude Sonnets (3.5, 3.6, 3.7, 4.0) and Groks (3, 4), using LLM Context itself to share code during development. All code is heavily human-curated by @restlessronin.
Installation
uv tool install "llm-context>=0.6.0"
Quick Start
Human Workflow (Clipboard)
# One-time setup
cd your-project
lc-init
# Daily usage
lc-select
lc-context
# Paste into your LLM chat
MCP Integration (Recommended)
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"llm-context": {
"command": "uvx",
"args": ["--from", "llm-context", "lc-mcp"]
}
}
}
Restart Claude Desktop. Now AI can access additional files during conversations without manual copying.
Agent Workflow (CLI)
AI agents with shell access use llm-context to create focused contexts:
# Agent explores codebase
lc-outlines
# Agent creates focused rule for specific task
# (via Skill or lc-rule-instructions)
# Agent validates rule
lc-preview tmp-prm-oauth-task
# Agent uses context for sub-task
lc-context tmp-prm-oauth-task
Agent Workflow (MCP)
AI agents in chat environments use MCP tools:
# Explore codebase structure
lc_outlines(root_path, rule_name)
# Validate rule effectiveness
lc_preview(root_path, rule_name)
# Fetch specific files/implementations
lc_missing(root_path, param_type, data, timestamp)
Core Concepts
Rules: Task-Specific Context Descriptors
Rules are YAML+Markdown files that describe what context to provide for a task:
---
description: "Debug API authentication"
compose:
filters: [lc/flt-no-files]
excerpters: [lc/exc-base]
also-include:
full-files: ["/src/auth/**", "/tests/auth/**"]
---
Focus on authentication system and related tests.
Five Rule Categories
- Prompt Rules (
prm-): Generate project contexts (e.g.,lc/prm-developer) - Filter Rules (
flt-): Control file inclusion (e.g.,lc/flt-base,lc/flt-no-files) - Instruction Rules (
ins-): Provide guidelines (e.g.,lc/ins-developer) - Style Rules (
sty-): Enforce coding standards (e.g.,lc/sty-python) - Excerpt Rules (
exc-): Configure content extraction (e.g.,lc/exc-base)
Rule Composition
Build complex rules from simpler ones:
---
instructions: [lc/ins-developer, lc/sty-python]
compose:
filters: [lc/flt-base, project-filters]
excerpters: [lc/exc-base]
---
Essential Commands
| Command | Purpose |
|---|---|
lc-init | Initialize project configuration |
lc-select | Select files based on current rule |
lc-context | Generate and copy context |
lc-context -p | Include prompt instructions |
lc-context -m | Format as separate message |
lc-context -nt | No tools (manual workflow) |
lc-set-rule <name> | Switch active rule |
lc-preview <rule> | Validate rule selection and size |
lc-outlines | Get code structure excerpts |
lc-missing | Fetch files/implementations (manual MCP) |
AI-Assisted Rule Creation
Let AI help create focused, task-specific rules. Two approaches depending on your environment:
Claude Skill (Interactive, Claude Desktop/Code)
How it works: Global skill guides you through creating rules interactively. Examines your codebase as needed using MCP tools.
Setup:
lc-init # Installs skill to ~/.claude/skills/
# Restart Claude Desktop or Claude Code
Usage:
# 1. Share project context
lc-context # Any rule - overview included
# 2. Paste into Claude, then ask:
# "Create a rule for refactoring authentication to JWT"
# "I need a rule to debug the payment processing"
Claude will:
- Use project overview already in context
- Examine specific files via
lc-missingas needed - Ask clarifying questions about scope
- Generate optimized rule (
tmp-prm-<task>.md) - Provide validation instructions
Skill documentation (progressively disclosed):
Skill.md- Quick workflow, decision patternsPATTERNS.md- Common rule patternsSYNTAX.md- Detailed referenceEXAMPLES.md- Complete walkthroughsTROUBLESHOOTING.md- Problem solving
Instruction Rules (Works Anywhere)
How it works: Load comprehensive rule-creation documentation into context, work with any LLM.
Usage:
# 1. Load framework
lc-set-rule lc/prm-rule-create
lc-select
lc-context -nt
# 2. Paste into any LLM
# "I need a rule for adding OAuth integration"
# 3. LLM generates focused rule using framework
# 4. Use the new rule
lc-set-rule tmp-prm-oauth
lc-select
lc-context
Included documentation:
lc/ins-rule-intro- Introduction and overviewlc/ins-rule-framework- Complete decision framework
Comparison
| Aspect | Skill | Instruction Rules |
|---|---|---|
| Setup | Automatic with lc-init | Already available |
| Interaction | Interactive, uses lc-missing | Static documentation |
| File examination | Automatic via MCP | Manual or via AI |
| Best for | Claude Desktop/Code | Any LLM, any environment |
| Updates | Automatic with version upgrades | Built-in to rules |
Both require sharing project context first. Both produce equivalent results.
Project Customization
Create Base Filters
cat > .llm-context/rules/flt-repo-base.md << 'EOF'
---
description: "Repository-specific exclusions"
compose:
filters: [lc/flt-base]
gitignores:
full-files: ["*.md", "/tests", "/node_modules"]
excerpted-files: ["*.md", "/tests"]
---
EOF
Create Development Rule
cat > .llm-context/rules/prm-code.md << 'EOF'
---
description: "Main development rule"
instructions: [lc/ins-developer, lc/sty-python]
compose:
filters: [flt-repo-base]
excerpters: [lc/exc-base]
---
Additional project-specific guidelines and context.
EOF
lc-set-rule prm-code
Deployment Patterns
Choose format based on your LLM environment:
| Pattern | Command | Use Case |
|---|---|---|
| System Message | lc-context -p | AI Studio, etc. |
| Single User Message | lc-context -p -m | Grok, etc. |
| Separate Messages | lc-prompt + lc-context -m | Flexible placement |
| Project Files (included) | lc-context | Claude Projects, etc. |
| Project Files (searchable) | lc-context -m | Force into context |
See Deployment Patterns for details.
Key Features
- Intelligent Selection: Rules automatically include/exclude appropriate files
- Context Validation: Preview size and selection before generation
- Code Excerpting: Extract structure while reducing tokens (15+ languages)
- MCP Integration: AI accesses additional files without manual intervention
- Composable Rules: Build complex contexts from reusable patterns
- AI-Assisted Creation: Interactive skill or documentation-based approaches
- Agent-Friendly: CLI and MCP interfaces for autonomous operation
Common Workflows
Daily Development (Human)
lc-set-rule prm-code
lc-select
lc-context
# Paste into chat - AI accesses more files via MCP if needed
Focused Task (Human or Agent)
# Share project context first
lc-context
# Then create focused rule:
# Via Skill: "Create a rule for [task]"
# Via Instructions: lc-set-rule lc/prm-rule-create && lc-context -nt
# Validate and use
lc-preview tmp-prm-task
lc-context tmp-prm-task
Agent Context Provisioning (CLI)
# Agent validates rule effectiveness
lc-preview tmp-prm-refactor-auth
# Agent generates context for sub-agent
lc-context tmp-prm-refactor-auth > /tmp/context.md
# Sub-agent reads context and executes task
Agent Context Provisioning (MCP)
# Agent validates rule
preview
---
FAQ
- What is the LLM Code Context MCP server?
- LLM Code Context is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for LLM Code Context?
- This profile displays 74 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Extended AI Capabilities
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Context Enhancement
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Workflow Automation
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor IDE with MCP support
- ›Basic understanding of MCP architecture and capabilities
- ›Access credentials for integrated services (if required)
- ›Willingness to experiment and iterate on configuration
Time Estimate
15-60 minutes depending on server complexity
Installation Steps
- 1.Install MCP server: npm install -g [package-name] or via GitHub
- 2.Add server configuration to ~/.claude/mcp.json
- 3.Provide required credentials and configuration
- 4.Restart Claude Desktop to load new server
- 5.Test basic functionality with simple prompts
- 6.Explore capabilities and experiment with use cases
- 7.Document successful patterns for reuse
Troubleshooting
- ⚠MCP server not loading: Check config syntax, verify installation
- ⚠Connection errors: Check network, firewall, credentials
- ⚠Feature not working: Read server docs, check required parameters
- ⚠Performance issues: Monitor resource usage, check for network latency
- ⚠Conflicts with other servers: Check port assignments, namespace collisions
Best Practices▌
✓ Do
- +Read server documentation thoroughly before setup
- +Start with simple use cases to validate functionality
- +Test in non-production environment first
- +Monitor resource usage and performance
- +Keep servers updated for bug fixes and new features
- +Document configuration for team members
- +Use environment variables for sensitive configuration
✗ Don't
- −Don't grant overly permissive access to MCP servers
- −Don't skip reading security considerations in docs
- −Don't expose sensitive data without proper controls
- −Don't run untrusted MCP servers without code review
- −Don't ignore error messages—investigate root cause
💡 Pro Tips
- ★Combine multiple MCP servers for powerful workflows
- ★Create custom MCP servers for your specific needs
- ★Share successful configurations with team
- ★Use MCP inspector for debugging
- ★Join MCP community for tips and troubleshooting
Technical Details▌
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
- Model Context Protocol (MCP)
- JSON-RPC 2.0
- stdio or HTTP transport
Compatibility
- Claude Desktop
- Cursor IDE
- Custom MCP clients
When to Use This▌
✓ Use When
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid When
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.
Integration▌
- →Tool composition: Chain multiple MCP tools in workflows
- →Context augmentation: Provide AI with relevant external data
- →Action delegation: Let AI execute tasks on external systems
- →Bidirectional sync: Keep AI context and external systems in sync
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.5★★★★★74 reviews- ★★★★★Valentina Khanna· Dec 28, 2024
LLM Code Context has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Mei Bhatia· Dec 20, 2024
Strong directory entry: LLM Code Context surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Pratham Ware· Dec 16, 2024
LLM Code Context is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Ren Wang· Dec 16, 2024
We wired LLM Code Context into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Evelyn Li· Dec 16, 2024
Useful MCP listing: LLM Code Context is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Kofi Smith· Dec 12, 2024
LLM Code Context is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Zara Robinson· Dec 12, 2024
We evaluated LLM Code Context against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Ava Taylor· Nov 19, 2024
LLM Code Context reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Evelyn Robinson· Nov 15, 2024
According to our notes, LLM Code Context benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Neel Tandon· Nov 11, 2024
I recommend LLM Code Context for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
showing 1-10 of 74