Lux is a tool for managing a knowledge repository (.md files) and providing it to AI agents via the Model Context Protocol (MCP). This project features the ability to index and search highly structured knowledge data.
.
├── cmd/
│ ├── indexer/ # Tool to read Markdown files and generate a search index (Bleve)
│ └── lux/ # Entry point for running the MCP server
├── knowledge/ # Markdown-based knowledge repository (Raw data)
├── pkg/
│ ├── knowledge/ # Knowledge data modeling and Bleve search engine logic
│ ├── lux/ # Lux application framework core
│ └── mcp/ # MCP server implementation and Tool definitions
├── Taskfile.yml # Build and task automation configuration
└── go.mod # Go module dependency definition
- Knowledge Indexing: Analyzes Markdown files in the
knowledge/directory to create apkg/knowledge/data.bleveindex. - MCP Server: Provides a standard MCP interface so AI agents (e.g., Claude Desktop) can search and retrieve knowledge.
- Knowledge Search (Tools):
search_knowledge: Searches for a list of knowledge items based on tag matching.get_knowledge_content: Retrieves the detailed content of a specific knowledge item by its ID.get_godoc: Retrieves Go documentation for a specific package, type, or function usinggo doc.
- Embedded Index: The generated search index is embedded into the binary for easy distribution and deployment.
- Go 1.25 or higher
- Go Task (Optional, if using
Taskfile.yml)
-
Install dependencies and generate the index:
go tool task index
-
Build the binary:
go tool task build
or install binary via go install to
$GOPATH/bin/lux:go tool task install
Run the MCP server using the Stdio transport:
./lux.exeThis project includes various guides for development. Refer to these when adding new modules or extending functionality:
- Project Structure: Project layering and architectural principles.
- Entry Point Guide: Guide for the
cmdlayer and using Fx. - Module Generation Guide: Guide for creating Fx modules and managing environment variables.
This project is licensed under the MIT License.