Skip to main content
Glama

Smart Code Search MCP Server

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

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).

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

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.

  1. Features
    1. Installation
      1. Prerequisites
      2. Quick Install
    2. Available Tools
      1. 1. search
      2. 2. index
      3. 3. analyze_symbol
      4. 4. find_similar
      5. 5. get_context
    3. Architecture
      1. Key Improvements
        1. Performance
          1. Development
            1. License
              1. Author
                1. Acknowledgments

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    A local server that provides powerful code analysis and search capabilities for software projects, helping AI assistants and development tools understand codebases for tasks like code generation and refactoring.
                    Last updated -
                    2
                    Python
                    • Apple
                    • Linux
                  • -
                    security
                    F
                    license
                    -
                    quality
                    HTTP-based server that provides semantic code search capabilities to IDEs through the Model Context Protocol, allowing efficient codebase exploration without repeated indexing.
                    Last updated -
                    7
                    64
                    TypeScript
                    • Apple
                    • Linux
                  • -
                    security
                    A
                    license
                    -
                    quality
                    Enables semantic code search across codebases using Qdrant vector database and OpenAI embeddings, allowing users to find code by meaning rather than just keywords through natural language queries.
                    Last updated -
                    Python
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    An intelligent server that provides semantic code search, domain-driven analysis, and advanced code understanding for large codebases using LLMs and vector embeddings.
                    Last updated -
                    3
                    Python
                    MIT License

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/stevenjjobson/scs-mcp'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server