loading…
Search for a command to run...
loading…
Provides semantic code intelligence to help users search, navigate, and analyze entire codebases using plain English. It enables Claude to perform architectural
Provides semantic code intelligence to help users search, navigate, and analyze entire codebases using plain English. It enables Claude to perform architectural overviews, bug detection, and refactor suggestions through local semantic search and keyword indexing.
Semantic code intelligence for Claude — search, understand, and analyze any codebase using plain English.
License: MIT Python 3.10+ MCP smithery badge
You open a new codebase and ask Claude:
"Where is the user authentication handled?"
Claude has no idea. It hasn't seen your code.
You could paste files manually — but that's slow, hits context limits, and doesn't scale.
CodeSense MCP solves this. Point it at your project once, and Claude can search, navigate and reason about your entire codebase without you doing anything else.
| Tool | What you can ask Claude |
|---|---|
index_codebase |
"Index my project at ~/projects/myapp" |
search_code |
"Find where JWT tokens are validated" |
explain_architecture |
"Give me an overview of how this project is structured" |
find_bugs |
"Scan for common bug patterns and hardcoded secrets" |
find_dead_code |
"Find functions that are defined but never used" |
suggest_refactor |
"What should I refactor in src/utils.py?" |
get_file_summary |
"Tell me about the models/user.py file" |
list_indexed_files |
"List all Python files in the project" |
# Lightweight (keyword search, no extra deps)
pip install codesense-mcp
# Full semantic search (recommended — uses local embeddings, no API key needed)
pip install "codesense-mcp[semantic]"
Open your Claude Desktop config:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this:
{
"mcpServers": {
"codesense": {
"command": "uvx",
"args": ["codesense-mcp"]
}
}
}
Restart Claude Desktop. That's it. ✅
Find authentication logic:
You: "Search my codebase for where passwords are hashed" Claude: Searches and returns the exact functions with file paths and line context.
Understand a new project:
You: "Explain the architecture of ~/projects/django-app" Claude: Returns a structured breakdown of modules, entry points, key classes, and language distribution.
Security audit:
You: "Scan for hardcoded secrets and empty except blocks" Claude: Lists every file and line with potential issues.
Refactor guidance:
You: "What should I refactor in services/payment.py?" Claude: Flags long functions, deep nesting, magic numbers, and missing docstrings with line numbers.
codesense-mcp/
├── codesense_mcp/
│ ├── __init__.py
│ └── server.py ← All tools live here (FastMCP)
├── tests/
│ └── test_server.py
├── pyproject.toml
└── README.md
Search modes:
| Mode | When | How |
|---|---|---|
| 🧠 Semantic | [semantic] installed |
HuggingFace all-MiniLM-L6-v2 + ChromaDB (local, no API key) |
| 🔍 Keyword | Fallback | Token-overlap scoring across indexed chunks |
Supported languages: Python · JavaScript · TypeScript · PHP · Ruby · Go · Java · C# · C/C++ · Rust · Swift
CodeSense scans for:
except: clausesprint() debug statementsFor each file, CodeSense checks:
git clone https://github.com/attaelahi/codesense-mcp
cd codesense-mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[semantic]"
# Test the server directly
python -m codesense_mcp.server
# Run with MCP Inspector
npx @modelcontextprotocol/inspector python -m codesense_mcp.server
PRs welcome! See CONTRIBUTING.md.
If you find this useful, a ⭐ star goes a long way.
MIT © Atta Elahi
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"codesense-mcp": {
"command": "npx",
"args": []
}
}
}