Mycelium (mctl) is a Go CLI tool and MCP server that gives AI coding agents reproducible, version-pinned dependency context. It reads a project manifest (mycelium.toml), resolves dependencies against a lockfile (mycelium.lock), and maintains a local vector store of indexed documentation and source code. An MCP server exposes semantic search over that store.
- GitHub:
github.com/johnlanda/mycelium - Go module:
github.com/johnlanda/mycelium - License: TBD
- CLI binary:
mctl
mycelium/
├── cmd/ # CLI command implementations
│ ├── init.go
│ ├── add.go
│ ├── up.go
│ ├── upgrade.go
│ ├── publish.go
│ ├── status.go
│ └── serve.go # MCP server entry point
├── internal/
│ ├── manifest/ # mycelium.toml parsing and validation
│ ├── lockfile/ # mycelium.lock read/write
│ ├── store/ # Vector store abstraction (LanceDB embedded)
│ ├── fetchers/ # Source fetchers (github, artifact)
│ ├── chunker/ # Chunking strategies (markdown, code/tree-sitter)
│ ├── embedder/ # Embedding provider abstraction
│ └── hasher/ # content_hash and store_key computation
├── mycelium.toml # Project manifest (committed)
├── mycelium.lock # Lockfile (committed, never hand-edited)
└── go.mod
CLI commands orchestrate a pipeline: fetchers clone/download sources, chunkers split content into semantic units (heading-aware for Markdown, AST-aware via tree-sitter for code), embedders produce vectors, and the store persists them keyed by content-addressed store_key. The MCP server exposes search, search_code, and list_sources tools over the local store via stdio.
- PRD:
mycelium-prd.md— source of truth for all requirements - Project Board: https://github.com/users/johnlanda/projects/3/views/1
Every implementation task MUST have a GitHub issue on the project board. Use /kanban to manage the board:
/kanban— check the board before starting work/kanban create "Title" P1 M— create an issue for new work/kanban move #N in progress— claim the issue- Work on the task
/kanban move #N done— close when finished
Do not start implementation work without a tracked issue.
- Language: Go (latest stable)
- Build target: Single binary (
mctl) - Module path:
github.com/johnlanda/mycelium - Test command:
go test ./... - Formatting:
gofmt(standard) - Linting:
go vet ./... - Error handling: Return errors, don't panic. Wrap with
fmt.Errorf("context: %w", err). - Naming: Follow Go conventions — exported names are PascalCase, unexported are camelCase.
- Packages: Keep packages focused.
internal/for non-exported packages. - Tests: Table-driven tests preferred. Test files live alongside source (
foo_test.go).
# One-time setup: download LanceDB native libraries
make setup-lancedb
# Build
make build
# Test
make test
# Vet
make vet
# Tidy modules
make tidy