能力标签
Elixir MCP 工具
🔌
MCP工具

Elixir MCP 工具

基于 Elixir · 让 AI 助手直接操作你的系统与工具
英文名:ragex
⭐ 16 Stars 🍴 4 Forks 💻 Elixir 📄 NOASSERTION 🏷 AI 7.5分
7.5AI 综合评分
mcpelixir
⚙️ 配置说明
✦ AI Skill Hub 推荐

Elixir MCP 工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

Elixir MCP 工具 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 Elixir MCP 工具,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。Elixir MCP 工具 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 Elixir MCP 工具 评为 AI 评分 7.5 分,属于同类工具中的优质选择。

📋 工具概览

Hybrid RAG/MCP in Elixir,提供高效的MCP功能

Elixir MCP 工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 16
开发语言
Elixir
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
NOASSERTION
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
4

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

Hybrid RAG/MCP in Elixir,提供高效的MCP功能

Elixir MCP 工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/Oeditus/ragex

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "elixir-mcp---": {
      "command": "npx",
      "args": ["-y", "ragex"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 Elixir MCP 工具 执行以下任务...
Claude: [自动调用 Elixir MCP 工具 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "elixir_mcp___": {
      "command": "npx",
      "args": ["-y", "ragex"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 67/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

![Ragex Logo](https://github.com/user-attachments/assets/9787c8a8-c0bf-46c0-94cb-cceda2c1ec11) Ragex

Hybrid Retrieval-Augmented Generation for Multi-Language Codebases

Ragex is an MCP (Model Context Protocol) server that analyzes codebases using compiler output and language-native tools to build comprehensive knowledge graphs. It enables natural language querying of code structure, relationships, and semantics.

Features

<details> <summary>Foundation</summary>     ▸ MCP Server Protocol: Full JSON-RPC 2.0 implementation over both stdio and socket<br/>     ▸ Elixir Code Analyzer: AST-based parser extracting modules, functions, calls, and dependencies<br/>     ▸ Knowledge Graph: ETS-based storage for code entities and relationships<br/>     ▸ MCP Tools:<br/>       ▹ analyze_file: Parse and index source files<br/>       ▹ query_graph: Search for modules, functions, and relationships<br/>       ▹ list_nodes: Browse indexed code entities </details> <details> <summary>Multi-Language Support</summary>   ▸ Erlang Analyzer: Uses :erl_scan and :erl_parse for native Erlang AST parsing<br/>   ▸ Python Analyzer: Shells out to Python's ast module for comprehensive analysis<br/>   ▸ Ruby Analyzer: Uses Metastatic Ruby adapter (parser gem) with native fallback<br/>   ▸ JavaScript/TypeScript Analyzer: Regex-based parsing for common JS/TS patterns<br/>   ▸ Auto-detection: Automatically detects language from file extension<br/>   ▸ Directory Analysis: Batch analyze entire projects with parallel processing<br/>   ▸ File Watching: Auto-reindex on file changes<br/>   ▸ Supported Extensions: .ex, .exs, .erl, .hrl, .py, .rb, .js, .jsx, .ts, .tsx, .mjs </details> <details> <summary>Semantic Search & Hybrid Retrieval</summary>     ▸ Embeddings Foundation<br/>       ▹ Local ML Model: Bumblebee integration with sentence-transformers/all-MiniLM-L6-v2<br/>       ▹ Vector Embeddings: 384-dimensional embeddings for code entities<br/>       ▹ Automatic Generation: Embeddings created during code analysis<br/>       ▹ Text Descriptions: Natural language descriptions for modules and functions<br/>       ▹ ETS Storage: Embeddings stored alongside graph entities<br/>       ▹ No External APIs: Fully local model inference (~400MB memory)<br/><br/>     ▸ Vector Store<br/>       ▹ Cosine Similarity: Fast vector similarity search (less than 50ms for 100 entities)<br/>       ▹ Parallel Search: Concurrent similarity calculations<br/>       ▹ Filtering: By node type, similarity threshold, and result limit<br/>       ▹ k-NN Search: Nearest neighbor queries<br/>       ▹ Statistics API: Vector store metrics and monitoring<br/><br/>     ▸ Semantic Search Tools<br/>       ▹ Semantic Search: Natural language code queries (“function to parse JSON”)<br/>       ▹ Getting Embeddings Stats: ML model and vector store statistics<br/>       ▹ Result Enrichment: Context with callers, callees, file locations<br/>       ▹ Flexible Filtering: By type, threshold, limit, with context inclusion<br/><br/>     ▸ Hybrid Retrieval<br/>       ▹ Hybrid Search: Combines symbolic and semantic approaches<br/>       ▹ Three Strategies: Fusion (RRF), semantic-first, graph-first<br/>       ▹ Reciprocal Rank Fusion: Intelligent ranking combination (k is 60)<br/>       ▹ Graph Constraints: Optional symbolic filtering<br/>       ▹ Performance: <100ms for typical queries<br/><br/>     ▸ Enhanced Graph Queries<br/>       ▹ PageRank: Importance scoring based on call relationships<br/>       ▹ Path Finding: Discover call chains between functions (with limits)<br/>       ▹ Degree Centrality: In-degree, out-degree, and total degree metrics<br/>       ▹ Graph Statistics: Comprehensive codebase analysis<br/>       ▹ MCP Tools: find_paths and graph_stats tools </details> <details> <summary>Production Features</summary>     ▸ Custom Embedding Models<br/>       ▹ Model Registry: 4 pre-configured embedding models<br/>       ▹ Flexible Configuration: Config file, environment variable, or default<br/>       ▹ Model Compatibility: Automatic detection of compatible models (same dimensions)<br/>       ▹ Migration Tool: mix ragex.embeddings.migrate for model changes<br/>       ▹ Validation: Startup checks for model compatibility<br/><br/>     ▸ Embedding Persistence<br/>       ▹ Automatic Cache: Save on shutdown, load on startup<br/>       ▹ Model Validation: Ensures cache matches current model<br/>       ▹ Project-Specific: Isolated caches per project directory<br/>       ▹ Cache Management: Mix tasks for stats and cleanup (mix ragex.cache.*)<br/>       ▹ Performance: Cold start <5s vs 50s without cache<br/>       ▹ Storage: ~15MB per 1,000 entities (ETS binary format)<br/><br/>     ▸ Incremental Embedding Updates<br/>       ▹ File Tracking: SHA256 content hashing for change detection<br/>       ▹ Smart Diff: Only re-analyzes changed files<br/>       ▹ Selective Regeneration: Updates embeddings for modified entities only<br/>       ▹ Performance: <5% regeneration on single-file changes<br/>       ▹ Mix Task: mix ragex.cache.refresh for incremental/full updates<br/><br/>     ▸ Path Finding Limits<br/>       ▹ max_paths Parametrization: Limits returned paths (default: 100) to prevent hangs<br/>       ▹ Early Stopping: DFS traversal stops when max_paths reached<br/>       ▹ Dense Graph Detection: Automatic warnings for highly-connected nodes (≥10 edges)<br/>       ▹ Configurable Options: max_depth, max_paths, warn_dense flags<br/>       ▹ Performance: Prevents exponential explosion on dense graphs </details> <details> <summary>Code Editing Capabilities</summary>     ▸ Core Editor Infrastructure<br/>       ▹ Editor Types: Change types (replace, insert, delete) with validation<br/>       ▹ Backup Management: Automatic backups with timestamps and project-specific directories<br/>       ▹ Core Editor: Atomic operations with concurrent modification detection<br/>       ▹ Rollback Support: Restore previous versions from backup history<br/>       ▹ Configuration: Backup retention, compression, and directory settings<br/><br/>     ▸ Validation Pipeline<br/>       ▹ Validator Behavior: Behavior definition with callbacks and orchestration<br/>     ▹ Elixir Validator: Syntax validation using Code.string_to_quoted/2<br/>     ▹ Erlang Validator: Validation using :erl_scan and :erl_parse<br/>     ▹ Python Validator: Shell-out to Python's ast.parse() for syntax checking<br/>     ▹ Ruby Validator: ruby -c for Ruby syntax checking<br/>     ▹ JavaScript Validator: Node.js vm.Script for JS/TS validation<br/>       ▹ Automatic Detection: Language detection from file extension<br/>       ▹ Core Integration: Validators integrated with Core.edit_file<br/><br/>     ▸ MCP Edit Tools<br/>       ▹ edit_file: MCP tool for safe file editing with validation<br/>       ▹ validate_edit: Preview validation before applying changes<br/>       ▹ rollback_edit: Undo recent edits via MCP<br/>       ▹ edit_history: Query backup history<br/><br/>     ▸ Advanced Editing<br/>       ▹ Format Integration: Auto-format after edits with language-specific formatters<br/>     ▹ Formatter Detection: Automatic formatter discovery (mix, rebar3, black, rubocop, prettier)<br/>       ▹ Core Integration: :format option in Core.edit_file<br/>       ▹ Multi-file Transactions: Atomic cross-file changes with automatic rollback<br/>       ▹ Transaction Validation: Pre-validate all files before applying changes<br/>       ▹ MCP Integration: edit_files tool for coordinated multi-file edits<br/><br/>   ▸ Semantic Refactoring<br/>     ▹ AST Manipulation: Elixir-specific AST parsing and transformation<br/>     ▹ Rename Function: Rename functions with automatic call site updates<br/>     ▹ Rename Module: Rename modules with reference updates<br/>     ▹ Graph Integration: Use knowledge graph to find all affected files<br/>     ▹ Arity Support: Handle functions with multiple arities correctly<br/>     ▹ Scope Control: Module-level or project-wide refactoring<br/>     ▹ MCP Integration: refactor_code tool for semantic refactoring<br/><br/>   ▸ Advanced Refactoring<br/>     ▹ Extract Function: Extract code range into new function (basic support)<br/>     ▹ Inline Function: Replace all calls with function body, remove definition (fully working)<br/>     ▹ Convert Visibility: Toggle between def and defp (fully working)<br/>     ▹ Rename Parameter: Rename parameter within function scope (fully working)<br/>     ▹ Modify Attributes: Add/remove/update module attributes (fully working)<br/>     ▹ Change Signature: Add/remove/reorder/rename parameters with call site updates (fully working)<br/>     ▹ Move Function: Move function between modules (deferred - requires advanced semantic analysis)<br/>     ▹ Extract Module: Extract multiple functions into new module (deferred - requires advanced semantic analysis)<br/>     ▹ MCP Integration: advanced_refactor tool with 8 operation types<br/>     ▹ Status: 6 of 8 operations fully functional, 2 deferred pending semantic analysis enhancements </details> <details> <summary>Advanced Graph Algorithms</summary>     ▸ Centrality Metrics<br/>       ▹ Betweenness Centrality: Identify bridge/bottleneck functions using Brandes’ algorithm<br/>       ▹ Closeness Centrality: Identify central functions based on average distance<br/>       ▹ Normalized Scores: Configurable 0-1 normalization<br/>       ▹ Performance Limits: max_nodes parameter for large graphs<br/>       ▹ MCP Tools: betweenness_centrality and closeness_centrality<br/><br/>     ▸ Community Detection<br/>       ▹ Louvain Method: Modularity optimization for discovering architectural modules<br/>       ▹ Label Propagation: Fast alternative algorithm (O(m) per iteration)<br/>       ▹ Hierarchical Structure: Multi-level community detection support<br/>       ▹ Weighted Edges: Support for edge weights (call frequency)<br/>       ▹ MCP Tool: detect_communities with algorithm selection<br/><br/>     ▸ Weighted Graph Support<br/>       ▹ Edge Weights: Store call frequency in edge metadata (default: 1.0)<br/>       ▹ Weighted Algorithms: Modularity computation with weights<br/>       ▹ Store Integration: get_edge_weight helper function<br/><br/>   ▸ Graph Visualization<br/>     ▹ Graphviz DOT Export: Community clustering, colored nodes, weighted edges<br/>     ▹ D3.js JSON Export: Force-directed graph format with metadata<br/>     ▹ Node Coloring: By PageRank, betweenness, or degree centrality<br/>     ▹ Edge Thickness: Proportional to edge weight<br/>     ▹ MCP Tool: export_graph with format selection </details> <details> <summary>MCP Resources & Prompts</summary>   ▸ Resources (Read-only State Access)<br/>     ▹ Graph Statistics: Node/edge counts, PageRank scores, centrality metrics<br/>     ▹ Cache Status: Embedding cache health, file tracking, stale entities<br/>     ▹ Model Configuration: Active model details, capabilities, readiness<br/>     ▹ Project Index: Tracked files, language distribution, entity counts<br/>     ▹ Algorithm Catalog: Available algorithms with parameters and complexity<br/>     ▹ Analysis Summary: Pre-computed architectural insights and communities<br/>     ▹ URI Format: ragex://<category>/<resource><br/>     ▹ Documentation: See RESOURCES.md<br/><br/>   ▸ Prompts (High-level Workflows)<br/>     ▹ Analyze Architecture: Comprehensive architectural analysis (shallow/deep)<br/>     ▹ Find Impact: Function importance and refactoring risk assessment<br/>     ▹ Explain Code Flow: Narrative execution flow between functions<br/>     ▹ Find Similar Code: Hybrid search with natural language descriptions<br/>     ▹ Suggest Refactoring: Modularity, coupling, and complexity analysis<br/>     ▹ Safe Rename: Impact preview for semantic refactoring operations<br/>     ▹ Tool Composition: Each prompt suggests sequence of tools to use<br/>     ▹ Documentation: See PROMPTS.md </details> <details> <summary>RAG System (🔥)</summary>   ▸ AI Provider Abstraction<br/>     ▹ Provider Behaviour: Clean interface for multiple AI providers<br/>     ▹ DeepSeek R1: Full integration with deepseek-chat and deepseek-reasoner models<br/>     ▹ Streaming Support: All providers support streaming responses (SSE/NDJSON)<br/>     ▹ Real-time Responses: Progressive content delivery with token usage tracking<br/>     ▹ OpenAI: GPT-4, GPT-4-turbo, GPT-3.5-turbo support<br/>     ▹ Anthropic: Claude 3 Opus, Sonnet, and Haiku models<br/>     ▹ Ollama: Local LLM support (llama2, mistral, codellama, phi)<br/>     ▹ Configuration System: Multi-provider with fallback support<br/>     ▹ Provider Registry: GenServer for runtime provider management<br/><br/>   ▸ AI Response Caching<br/>     ▹ ETS-based Cache: SHA256 key generation with TTL expiration<br/>     ▹ LRU Eviction: Automatic eviction when max size reached<br/>     ▹ Operation-specific TTL: Configurable per operation type<br/>     ▹ Cache Statistics: Hit rate, misses, puts, evictions tracking<br/>     ▹ Mix Tasks: mix ragex.ai.cache.stats and mix ragex.ai.cache.clear<br/>     ▹ Performance: >50% cache hit rate for repeated queries<br/><br/>   ▸ Usage Tracking & Rate Limiting<br/>     ▹ Per-provider Tracking: Requests, tokens, and cost estimation<br/>     ▹ Real-time Costs: Accurate pricing for OpenAI, Anthropic, DeepSeek<br/>     ▹ Time-windowed Limits: Per-minute, per-hour, per-day controls<br/>     ▹ Automatic Enforcement: Rate limit checks before API calls<br/>     ▹ Mix Tasks: mix ragex.ai.usage.stats for monitoring<br/>     ▹ MCP Tools: get_ai_usage, get_ai_cache_stats<br/><br/>   ▸ Metastatic Integration<br/>     ▹ MetaAST Analyzer: Enhanced cross-language analysis via Metastatic library<br/>     ▹ Supported Languages: Elixir, Erlang, Python, Ruby, Haskell<br/>     ▹ Fallback Strategy: Graceful degradation to native analyzers<br/>     ▹ Feature Flags: Configurable use_metastatic option<br/><br/>   ▸ RAG Pipeline<br/>     ▹ Context Builder: Format retrieval results for AI consumption (8000 char max)<br/>     ▹ Prompt Templates: Query, explain, and suggest operations<br/>     ▹ Full Pipeline: Retrieval → Context → Prompting → Generation → Post-processing<br/>     ▹ Hybrid Retrieval: Leverages semantic + graph-based search<br/>     ▹ Cache Integration: Automatic caching of AI responses<br/>     ▹ Usage Tracking: All requests tracked with cost estimation<br/><br/>   ▸ Agent-Based RAG (chat & audit)<br/>     ▹ The AI drives retrieval: agent calls Ragex MCP tools directly instead of receiving pre-fetched context<br/>     ▹ mix ragex.chat: every question answered via ReAct loop with hybrid_search, semantic_search, read_file, query_graph, etc.<br/>     ▹ mix ragex.audit: AI report enriched by read-only RAG tool calls for concrete evidence (ToolSchema.rag_query_tools/1)<br/>     ▹ Evidence-based findings: AI can quote actual function bodies, confirm dependency paths, and check coupling metrics<br/>     ▹ Safe scoping: heavy re-analysis tools excluded so the analysis pipeline is never re-triggered during report writing<br/><br/>   ▸ MCP RAG Tools<br/>     ▹ rag_query: Answer general codebase questions with AI<br/>     ▹ rag_explain: Explain code with aspect focus (purpose, complexity, dependencies, all)<br/>     ▹ rag_suggest: Suggest improvements (performance, readability, testing, security, all)<br/>     ▹ rag_query_stream: Streaming version of rag_query (internally uses streaming)<br/>     ▹ rag_explain_stream: Streaming version of rag_explain (internally uses streaming)<br/>     ▹ rag_suggest_stream: Streaming version of rag_suggest (internally uses streaming)<br/>     ▹ get_ai_usage: Query usage statistics and costs per provider<br/>     ▹ get_ai_cache_stats: View cache performance metrics<br/>     ▹ clear_ai_cache: Clear cache via MCP<br/>     ▹ Provider Override: Select provider per-query (openai, anthropic, deepseek_r1, ollama)<br/><br/>   ▸ MetaAST-Enhanced Retrieval<br/>     ▹ Context-Aware Ranking: Query intent detection (explain, refactor, example, debug)<br/>     ▹ Purity Analysis: Boost pure functions, penalize side effects<br/>     ▹ Complexity Scoring: Favor simple code for explanations, complex code for refactoring<br/>     ▹ Cross-Language Search: Find equivalent constructs across languages via MetaAST<br/>     ▹ Query Expansion: Automatic synonym injection and cross-language terms<br/>     ▹ Pattern Search: Find all implementations of MetaAST patterns (map, filter, lambda, etc.)<br/>     ▹ Hybrid Integration: MetaAST ranking applied to all search strategies<br/>     ▹ MCP Tools: metaast_search, cross_language_alternatives, expand_query, find_metaast_pattern </details> <details> <summary>AI Features (🔥)</summary>   ▸ Foundation Layer<br/>     ▹ Features.Config: Per-feature flags with master switch<br/>     ▹ Features.Context: Rich context builders (6 context types)<br/>     ▹ Features.Cache: Automatic caching with TTL policies (3-7 days)<br/>     ▹ Graceful degradation when AI disabled<br/><br/>   ▸ High-Priority Features<br/>     ▹ ValidationAI: AI-enhanced validation error explanations<br/>     ▹ AIPreview: Refactoring preview with risk assessment and recommendations<br/><br/>   ▸ Analysis Features<br/>     ▹ AIRefiner: Dead code false positive reduction (50%+ target)<br/>     ▹ AIAnalyzer: Semantic Type IV clone detection (>70% accuracy target)<br/>     ▹ AIInsights: Architectural insights for coupling and circular dependencies<br/>     ▹ Context-aware recommendations with technical debt scoring<br/><br/>   ▸ Configuration<br/>     ▹ Opt-in via :ai_features config (dead_code_refinement, duplication_semantic_analysis, etc.)<br/>     ▹ Master switch with per-feature overrides<br/>     ▹ Integrates with existing analysis modules (DeadCode, Duplication, DependencyGraph)<br/>     ▹ MCP tools: validate_with_ai, enhanced preview_refactor </details> <details> <summary>Code Analysis & Quality</summary>   ▸ Dead Code Detection<br/>     ▹ Graph-Based Analysis: Find unused functions via call graph traversal<br/>     ▹ Confidence Scoring: 0.0-1.0 score to distinguish callbacks from dead code<br/>     ▹ Pattern Detection: AST-based unreachable code detection via Metastatic<br/>     ▹ Intraprocedural Analysis: Constant conditionals, unreachable branches<br/>     ▹ Interprocedural Analysis: Unused exports, private functions<br/>     ▹ Callback Recognition: GenServer, Phoenix, and other framework callbacks<br/>     ▹ MCP Tools: find_dead_code, analyze_dead_code_patterns<br/><br/>   ▸ Dependency Analysis<br/>     ▹ Coupling Metrics: Afferent (Ca) and Efferent (Ce) coupling<br/>     ▹ Instability: I = Ce / (Ca + Ce) ranges from 0 (stable) to 1 (unstable)<br/>     ▹ Circular Dependencies: Detect cycles at module and function levels<br/>     ▹ Transitive Dependencies: Optional deep dependency traversal<br/>     ▹ God Module Detection: Find modules with high coupling<br/>     ▹ MCP Tools: analyze_dependencies, find_circular_dependencies, coupling_report<br/><br/>   ▸ Code Duplication Detection<br/>     ▹ AST-Based Clones: Type I-IV clone detection via Metastatic<br/>     ▹ Type I: Exact clones (whitespace/comment differences only)<br/>     ▹ Type II: Renamed clones (same structure, different identifiers)<br/>     ▹ Type III: Near-miss clones (similar with modifications, configurable threshold)<br/>     ▹ Type IV: Semantic clones (different syntax, same behavior)<br/>     ▹ Embedding-Based Similarity: Semantic code similarity using ML embeddings<br/>     ▹ Directory Scanning: Recursive multi-file analysis with exclusion patterns<br/>     ▹ Reports: Summary, detailed, and JSON formats<br/>     ▹ MCP Tools: find_duplicates, find_similar_code<br/><br/>   ▸ Impact Analysis<br/>     ▹ Change Impact: Predict affected code via graph traversal<br/>     ▹ Risk Scoring: Combine importance (PageRank) + coupling + complexity<br/>     ▹ Test Discovery: Find affected tests automatically<br/>     ▹ Effort Estimation: Estimate refactoring time/complexity for 6 operations<br/>     ▹ Risk Levels: Low (<0.3), medium (0.3-0.6), high (0.6-0.8), critical (≥0.8)<br/>     ▹ Complexity Levels: Low (<5 changes), medium (5-20), high (20-50), very high (50+)<br/>     ▹ Support Operations: rename_function, rename_module, extract_function, inline_function, move_function, change_signature<br/>     ▹ MCP Tools: analyze_impact, estimate_refactoring_effort, risk_assessment<br/><br/>   ▸ Code Smells Detection (Metastatic Integration)<br/>     ▹ Long Function: Functions with too many statements (default: >50)<br/>     ▹ Deep Nesting: Excessive nesting depth (default: >4 levels)<br/>     ▹ Magic Numbers: Unexplained numeric literals in expressions<br/>     ▹ Complex Conditionals: Deeply nested boolean operations<br/>     ▹ Long Parameter List: Too many parameters (default: >5)<br/>     ▹ Configurable Thresholds: Custom limits per project<br/>     ▹ Severity Levels: Critical, high, medium, low<br/>     ▹ Actionable Suggestions: Refactoring recommendations for each smell<br/>     ▹ Directory Scanning: Recursive analysis with parallel processing<br/>     ▹ Filtering: By severity or smell type<br/>     ▹ MCP Tool: detect_smells<br/><br/>   ▸ Business Logic Analysis (20 Metastatic Analyzers)<br/>     ▹ Control Flow Issues:<br/>       • Callback Hell: Excessive nested callbacks (default: >3 levels)<br/>       • Missing Error Handling: Functions without try/rescue or error tuples<br/>       • Silent Error Case: Pattern matches that ignore error tuples<br/>       • Swallowing Exception: Rescue clauses without re-raising or logging<br/><br/>     ▹ Data & Configuration:<br/>       • Hardcoded Value: URLs, secrets, or config values in code<br/>       • Direct Struct Update: Using %{struct | ...} instead of changesets/contexts<br/>       • Missing Preload: Ecto queries without required preloads<br/><br/>     ▹ Performance & Scalability:<br/>       • N+1 Query: Multiple database queries in iterations<br/>       • Inefficient Filter: Filtering after fetching instead of in query<br/>       • Unmanaged Task: Task.start without supervision<br/>       • Blocking in Plug: Slow synchronous operations in plug pipeline<br/>       • Sync Over Async: Using sync calls when async is available<br/><br/>     ▹ Observability:<br/>       • Missing Telemetry for External HTTP: External API calls without telemetry<br/>       • Missing Telemetry in Auth Plug: Auth operations without metrics<br/>       • Missing Telemetry in LiveView Mount: LiveView lifecycle without tracking<br/>       • Missing Telemetry in Oban Worker: Background jobs without observability<br/>       • Telemetry in Recursive Function: Performance overhead from recursive telemetry<br/><br/>     ▹ Framework-Specific:<br/>       • Missing Handle Async: LiveView async results without handlers<br/>       • Inline JavaScript: JavaScript in Phoenix templates/LiveView<br/>       • Missing Throttle: User-facing actions without rate limiting<br/><br/>     ▹ Tier Classification: 4 tiers from pure MetaAST to content analysis<br/>     ▹ Actionable Recommendations: Specific fixes for each issue type<br/>     ▹ Severity Levels: Critical, high, medium, low, info<br/>     ▹ Directory Scanning: Recursive analysis with file type detection<br/>     ▹ Filtering: By analyzer, minimum severity, or file patterns<br/>     ▹ Reports: Summary with counts by analyzer and severity<br/>     ▹ MCP Tool: analyze_business_logic<br/>     ▹ Mix Task: mix ragex.analyze --business-logic<br/><br/>   ▸ Quality Metrics (Metastatic Integration)<br/>     ▹ Complexity Metrics (Full Suite):<br/>       • Cyclomatic Complexity: McCabe metric (decision points + 1)<br/>       • Cognitive Complexity: Structural complexity with nesting penalties<br/>       • Nesting Depth: Maximum nesting level tracking<br/><br/>     ▹ Halstead Metrics (Comprehensive):<br/>       • Vocabulary: distinct_operators + distinct_operands<br/>       • Length: total_operators + total_operands<br/>       • Volume: length × log₂(vocabulary)<br/>       • Difficulty: (distinct_operators / 2) × (total_operands / distinct_operands)<br/>       • Effort: volume × difficulty<br/><br/>     ▹ Lines of Code (Detailed):<br/>       • Physical Lines: Total lines including blank/comments<br/>       • Logical Lines: Executable statements only<br/>       • Comments: Comment lines count<br/>       • Blank Lines: Whitespace-only lines<br/><br/>     ▹ Function Metrics:<br/>       • Statement Count: Number of executable statements<br/>       • Return Points: Multiple return analysis<br/>       • Variable Count: Local variable tracking<br/>       • Parameter Count: Function signature complexity<br/>     ▹ Purity Analysis: Function purity and side-effect detection<br/>     ▹ Per-Function Analysis: Individual function breakdown with all metrics<br/>     ▹ Project-wide Reports: Aggregated statistics by language<br/>     ▹ MCP Tools: analyze_quality, quality_report, find_complex_code<br/><br/>   ▸ Documentation<br/>     ▹ Comprehensive Guide: See ANALYSIS for complete API documentation<br/>     ▹ Analysis Approaches: AST-based vs embedding-based strategies<br/>     ▹ Usage Examples: API and MCP tool examples with code snippets<br/>     ▹ Best Practices: Threshold recommendations, workflow tips<br/>     ▹ Troubleshooting: Common issues and solutions<br/>     ▹ CI/CD Integration: Pre-commit hooks, pipeline examples </details> <details> <summary>CLI Improvements</summary>   ▸ CLI Foundation<br/>     ▹ Colors: ANSI color helpers with NO_COLOR support<br/>     ▹ Output: Rich formatting (sections, lists, tables, key-value pairs, diffs)<br/>     ▹ Progress: Spinners and progress indicators<br/>     ▹ Prompt: Interactive prompts (confirm, select, input, number with validation)<br/><br/>   ▸ Enhanced Mix Tasks (7 upgraded)<br/>     ▹ mix ragex.cache.{stats,refresh,clear} - Colored output, spinners, confirmations<br/>     ▹ mix ragex.embeddings.migrate - Sections, formatted output, interactive confirmations<br/>     ▹ mix ragex.ai.{usage.stats,cache.stats,cache.clear} - Rich formatting, color-coded metrics<br/><br/>   ▸ Interactive Wizards<br/>     ▹ mix ragex.chat - AI-powered codebase Q&A via Ragex MCP tools:<br/>       • Agent ReAct loop — AI calls hybrid_search, semantic_search, read_file, query_graph, etc.<br/>       • Initial analysis + streaming audit report on first run<br/>       • Multi-turn conversation with session memory<br/>       • --provider / --model overrides; --skip-analysis to reuse existing graph<br/>       • --debug to print tool-call traces to stderr<br/><br/>     ▹ mix ragex.audit - AI-powered code audit report:<br/>       • Static analysis + AI report with optional RAG evidence retrieval<br/>       • JSON (default) or Markdown output; --output FILE to save<br/>       • --format markdown renders the report directly in the terminal<br/>       • --verbose shows progress; --dead-code enables dead-code section<br/><br/>     ▹ mix ragex.refactor - Interactive refactoring wizard:<br/>       • 5 operations: rename_function, rename_module, change_signature, extract_function, inline_function<br/>       • Parameter gathering with validation<br/>       • Knowledge graph integration<br/>       • Preview and confirmation before applying<br/>       • Both interactive and direct CLI modes<br/><br/>     ▹ mix ragex.configure - Configuration wizard:<br/>       • Smart project type detection<br/>       • Embedding model comparison and selection<br/>       • AI provider configuration with environment detection<br/>       • Analysis options and cache settings<br/>       • Generates complete .ragex.exs configuration file<br/><br/>   ▸ Live Dashboard<br/>     ▹ mix ragex.dashboard - Real-time monitoring:<br/>       • 4 stat panels: Graph, Embeddings, Cache, AI Usage<br/>       • Live updating display (customizable refresh interval)<br/>       • Color-coded metrics with thresholds<br/>       • Activity log<br/><br/>   ▸ Shell Completions<br/>     ▹ Bash, Zsh, Fish completion scripts<br/>     ▹ mix ragex.completions - Auto-detect and install completions<br/>     ▹ Task name completion with descriptions<br/>     ▹ Context-aware argument completion<br/><br/>   ▸ Documentation<br/>     ▹ Man pages in groff format (ragex.1)<br/>     ▹ mix ragex.install_man - System-wide man page installation<br/>     ▹ Complete command reference (10 Mix tasks)<br/>     ▹ Configuration guide and usage examples </details>

Planned Features

  • [✓] Streaming RAG responses
  • [✓] MCP streaming notifications
  • [✓] MetaAST-enhanced retrieval
  • [✓] Code quality analysis
  • [✓] Impact analysis and risk assessment
  • [✓] CLI improvements (interactive wizards, dashboard, completions, man pages)
  • [✓] CI tasks (diff-based analysis, GitHub Actions annotations, mix ragex.ci)
  • [✗] Provider health checks and auto-failover
  • [✗] Production optimizations
  • [±] Additional language support
  • [±] Cross-language refactoring via Metastatic
  • [✓] Enhanced editor integrations (Zed, Claude Desktop, Cursor, LunarVim)

Prerequisites

  • Elixir 1.18 or later
  • Erlang/OTP 27 or later
  • Python 3.x (optional, for Python code analysis)
  • Node.JS (optional, for Javascript code analysis)
  • ~500MB RAM for embedding model (first run downloads ~90MB)

Installation

Build

cd ragex
mix deps.get
mix compile

Note: First compilation will take longer due to ML dependencies. The embedding model (~90MB) will download on first run and be cached at ~/.cache/huggingface/.

Usage

MCP Protocol Example

Initialize the server:

{"jsonrpc":"2.0","method":"initialize","params":{"clientInfo":{"name":"test-client","version":"1.0"}},"id":1}

List available tools:

{"jsonrpc":"2.0","method":"tools/list","id":2}

Analyze a file (with auto-detection):

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "analyze_file",
    "arguments": {
      "path": "lib/ragex.ex"
    }
  },
  "id": 3
}

Or specify the language explicitly:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "analyze_file",
    "arguments": {
      "path": "script.py",
      "language": "python"
    }
  },
  "id": 3
}

Query the graph:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "query_graph",
    "arguments": {
      "query_type": "find_module",
      "params": {"name": "Ragex"}
    }
  },
  "id": 4
}

Demo

A comprehensive demo showcasing all Ragex features is available in examples/product_cart/.

The demo uses an intentionally mediocre e-commerce cart application to demonstrate: - Security vulnerability scanning (8+ issues detected) - Code complexity analysis (cyclomatic, cognitive, Halstead metrics) - Code smell detection (long functions, deep nesting, magic numbers) - Code duplication detection (Type I-IV clones) - Dead code analysis (4 unused functions) - Dependency and coupling analysis - Impact analysis and refactoring suggestions - AI-enhanced features (ValidationAI, AIPreview, AIRefiner, AIAnalyzer, AIInsights)

Quick Start:

cd examples/product_cart
./run_demo.sh

The demo generates 11 detailed reports showing: - 8 security vulnerabilities (2 critical, 3 high) - 18 code smells across 5 types - 52 lines of duplicated code (10% of codebase) - 28 lines of dead code (7% of codebase) - 8 prioritized refactoring suggestions - Expected improvement: 65% better maintainability

See Produce Cart’s README for full details and Product Cart’s DEMO for step-by-step walkthrough.

MCP Tools Reference

🎯 aiskill88 AI 点评 A 级 2026-05-24

该工具提供了一个高效的MCP解决方案,适用于Elixir开发,但需要进一步的测试和优化

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • embedding 模型与查询模型不一致导致检索失效
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型
部署方案
  • CLI:直接 npm install -g / pip install,命令行调用
  • 本地部署:CPU 8GB 起,GPU 推荐 16GB+ 显存
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
ragex 中文教程ragex 安装报错怎么办ragex MCP 配置ragex Agent 工作流ragex 与同类工具对比ragex 最佳实践ragex 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • embedding 模型与查询模型不一致导致检索失效
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

ragex 是一款Elixir开发的AI辅助工具。开源MCP工具:Hybrid RAG/MCP in Elixir。⭐16 · Elixir 主要应用场景包括:用于Elixir开发的MCP工具,适用于需要MCP功能的项目。
💡 AI Skill Hub 点评

经综合评估,Elixir MCP 工具 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
📚 深入学习 Elixir MCP 工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 ragex
原始描述 开源MCP工具:Hybrid RAG/MCP in Elixir。⭐16 · Elixir
Topics mcpelixir
GitHub https://github.com/Oeditus/ragex
License NOASSERTION
语言 Elixir
🔗 原始来源
🐙 GitHub 仓库  https://github.com/Oeditus/ragex

收录时间:2026-05-24 · 更新时间:2026-05-30 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。