Smart Context MCP
Reduces token consumption for AI coding agents by 50-70% through intelligent code context filtering, Git delta tracking, and local SQLite/Tree-sitter indexing.
README
š¦ Smart Context MCP Server
Smart Context MCP is a local Model Context Protocol (MCP) server acting as a Universal Context Engine for AI Coding Agents (Cline, Roo Code, Claude Code, Cursor, Continue.dev, Codex, etc.).
It reduces token consumption for powerful LLMs (Strong LLMs) by 50%ā70% by intelligently filtering code context, tracking Git Delta changes, and building high-performance local indexes using SQLite and Tree-sitter AST parsing.
Built following the ai-read-first specification & architecture principles for AI-assisted software development.
š Key Features
- Smart Token Optimization: Filters out irrelevant code files and sends only the precise context required for each prompt.
- Git Delta Detection: Inspects
git statusandgit diffto prioritize active workspace files. - SQLite Local Storage: Fast symbol and Repo Map querying (< 2ms) without high RAM overhead.
- Multi-Project Management: Dynamically filters and tracks AST symbols per project.
- Flexible Low AI Integration: Supports intent analysis using cheap or local AI providers (Ollama Nemotron, Groq Cloud, Anthropic Claude, OpenAI, Google Gemini Flash).
- Web Dashboard UI: Built-in web administration dashboard at
http://localhost:3333for settings, tooltips, and SQLite cache exploration.
š¾ Local Storage & Database Locations
Smart Context MCP persists user settings and indexed workspace data locally in your home directory across operating systems:
| Data Type | macOS / Linux Path | Windows Path |
|---|---|---|
| āļø User Configuration | ~/.smart-context/config.json |
%USERPROFILE%\.smart-context\config.json |
| š¦ SQLite Cache Database | ~/.smart-context/cache.db |
%USERPROFILE%\.smart-context\cache.db |
(You can customize the cache database path anytime via the Web Dashboard settings modal).
ā” Quick Start (Pre-built Release ā No Build Required)
End-users do not need to install Node.js build tools or run npm:
- Download the pre-built release package:
smart-context-mcp-v1.0.0.zip(from therelease/folder or GitHub Releases). - Unzip
smart-context-mcp-v1.0.0.zipinto your desired folder. - Configure your AI Client to point to the executable launcher
smart-context-mcp:
{
"mcpServers": {
"smart-context": {
"command": "/path/to/unzipped/smart-context-mcp-release/smart-context-mcp",
"args": []
}
}
}
š Popular AI Client & VS Code Extension Config Locations
Here is where to find the MCP configuration file across Windows, macOS, and Linux for popular AI Coding Clients & VS Code extensions:
| AI Client / Extension | Operating System | Standard Configuration File Path |
|---|---|---|
| Claude Desktop App | macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
|
| Linux | ~/.config/Claude/claude_desktop_config.json |
|
| Cursor IDE | macOS / Linux | ~/.cursor/mcp.json (or Cursor Settings ā Features ā MCP) |
| Windows | %USERPROFILE%\.cursor\mcp.json |
|
| Continue.dev (VS Code & JetBrains) | macOS / Linux | ~/.continue/config.json (under experimental.mcpServers) |
| Windows | %USERPROFILE%\.continue\config.json |
|
| Cline Extension (VS Code) | macOS | ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json |
| Windows | %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json |
|
| Linux | ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev\settings\cline_mcp_settings.json |
|
| Roo Code Extension (VS Code) | macOS | ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json |
| Windows | %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json |
|
| Linux | ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json |
|
| Claude Code CLI | macOS / Linux / Windows | ~/.claude.json (under mcpServers) |
| Codex / VS Code MCP | macOS / Linux / Windows | .vscode/mcp.json (Workspace settings) |
| Antigravity IDE | macOS / Linux | ~/.gemini/antigravity-ide/mcp_config.json |
| Windows | %USERPROFILE%\.gemini\antigravity-ide\mcp_config.json |
š„ļø Web Dashboard UI
When the MCP Server starts, the administration Web Dashboard is available at:
š http://localhost:3333
Features available on the Web Dashboard:
- Project Filter: Select and view cached data for specific projects or across all repositories.
- SQLite Cache Explorer: View cached files and parsed AST symbols with detailed hover tooltips (
?). - Header Actions (
āļø Settings&ā GuideModals): Dynamically update Low AI Providers and view user guides in modal popups.
š Architecture & Standards
This project adheres to the ai-read-first standard for AI agent workflows.
š ļø Developer Setup (For Modifying Source Code)
If you want to contribute or customize the source code:
# 1. Clone repository
git clone https://github.com/nghiale-soft/smart-context-mcp.git
cd smart-context-mcp
# 2. Install dependencies & build
npm install
npm run build
# 3. Create pre-built standalone ZIP release
npm run release
š Helper Scripts (scripts/)
./scripts/release.sh: Builds TypeScript source and packages clean ZIP release (release/smart-context-mcp-v1.0.0.zip).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.