Get the FREE Ultimate OpenClaw Setup Guide →

smart-coding

An extensible Model Context Protocol (MCP-Local-MRL-RAG-AST) server that provides intelligent semantic code search for AI assistants. Built with local AI models, inspired by Cursor's semantic search.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio omar-haris-smart-coding-mcp smart-coding-mcp --workspace /absolute/path/to/your/project \
  --env SMART_CODING_VERBOSE="Enable detailed logging" \
  --env SMART_CODING_BATCH_SIZE="Files to process in parallel" \
  --env SMART_CODING_CHUNK_SIZE="Lines of code per chunk" \
  --env SMART_CODING_MAX_RESULTS="Max search results returned" \
  --env SMART_CODING_MAX_FILE_SIZE="Max file size in bytes" \
  --env SMART_CODING_EMBEDDING_DIMENSION="Embedding dimension (e.g., 64-768)"

How to use

Smart Coding MCP provides an extensible semantic code search layer for AI assistants. By indexing your codebase with AI embeddings, it enables meaning-based retrieval rather than relying solely on keyword matches, helping you locate relevant code even when terminology differs. The server exposes several tools that power this functionality, including a_semantic_search for meaning-based queries, d_check_last_version to fetch the latest package versions across ecosystems, and administrative utilities to manage indexing and workspace configuration. You can rely on the health and status endpoint f_get_status to verify server health and indexing progress before running queries. With these capabilities, your AI assistant can understand high-level intents like authentication flows or error handling patterns and locate the exact code paths that implement them.

How to install

Prerequisites: ensure you have Node.js (version 18 or newer) and npm installed on your system. You may also need access to the internet to fetch the MCP server package from npm.

  1. Install the MCP server globally:
npm install -g smart-coding-mcp
  1. Verify installation:
smart-coding-mcp --version
  1. Run the MCP server (example usage):
smart-coding-mcp --workspace /absolute/path/to/your/project
  1. If you prefer to manage multiple workspaces from a single config, create or edit your MCP config file (e.g., config.json) and define the mcpServers block as shown in the mcp_config section, then run the server with your preferred configuration loader.

  2. To update the MCP server globally:

npm update -g smart-coding-mcp

Additional notes

Environment variables customize behavior and can be set per server in your mcp config. Common variables include SMART_CODING_VERBOSE for verbose logging, SMART_CODING_MAX_RESULTS to cap search results, and SMART_CODING_BATCH_SIZE/SMART_CODING_CHUNK_SIZE to tune indexing throughput. If you switch workspaces or embedder settings, consider running b_index_codebase to trigger a full reindex. Use f_get_status to confirm index readiness and overall server health before performing large-scale searches. If you encounter cache or index issues, c_clear_cache can reset the embedding cache and force a fresh rebuild on the next search or index operation.

Related MCP Servers

Sponsor this space

Reach thousands of developers