Smart Code Search MCP Server

Smart Code Search MCP Server

Enables semantic code search across projects using AI embeddings to find code by meaning rather than just text matching. Provides fast intelligent search, symbol analysis, and code similarity detection with multi-language support.

Category
Visit Server

README

SCS-MCP - Smart Code Search for Claude Desktop

An MCP (Model Context Protocol) server that provides intelligent semantic code search capabilities to Claude Desktop.

Features

  • 🔍 Semantic Search - Find code by meaning, not just text matching
  • 🧵 Thread-Safe - Handles concurrent requests without SQLite threading errors
  • 🚀 Fast Performance - <100ms search response time with caching
  • 📊 Multi-Language Support - Python, JavaScript, TypeScript, and more
  • 🔄 Hybrid Search - Combines semantic and text matching for best results

Installation

Prerequisites

  • Python 3.8+
  • Claude Desktop
  • WSL (for Windows users)

Quick Install

  1. Clone the repository:
git clone https://github.com/stevenjjobson/scs-mcp.git
cd scs-mcp
  1. Run the installer:
./scripts/install.sh
  1. Configure Claude Desktop by adding to %APPDATA%\Claude\claude_desktop_config.json:
{
  "mcpServers": {
    "scs-mcp": {
      "command": "wsl",
      "args": [
        "bash",
        "-c",
        "cd /path/to/scs-mcp && python3 -m src.server"
      ]
    }
  }
}
  1. Restart Claude Desktop

Available Tools

1. search

Search code by meaning using AI embeddings

Query: "database connection thread safety"
Returns: ThreadSafeDB class and related implementations

2. index

Index a project for semantic search

Project: /path/to/project
Force: true/false to reindex

3. analyze_symbol

Deep analysis of a specific symbol

Symbol: "SmartCodeSearch"
Returns: Definitions, references, and tests

4. find_similar

Find code similar to a given snippet

Code: "def test():"
Returns: Similar function definitions

5. get_context

Get relevant context for current work

Recent files: ["file1.py", "file2.py"]
Recent symbols: ["function1", "class1"]

Architecture

scs-mcp/
├── src/
│   ├── server.py           # Main MCP server
│   ├── core/
│   │   ├── clean_search.py # Clean search implementation
│   │   ├── db_wrapper.py   # Thread-safe SQLite wrapper
│   │   └── search.py        # Search compatibility layer
│   └── utils/
├── scripts/
│   ├── install.sh          # Installation script
│   └── download_model.py   # Model downloader
├── config/
│   └── mcp_config.json     # MCP configuration
└── requirements.txt

Key Improvements

  • ✅ Fixed SQLite threading issues with thread-local connections
  • ✅ Clean MCP protocol communication (no stdout pollution)
  • ✅ Compatible with existing database schemas
  • ✅ Handles both dictionary and tuple result formats
  • ✅ Semantic search with proven accuracy

Performance

  • First search: <100ms (model pre-loaded)
  • Cached searches: <20ms
  • Memory usage: ~500MB baseline
  • Supports 100+ searches/minute

Development

To test the server locally:

python3 scripts/test_server.py

License

MIT

Author

Steven J. Jobson

Acknowledgments

Built for use with Claude Desktop using the Model Context Protocol (MCP).

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