LLM Context is a tool that reduces friction when providing project files to LLMs. It enables smart file selection and instant context sharing, turning what was once a tedious copy-paste process into a seamless workflow that gets you from "I need to share my project" to productive AI collaboration in seconds.
You can install LLM Context using the uv package manager:
uv tool install "llm-context>=0.5.0"
Here's how to get started with LLM Context:
# One-time setup
cd your-project
lc-init
# Daily usage
lc-select
lc-context
The lc-select command intelligently selects relevant project files, while lc-context generates formatted context that you can directly paste into your LLM chat.
For a more seamless experience, you can integrate LLM Context with MCP (Model Context Protocol). This allows the AI to access additional files directly during conversations.
Add this configuration to your MCP settings:
{
"mcpServers": {
"llm-context": {
"command": "uvx",
"args": ["--from", "llm-context", "lc-mcp"]
}
}
}
You can customize how LLM Context works with your project by creating specialized rules:
# Create project-specific filters
cat > .llm-context/rules/flt-repo-base.md << 'EOF'
---
compose:
filters: [lc/flt-base]
gitignores:
full-files: ["*.md", "/tests", "/node_modules"]
---
EOF
# Customize main development rule
cat > .llm-context/rules/prm-code.md << 'EOF'
---
instructions: [lc/ins-developer, lc/sty-python]
compose:
filters: [flt-repo-base]
excerpters: [lc/exc-base]
---
Additional project-specific guidelines and context.
EOF
LLM Context supports different ways to share context based on your LLM environment:
lc-context -p (For AI Studio, etc.)lc-context -p -m (For Grok, etc.)lc-prompt + lc-context -mlc-context (For Claude Projects, etc.)lc-context -m (force into context)Here are the main commands you'll use with LLM Context:
| Command | Purpose |
|---|---|
lc-init |
Initialize project configuration |
lc-select |
Select files based on current rule |
lc-context |
Generate and copy context |
lc-context -p |
Generate context with prompt |
lc-context -m |
Send context as separate message |
lc-context -nt |
No tools (for Project/Files inclusion) |
lc-context -f |
Write context to file |
lc-set-rule <n> |
Switch between rules |
lc-missing |
Handle file and context requests (non-MCP) |
LLM Context uses a structured rule system with five categories:
prm-): Generate project contextsflt-): Control file inclusionins-): Provide guidelinessty-): Enforce coding standardsexc-): Configure extractions for context reductionHere's an example of a rule for debugging authentication issues:
---
description: "Debug API authentication issues"
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.
LLM Context provides two approaches to help you create custom rules with AI assistance:
lc-init # Installs skill to ~/.claude/skills/
# Restart Claude Desktop or Claude Code
# Share any project context (overview is required)
lc-context # Can use any rule - overview will be included
# Then ask the Skill to help create a rule:
# "Create a rule for refactoring authentication to JWT"
# Load the rule creation framework into context
lc-set-rule lc/prm-rule-create
lc-select
lc-context -nt
# Paste into any LLM and describe your task
# "I need to add OAuth integration to the auth system"
lc-set-rule lc/prm-developer
lc-select
lc-context
# AI can review changes, access additional files as needed
# Share project context
lc-context
# Then ask Skill (Claude Desktop/Code):
# "Create a rule for [your task]"
# Or work with any LLM using instruction rules:
# lc-set-rule lc/prm-rule-create && lc-context -nt
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "CyberChitta" '{"command":"uvx","args":["--from","llm-context","lc-mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"CyberChitta": {
"command": "uvx",
"args": [
"--from",
"llm-context",
"lc-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"CyberChitta": {
"command": "uvx",
"args": [
"--from",
"llm-context",
"lc-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect