Coraline is a Rust-based code intelligence system that builds semantic knowledge graphs for AI assistants. It combines ideas from CodeGraph and Serena to provide:
- ⚡ Fast indexing - Native Rust performance for rapid code analysis
- 🧠 Semantic search - Find code by meaning using vector embeddings
- 🔧 Symbol-level tools - Precise function/class/method operations
- 🔒 100% local - All processing happens on your machine
- 🌐 MCP integration - Works with Claude Desktop, Claude Code, and OpenCode
# From crates.io (recommended)
cargo install coraline
# Or download pre-built binaries from releases
# https://github.com/greysquirr3l/coraline/releases# Initialize and index a project
cd your-project
coraline init -i
# Optional: Download embedding model and generate vectors for semantic search
coraline embed --download
# Start MCP server for AI assistants
coraline serve --mcpAdd to your MCP client config:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"coraline": {
"command": "/path/to/coraline",
"args": ["serve", "--mcp"]
}
}
}Claude Code (.claude/mcp.json in workspace):
{
"mcpServers": {
"coraline": {
"command": "coraline",
"args": ["serve", "--mcp"]
}
}
}OpenCode (.opencode/config.json in workspace):
{
"mcpServers": {
"coraline": {
"command": "coraline",
"args": ["serve", "--mcp", "--timeout", "300000"]
}
}
}coraline init [path] # Initialize project
coraline index [path] # Build code graph
coraline sync [path] # Incremental update
coraline status [path] # Show project status
coraline query <search> # Search symbols
coraline serve --mcp [--timeout <ms>] # Start MCP server
coraline embed [--download] # Generate semantic embeddings
coraline hooks install # Auto-sync on git commitsCoraline exposes 33 tools for code intelligence:
Core Tools: coraline_search, coraline_callers, coraline_callees, coraline_impact, coraline_context, coraline_semantic_search
Batch Tools: coraline_batch_get_nodes, coraline_batch_callers, coraline_batch_callees (60-90% token savings)
Advanced Search: coraline_search_by_signature, coraline_search_by_docstring, coraline_search_exported_symbols
All tools support output_format: "compact" for 65% token reduction.
📖 Read the full documentation →
- Installation & Setup
- MCP Tools Reference
- CLI Reference
- Configuration Guide
- OpenCode Integration
- Architecture
33 languages including TypeScript, Rust, Python, Go, C#, Java, C/C++, Ruby, Bash, PHP, Swift, Kotlin, Haskell, Scala, Lua, Markdown, and more.
Contributions welcome! See DEVELOPMENT.md for build setup and contribution guidelines.
Licensed under either of Apache License 2.0 or MIT license at your option.
Built upon ideas from CodeGraph by Colby McHenry and Serena by Oraios AI, using tree-sitter for parsing.
Built with Rust for the AI coding community
