Codeine
Code Intelligence
MCP server for Claude Code that provides semantic code analysis, refactoring detection, RAG-powered search, and intelligent reasoning. Supports Python, JavaScript, C#, C++, Go, Rust, and HTML.
# Analyze architecture with Codeine
await code_inspection({
action: "get_architecture",
format: "mermaid"
})
# Find refactoring opportunities
await recommender({
recommender_type: "refactoring",
detector_name: "find_large_classes"
})
# Semantic RAG search
await semantic_search({
query: "authentication logic"
})
Intelligent Code
Understanding
Semantic Code Analysis
Deep understanding of code structure using RETER reasoning engine. Extracts classes, functions, inheritance, call graphs, and dependencies.
code_inspection • describe_class • find_callers
Refactoring Detection
70+ detectors based on Martin Fowler's patterns. Find God classes, feature envy, shotgun surgery, circular imports, and more.
recommender • find_large_classes • detect_feature_envy
RAG Semantic Search
FAISS-powered vector embeddings for natural language code search. Find relevant code by describing what you need.
semantic_search • rag_reindex • find_similar
UML Diagrams
Generate class hierarchies, class diagrams with relationships, sequence diagrams, and dependency graphs in Mermaid format.
diagram • class_hierarchy • sequence • dependencies
Structured Reasoning
Thinking tool for step-by-step analysis. Create requirements, tasks, decisions with traceability. Gantt charts for project planning.
thinking • items • project • traceability
Multi-Language Support
Analyze Python, JavaScript/TypeScript, C#, C++, Go, Rust, and HTML. Language-specific and cross-language queries.
python • javascript • csharp • cpp • go • rust
How Codeine Works
Three-layer architecture combining MCP server, Python reasoning wrapper, and C++ RETER engine for maximum performance.
MCP Server Layer
Claude Code integration with tools, resources, and prompts. Session management and instance coordination.
RETER Python Wrapper
High-level API for reasoning, queries, and code analysis. Manages knowledge graphs and inference rules.
RETER C++ Core
RETE algorithm implementation for fast pattern matching. OWL 2 RL and SWRL rule execution.
ANTLR4 Parsers
Language-specific parsing for Python, JavaScript, C#, C++, Go, Rust, and HTML.
Get Running in Minutes
1. Clone Repository
git clone https://github.com/codeine-ai/codeine
2. Install Dependencies
pip install -e . (or use install.bat on Windows)
3. Configure Claude Code
Add MCP server to claude_desktop_config.json
4. Start Analyzing
Use code_inspection, recommender, and thinking tools
From Analysis
to Action
Refactoring Guidance
Detect code smells, find refactoring opportunities, and get step-by-step guidance based on Martin Fowler's patterns.
Learn More →Codebase Understanding
Visualize class hierarchies, dependency graphs, and module structure. Understand complex codebases quickly.
Learn More →Semantic Code Search
Find code by describing what you need in natural language. RAG-powered search across your entire codebase.
Learn More →Make your AI assistant
understand your code.
Install Codeine and give Claude Code deep insight into your codebase.