CodeSense MCP
Enables semantic search, architectural analysis, and bug detection for C++ codebases.
Provides architectural analysis and reasoning specifically for Django-based web applications, including module and entry point identification.
Supports semantic search, refactor suggestions, and bug scanning for JavaScript projects.
Allows for semantic indexing, code search, and structural analysis of PHP applications.
Provides comprehensive code intelligence for Python projects, including semantic search, refactoring guidance, and detection of patterns like bare except blocks or mutable default arguments.
Enables semantic search and architectural overview for Ruby codebases.
Supports indexing and semantic reasoning for Rust source code and projects.
Provides semantic code intelligence and search capabilities for Swift applications.
Enables semantic indexing, dead code identification, and architectural reasoning for TypeScript projects.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CodeSense MCPExplain the architecture of this codebase and scan for hardcoded secrets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🧠 CodeSense MCP
Semantic code intelligence for Claude — search, understand, and analyze any codebase using plain English.
🤔 The Problem
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.
Related MCP server: MCP Context Manager
✨ What It Does
Tool | What you can ask Claude |
| "Index my project at ~/projects/myapp" |
| "Find where JWT tokens are validated" |
| "Give me an overview of how this project is structured" |
| "Scan for common bug patterns and hardcoded secrets" |
| "Find functions that are defined but never used" |
| "What should I refactor in src/utils.py?" |
| "Tell me about the models/user.py file" |
| "List all Python files in the project" |
🚀 Quick Start
1. Install
# 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]"2. Add to Claude Desktop
Open your Claude Desktop config:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add this:
{
"mcpServers": {
"codesense": {
"command": "uvx",
"args": ["codesense-mcp"]
}
}
}Restart Claude Desktop. That's it. ✅
💬 Example Conversations
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.
🏗️ Architecture
codesense-mcp/
├── codesense_mcp/
│ ├── __init__.py
│ └── server.py ← All tools live here (FastMCP)
├── tests/
│ └── test_server.py
├── pyproject.toml
└── README.mdSearch modes:
Mode | When | How |
🧠 Semantic |
| HuggingFace |
🔍 Keyword | Fallback | Token-overlap scoring across indexed chunks |
Supported languages: Python · JavaScript · TypeScript · PHP · Ruby · Go · Java · C# · C/C++ · Rust · Swift
🔍 Bug Detection Patterns
CodeSense scans for:
🔴 Hardcoded secrets / credentials
⚠️ Bare
except:clauses⚠️ Mutable default arguments
⚠️ Empty except blocks
🟡 Leftover
print()debug statements📝 TODO / FIXME / HACK comments
💡 Missing type annotations
🔧 Refactor Analysis
For each file, CodeSense checks:
📏 Functions longer than 50 lines
🪆 Nesting depth greater than 4 levels
🔢 Magic numbers (unnamed constants)
📦 Files larger than 300 lines
♻️ Duplicated code patterns
📝 Missing docstrings
🛠️ Development
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🗺️ Roadmap
Git diff analysis — "What changed in the last 10 commits?"
Dependency graph visualization
Cross-file call graph tracing
Laravel/PHP-specific analysis (routes, controllers, models)
CI/CD integration (GitHub Actions)
Persistent index (survive restarts)
Remote codebase support (GitHub URLs)
🤝 Contributing
PRs welcome! See CONTRIBUTING.md.
If you find this useful, a ⭐ star goes a long way.
📄 License
MIT © Atta Elahi
🙏 Built With
Model Context Protocol — Anthropic's open standard for tool use
FastMCP — Pythonic MCP server framework
LangChain — Chunking & retrieval pipeline
ChromaDB — Local vector store
HuggingFace Sentence Transformers — Local embeddings (no API key!)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.Last updatedMIT
- AlicenseAqualityDmaintenanceEnables efficient code navigation and retrieval through natural language search, BM25 ranking, and fuzzy matching across multiple programming languages. It drastically reduces token usage by allowing Claude to query specific code symbols and logic instead of reading entire files.Last updated134713MIT
- AlicenseAqualityCmaintenanceEnables semantic search over codebases using natural language queries, returning relevant code snippets with source locations. Integrates with Claude Code for automatic codebase exploration.Last updated11MIT
- Alicense-qualityCmaintenanceProvides semantic code search and code insights via a knowledge graph, enabling AI to understand, navigate, and modify complex projects with deep dependency and architecture analysis.Last updatedMIT
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/attaelahi/codesense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server