Smart Context Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Smart Context Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
🚀 Version 2.0.0 - Major Update! Smart Context has evolved from a file selector to a comprehensive AI Context Engineer that generates complete context packages for LLMs. Transform vague queries into structured, actionable context with code, relationships, and insights.
Smart Context now acts as your personal AI Context Engineer, solving a critical problem: users often don't provide enough context for AI tools to work effectively. Instead of just suggesting files, it now:
generate_context_packageThe flagship feature that transforms any query into a complete context package:
// Before v2.0.0: Just file paths
["src/cart.js", "src/checkout.js"]
// After v2.0.0: Complete context with code
{
"context": {
"coreImplementation": {
"code": "const getTotalPrice = () => { ... }",
"function": "getTotalPrice",
"lines": "48-56"
}
},
"relationships": {
"dependencies": [...],
"provides": [...]
},
"suggestedFix": {
"pattern": "NaN in calculation",
"suggestion": "Check if item.price is undefined"
}
}New to Smart Context? Follow our 5-minute setup guide to get started right away!
Already familiar with MCP? Jump to Installation below.
Choose the method that works best for you:
Easiest for most users
npm install -g @crisnc100/smart-context-mcpFor developers who want the latest code
git clone https://github.com/crisnc100/smart-context-mcp.git
cd smart-context-mcp
npm installFor containerized deployments
docker pull smartcontext/mcp-server:latest
docker run -it -v $(pwd):/workspace:ro smartcontext/mcp-server📋 Need detailed setup instructions? See our comprehensive Installation Guide for platform-specific instructions.
Install in your project:
cd your-project
npm install @crisnc100/smart-context-mcpCreate .mcp.json in project root:
{
"mcpServers": {
"smart-context": {
"command": "node",
"args": ["./node_modules/@crisnc100/smart-context-mcp/src/index.js"],
"env": {
"PROJECT_ROOT": "."
}
}
}
}See CLAUDE_CODE_SETUP.md for detailed instructions.
IMPORTANT: Smart Context needs to know WHERE your project files are located. You must set PROJECT_ROOT for each project.
#### For NPM Installation:
{
"mcpServers": {
"smart-context": {
"command": "npx",
"args": ["@crisnc100/smart-context-mcp"],
"env": {
"PROJECT_ROOT": "/path/to/your/project"
}
}
}
}#### For Local Installation:
{
"mcpServers": {
"smart-context": {
"command": "node",
"args": ["/path/to/smart_context_mcp/src/index.js"],
"env": {
"PROJECT_ROOT": "/path/to/your/project"
}
}
}
}IMPORTANT: Codex CLI uses mcp_servers (underscore) rather than mcpServers (camelCase).
#### For NPM Installation (TOML format):
[mcp_servers.smart-context]
command = "npx"
args = ["-y", "@crisnc100/smart-context-mcp"]
env = { "PROJECT_ROOT" = "/path/to/your/project" }#### For Local Installation (TOML format):
[mcp_servers.smart-context]
command = "node"
args = ["/path/to/smart_context_mcp/src/index.js"]
env = { "PROJECT_ROOT" = "/path/to/your/project" }First Time Setup? Run the setup wizard tool in Claude:
Use the setup_wizard tool to check my Smart Context configurationsetup_wizard - START HERE!Configure Smart Context for your project. This is your first step!
What it does: Checks your configuration and helps set up Smart Context properly.
Key parameters:
action: Choose 'check' to verify setup, 'configure' to set up a new projectprojectPath: Where your code livesprojectName: A friendly name for your projectgenerate_context_package - AI Context Engineer (New in v2.0.0!)Generate a complete context package with code, relationships, and insights for any task.
What it does: Acts as your AI Context Engineer - analyzes your query, extracts actual code, maps dependencies, and provides structured context that helps AI tools understand your codebase better.
Key parameters:
query (required): Natural language description of your taskcurrentFile: The file you're working on (optional)tokenBudget: Maximum tokens to use (default: 6000)Returns: A structured context package containing:
Example - Debugging:
// Query: "getTotalPrice returns NaN when cart has items"
{
"understanding": {
"problemDescription": "getTotalPrice function returns NaN",
"concepts": ["pricing", "cart", "calculation"],
"entities": ["getTotalPrice", "cart", "items"]
},
"context": {
"coreImplementation": {
"file": "src/context/CartContext.js",
"function": "getTotalPrice",
"lines": "48-56",
"code": "const getTotalPrice = () => {\n return cartItems.reduce((total, item) => {\n return total + (item.price * item.quantity);\n }, 0).toFixed(2);\n};"
}
},
"suggestedFix": {
"pattern": "NaN in calculation",
"confidence": 0.8,
"suggestion": "Check if item.price or item.quantity are undefined/null"
}
}Example - Feature Development:
// Query: "add discount code feature to shopping cart"
{
"understanding": {
"taskType": "feature",
"components": ["discount", "cart", "validation"],
"relatedFeatures": ["pricing", "checkout"]
},
"relationships": {
"dependencies": [
{"file": "CartContext.js", "imports": ["useState", "useEffect"]},
{"file": "api/checkout.js", "exports": ["applyDiscount", "validateCode"]}
],
"provides": ["CartProvider", "useCart", "getTotalPrice"]
}
}get_optimal_context - File Selection ToolGet the most relevant files for any coding task with grep commands.
What it does: Analyzes your task and returns the best files to include in context, plus grep commands to search for specific patterns.
Key parameters:
task (required): Describe what you're trying to do ("fix login bug", "add new feature")currentFile: The file you're currently working ontargetTokens: How many tokens you want to use (default: 6000)progressiveLevel: 1=immediate context, 2=expanded, 3=comprehensiveset_project_scopeConfigure file patterns to include/exclude for large projects.
Parameters:
name: Name for this scope configurationincludePaths: Glob patterns to include (e.g., "src/**")excludePaths: Glob patterns to excludemaxDepth: Maximum directory depthactivate: Whether to activate immediatelyrecord_session_outcomeProvide feedback on which files were actually helpful.
Parameters:
sessionId (required): Session ID from get_optimal_contextwasSuccessful (required): Whether the task was completed successfullyfilesActuallyUsed: Array of files that were actually helpfulsearch_codebaseSemantic search across the codebase.
Parameters:
query (required): Natural language search querylimit: Maximum results to return (default: 10)get_file_relationshipsGet files related to a specific file.
Parameters:
filePath (required): File to find relationships forrelationshipType: 'import', 'git-co-change', or 'all'analyze_git_patternsAnalyze git history for file relationships.
Parameters:
commitLimit: Number of commits to analyze (default: 100)get_learning_insightsGet insights about learned patterns.
Parameters:
taskMode: Filter by 'debug', 'feature', or 'refactor'apply_user_overridesApply manual file selection adjustments for learning.
Parameters:
sessionId: Session ID from get_optimal_contextadded: Files manually addedremoved: Files manually removedkept: Files accepted as-is// First time setup
Use the setup_wizard tool with action="check"
// Generate complete context package (v2.0.0 - AI Context Engineer)
Use generate_context_package with query="getTotalPrice returns NaN in cart"
Use generate_context_package to understand "how does the authentication system work"
Use generate_context_package for "add email notification when order ships"
// Get relevant files with grep commands
Use get_optimal_context to find files related to "fixing the user authentication flow"
// Search for specific concepts
Use search_codebase to find files containing "websocket connection handling"
// Configure for large projects
Use set_project_scope to only include src/** and exclude test filesSmart Context has evolved from a file selector to a comprehensive AI Context Engineer that:
The server can be configured through:
config/default.json)config/local.json){
"context": {
"defaultTokenBudget": 6000,
"minRelevanceScore": 0.3,
"progressiveLevels": {
"immediate": 0.6,
"expanded": 0.4,
"comprehensive": 0.2
}
},
"fileScanning": {
"maxFileSize": 1048576, // 1MB in bytes
"ignorePatterns": ["node_modules/**", "*.log"]
},
"git": {
"recentChangesHours": 48,
"defaultCommitLimit": 100
}
}SMART_CONTEXT_TOKEN_BUDGET - Override default token budgetSMART_CONTEXT_MIN_RELEVANCE - Minimum relevance score thresholdSMART_CONTEXT_MAX_FILE_SIZE - Maximum file size to scan (in bytes)SMART_CONTEXT_GIT_COMMIT_LIMIT - Number of commits to analyzeFor large projects:
set_project_scopetargetTokens for faster responsesminRelevanceScore to be more selectiveprogressiveLevel: 1 for immediate contextRun the comprehensive test suite:
# All tests
npm run test:all
# Individual test suites
npm run test:scanner # File scanning tests
npm run test:performance # Performance benchmarks
npm run test:error # Error handling tests
npm test # Full validation suitetest-final-validation.js - Main validation suitetest-scanner.js - File scanning functionalitytest-performance.js - Performance benchmarkstest-error-handling.js - Error handling teststest-cross-platform.js - Cross-platform compatibilitytest-mcp-server.js - MCP server functionalityrun-all-tests.js - Test runner for all suitesPerformance characteristics:
The Smart Context MCP Server uses a multi-factor scoring system:
See TEST_RESULTS_COMPREHENSIVE.md for technical details.
"No files found"
setup_wizard with action="check" to verify configurationPROJECT_ROOT points to your actual project directory"Server doesn't appear in Claude"
Performance issues
set_project_scope to limit scanning areaSee TROUBLESHOOTING.md for comprehensive solutions and Issues for more help.
Contributions are welcome! Please:
git checkout -b feature/amazing)git commit -m 'Add amazing feature')git push origin feature/amazing)See CHANGELOG.md for version history.
MIT License - see LICENSE for details.
Ready to code smarter? Install Smart Context and let it learn what files matter for your tasks! 🚀
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.