By csharp-compound-engineering
GraphRAG-powered knowledge base for project documentation. Provides intelligent document retrieval via a single rag_query MCP tool backed by Neptune, OpenSearch, and Bedrock.
Research best practices for technologies and patterns. Use when the user needs authoritative guidance on implementation approaches, official recommendations, or industry best practices.
Find API documentation, code examples, and framework-specific guidance. Use when the user needs detailed API references, migration guides, or framework configuration help.
Analyze git history to find patterns, related changes, and identify subject matter experts. Use when the user needs to understand code evolution, find related commits, or identify who knows about specific areas.
Analyze repository structure, identify patterns, and map codebase architecture. Use when the user needs to understand code organization, find implementations, or analyze dependencies.
Show help for the CompoundDocs knowledge base system. Use when the user asks about available cdocs commands or how to use the knowledge base.
Query the project knowledge base for documentation, patterns, and technical information. Use when the user asks about project architecture, conventions, documented decisions, or needs factual information from the knowledge base.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin (cd) that implements a GraphRAG knowledge base for C#/.NET documentation. It bundles an HTTP-based MCP server backed by graph traversal (Amazon Neptune), vector search (AWS OpenSearch Serverless), and LLM synthesis (Amazon Bedrock) to provide semantic Q&A over documentation with source attribution.
The plugin exposes a single MCP tool, rag_query, that orchestrates a multi-stage retrieval pipeline:
Query → Embedding Generation → KNN Vector Search → Graph Traversal → LLM Synthesis → Answer + Sources
# Build
dotnet build
# Run the MCP server
dotnet run --project src/CompoundDocs.McpServer/CompoundDocs.McpServer.csproj
# Run all tests
dotnet test
src/
├── CompoundDocs.McpServer # MCP server app (HTTP transport), RagQueryTool, processing pipeline, resilience
├── CompoundDocs.Common # Shared models, graph relationships, config loading, logging
├── CompoundDocs.GraphRag # RAG pipeline orchestration (IGraphRagPipeline)
├── CompoundDocs.Vector # IVectorStore — AWS OpenSearch Serverless KNN search
├── CompoundDocs.Graph # IGraphRepository — Amazon Neptune (openCypher)
├── CompoundDocs.Bedrock # IBedrockEmbeddingService + IBedrockLlmService
├── CompoundDocs.GitSync # Git repository monitoring via LibGit2Sharp
└── CompoundDocs.Worker # Background document processing service
tests/
├── CompoundDocs.Tests.Unit # xUnit + Moq + Shouldly
├── CompoundDocs.Tests.Integration # Service integration tests
└── CompoundDocs.Tests.E2E # End-to-end workflow and MCP protocol compliance tests
rag_queryPerforms RAG-based question answering with source attribution.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | (required) | The question to answer |
maxResults | int | 5 | Max source documents to use (1–20) |
Response:
{
"success": true,
"data": {
"query": "How does dependency injection work?",
"answer": "...",
"sources": [
{
"documentId": "...",
"chunkId": "...",
"filePath": "docs/dependency-injection.md",
"relevanceScore": 0.95
}
],
"relatedConcepts": ["service lifetime", "constructor injection"],
"confidenceScore": 0.87
}
}
Configuration is loaded from multiple sources (highest priority wins):
CompoundDocsServerOptions provides sensible defaults~/.claude/.csharp-compounding-docs/global-config.json.csharp-compounding-docs/config.json (per-repository)Config loading is handled by ConfigurationLoader in CompoundDocs.Common.
| Section | Description |
|---|---|
Authentication | API key auth — keys (comma-separated), header name, enabled flag |
EmbeddingCache | In-memory cache — max items (10,000), TTL (24h), optional disk persistence |
Resilience | Polly policies — retry, circuit breaker, timeout settings |
Chunking | Document chunking — chunk size (1000), overlap (200), paragraph boundaries |
| Variable | Description |
|---|---|
ASPNETCORE_ENVIRONMENT | Runtime environment (Production, Development) |
COMPOUNDDOCS_LOG_LEVEL | Log level (set in the Dockerfile) |
COMPOUNDDOCS_API_KEYS | API keys (used in the Helm chart deployment template) |
The server uses API key authentication by default. Keys are validated from the X-API-Key header or Authorization: Bearer header.
{
"Authentication": {
"Enabled": true,
"HeaderName": "X-API-Key",
"ApiKeys": "key1,key2,key3"
}
}
Set Enabled to false to disable authentication for local development. The /health endpoint is always anonymous.
# Pull pre-built image from GHCR
docker pull ghcr.io/csharp-compound-engineering/csharp-compound-engineering/mcp-server:latest
# Or build locally
docker build -t compound-docs-mcp .
npx claudepluginhub csharp-compound-engineering/csharp-compound-engineering --plugin cdDocument search with hybrid BM25/semantic retrieval, GraphRAG knowledge graphs, and pluggable providers for Claude Code. Index documentation and code, then search using keyword matching, semantic similarity, graph relationships, or comprehensive multi-mode fusion.
Local-first memory server — hybrid BM25+vector search, vault management, lint, and launchd lifecycle for project knowledge.
Zero-config knowledge base MCP server — search, manage, and embed documentation (SQLite default, PostgreSQL optional)
Optimized file search, semantic indexing, and persistent memory for Claude Code — with optional sync to a self-hosted web dashboard
Full AI context layer over MCP — tree-sitter code-map, document RAG (PDF/Office/HTML/email + OCR + reranker), shared agent memory, on-demand web crawl, git history + blame + per-symbol diff. 300+ languages, 8 coding-agent harnesses, content-addressed Fjall + LanceDB.
AI-powered knowledge base management - Capture conversation learnings, maintain topic-specific KB files, Obsidian-compatible knowledge graph, structured dynamic context loading, and institutional knowledge in CLAUDE.md