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.
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.
- Install the MCP server globally:
npm install -g smart-coding-mcp
- Verify installation:
smart-coding-mcp --version
- Run the MCP server (example usage):
smart-coding-mcp --workspace /absolute/path/to/your/project
-
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.
-
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
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows
unity
Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local MCP (Model Context Protocol) Client. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
dbhub
Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
Context-Engine
Context-Engine MCP - Agentic Context Compression Suite
kindly-web-search
Kindly Web Search MCP Server: Web search + robust content retrieval for AI coding tools (Claude Code, Codex, Cursor, GitHub Copilot, Gemini, etc.) and AI agents (Claude Desktop, OpenClaw, etc.). Supports Serper, Tavily, and SearXNG.
coplay-unity-plugin
Unity plugin for Coplay