Smart Context MCP

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.

Category
Visit Server

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 status and git diff to 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:3333 for 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:

  1. Download the pre-built release package: smart-context-mcp-v1.0.0.zip (from the release/ folder or GitHub Releases).
  2. Unzip smart-context-mcp-v1.0.0.zip into your desired folder.
  3. 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 & ā“ Guide Modals): 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured