Advanced Graph RAG MCP Server with file location identification, graph processing, and result summarization capabilities
npm install zrald1Advanced Graph RAG MCP Server with file location identification, graph processing, and result summarization capabilities.
- File Location Identification: Intelligently identify and locate files based on user queries
- Graph Processing: Convert files into knowledge graph representations with nodes and relationships
- Vector Search: Semantic search across file content using vector embeddings
- Relationship Analysis: Analyze relationships between files based on content similarity, references, and dependencies
- Comprehensive Summarization: Generate detailed summaries and analytics of processed files
- Export Capabilities: Export graph data in multiple formats (JSON, Cypher, GraphML)
``bash`
npm install zrald-1
`bash`
npx zrald-1
`typescript
import { GraphRAGMCPServer } from 'zrald-1';
const server = new GraphRAGMCPServer();
await server.initialize();
await server.start();
`
1. identify_files - Identify and locate files based on search criteria
2. process_files_to_graph - Convert identified files into graph nodes and relationships
3. generate_file_summary - Generate comprehensive summaries of processed files
4. search_file_content - Search within file content using vector similarity
5. analyze_file_relationships - Analyze relationships between files
6. export_graph_data - Export graph data in various formats
7. vdb_search - Vector similarity search across all processed content
8. graph_analytics - Get comprehensive analytics about the file graph
Create a .env file in your project root:
`env`
VECTOR_DIMENSION=384
MAX_VECTOR_ELEMENTS=10000
`json`
{
"name": "identify_files",
"arguments": {
"query": "typescript configuration",
"search_paths": ["./src", "./config"],
"file_types": [".ts", ".json"],
"recursive": true,
"max_results": 20
}
}
`json`
{
"name": "process_files_to_graph",
"arguments": {
"file_ids": ["file-id-1", "file-id-2"],
"create_chunks": true,
"chunk_size": 1000,
"chunk_overlap": 100
}
}
`json`
{
"name": "generate_file_summary",
"arguments": {
"include_content_analysis": true,
"include_relationships": true,
"include_statistics": true,
"summary_type": "comprehensive"
}
}
`json`
{
"name": "search_file_content",
"arguments": {
"query": "database connection configuration",
"top_k": 10,
"similarity_threshold": 0.7,
"file_types": [".js", ".ts", ".json"]
}
}
The server provides access to several resources:
- files://processed-files - All processed files and metadatagraph://file-graph
- - Knowledge graph representationanalytics://file-analytics
- - Analytics and statistics
`bash`
npm run build
`bash`
npm run dev
`bash``
npm test
The server consists of several key components:
- FileProcessor: Handles file identification, processing, and content analysis
- VectorStore: Manages vector embeddings and similarity search
- GraphRAGMCPServer: Main MCP server implementation with tool handlers
MIT
Contributions are welcome! Please read the contributing guidelines before submitting PRs.
For issues and questions, please use the GitHub issue tracker.