Smart Code Search

v1.0.0Coding Agentsstable

Provides intelligent semantic code search using local AI embeddings, enabling natural language queries to find relevant code by meaning rather than exact keywords. Indexes codebases in the background with smart project detection and privacy-first loc

aiantigravityastcluadecodex
Share:
198
Stars
0
Downloads
0
Weekly
0/5

What is Smart Code Search?

Smart Code Search is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides intelligent semantic code search using local ai embeddings, enabling natural language queries to find relevant code by meaning rather than exact keywords. indexes codebases in the background ...

Provides intelligent semantic code search using local AI embeddings, enabling natural language queries to find relevant code by meaning rather than exact keywords. Indexes codebases in the background with smart project detection and privacy-first loc

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides intelligent semantic code search using local AI emb

Use Cases

Semantic code search with local embeddings
Natural language codebase queries
Privacy-first code indexing
omar-haris

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx smart-coding-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Smart Code Search

Smart Coding MCP adds local semantic code search to your AI assistant by indexing your codebase with AI embeddings entirely on-device — no external API calls, no telemetry. Unlike keyword grep, it understands meaning, so queries like 'where do we validate user input?' find relevant code even when the word 'validate' doesn't appear verbatim. It supports six tools including semantic search, package version lookup across 20+ ecosystems, manual reindexing, cache reset, workspace switching, and health status checks — making it a privacy-first RAG layer for code.

Prerequisites

  • Node.js 18 or higher installed (required for the embedding runtime)
  • npm with global install permissions (npm install -g smart-coding-mcp)
  • An absolute path to the project workspace you want to index
  • An MCP-compatible client such as Claude Desktop, Cursor, or Claude Code
1

Install smart-coding-mcp globally

Install the package globally via npm so the smart-coding-mcp command is available on your PATH.

npm install -g smart-coding-mcp
2

Add to your MCP client configuration

Register the server in your MCP client config. Pass the absolute path to your project as the --workspace argument. The server will begin indexing your codebase in the background on startup.

{
  "mcpServers": {
    "smart-coding-mcp": {
      "command": "smart-coding-mcp",
      "args": ["--workspace", "/absolute/path/to/your/project"]
    }
  }
}
3

Optionally configure environment variables

Tune the server's behavior with environment variables. Key variables include SMART_CODING_MAX_RESULTS (default 5), SMART_CODING_EMBEDDING_MODEL, SMART_CODING_DEVICE (cpu/webgpu/auto), and SMART_CODING_WATCH_FILES for auto-reindexing on file changes.

4

Restart your MCP client

Restart Claude Desktop or your MCP client to load the new server. The indexer uses progressive indexing — searches work immediately while background processing continues.

5

Verify indexing status

Ask your AI assistant to check the Smart Coding MCP server status to confirm indexing progress and model configuration.

Smart Code Search Examples

Client configuration

Claude Desktop configuration with optional environment variables for custom result limits and auto-watching.

{
  "mcpServers": {
    "smart-coding-mcp": {
      "command": "smart-coding-mcp",
      "args": ["--workspace", "/Users/you/projects/my-app"],
      "env": {
        "SMART_CODING_MAX_RESULTS": "10",
        "SMART_CODING_WATCH_FILES": "true",
        "SMART_CODING_DEVICE": "cpu"
      }
    }
  }
}

Prompts to try

Example natural-language code search queries that leverage semantic understanding rather than exact keyword matching.

- "How does authentication work in this codebase?"
- "Where do we handle user input validation?"
- "Find the code responsible for sending emails"
- "What's the latest version of react and express?"
- "Show me all error handling patterns used in this project"
- "Where are database queries constructed?"

Troubleshooting Smart Code Search

Search returns no results right after startup

Smart Coding MCP uses progressive indexing — the embedding model needs time to process your codebase on first run. Check the server status tool for indexing progress. For large codebases this can take several minutes.

High CPU usage while the server is running

The indexer is deliberately throttled to 50% CPU by default. If you need to further reduce impact, lower SMART_CODING_CHUNK_SIZE or set SMART_CODING_WATCH_FILES to false. You can also trigger manual reindexing during off-hours instead.

Stale results after major code changes

Ask your AI assistant to trigger manual reindexing using the reindex tool, or set SMART_CODING_WATCH_FILES=true so the server auto-reindexes on file changes. You can also use the cache-reset tool to clear .smart-coding-cache/ and rebuild from scratch.

Frequently Asked Questions about Smart Code Search

What is Smart Code Search?

Smart Code Search is a Model Context Protocol (MCP) server that provides intelligent semantic code search using local ai embeddings, enabling natural language queries to find relevant code by meaning rather than exact keywords. indexes codebases in the background with smart project detection and privacy-first loc It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Smart Code Search?

Follow the installation instructions on the Smart Code Search GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Smart Code Search?

Smart Code Search works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Smart Code Search free to use?

Yes, Smart Code Search is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "smart-coding-mcp": { "command": "npx", "args": ["-y", "smart-coding-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Smart Code Search?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides