Skip to main content
Glama
README.md
# Mycelium

Clean-room local MCP context server and incremental documentation generator with git commit-sha freshness stamps.

Mycelium implements the `holon-skills` context contract (`query`, `status`, `fetch`): agents query project documentation cheaply for orientation while always seeing whether the index is fresh or stale relative to `HEAD`, and still read source files straight from disk before editing or testing.

## MCP Tools

- `mycelium_query`: Natural-language BM25 search over all or selected components, returning ranked chunks with source paths and an echoed `stamp`.
- `mycelium_status`: Reports indexed components, chunk counts, indexed paths, and live git commit-sha freshness against `HEAD`.
- `mycelium_fetch`: Reads one indexed document whole by repo-relative path, echoing the `stamp`.
- `mycelium_refresh`: Rebuilds the in-memory index from disk and returns the refreshed status and commit-sha `stamp`.

## CLI Commands

```bash
# Serve as a stdio MCP server (default)
node dist/cli.js serve --root /path/to/repo

# Generate or incrementally update a Mycelium site (manifest-diff)
node dist/cli.js generate --root /path/to/repo --init-config

# Print current index status and freshness JSON
node dist/cli.js status --root /path/to/repo
```

## Quick start

```bash
npm install
npm run build
npm test
```

Run as a stdio MCP server against any repository:

```bash
node dist/cli.js --root /path/to/repo
```

Or register in a project's `.mcp.json`:

```json
{
  "mcpServers": {
    "mycelium": {
      "command": "node",
      "args": ["/path/to/mycelium/dist/cli.js", "--root", "."]
    }
  }
}
```

## Optional `mycelium.json`

Place `mycelium.json` at a target repository's root to declare custom components:

```json
{
  "components": {
    "holon": ["LEXICON.md", "LEXICON-MAP.md", "docs/adr"],
    "docs": ["docs", "README.md"]
  }
}
```

Without `mycelium.json`, Mycelium auto-discovers `holon` (`LEXICON.md`, `LEXICON-MAP.md`, `docs/adr`) and `docs` (`docs`, `README.md`), ignoring `.git`, `node_modules`, and `.scratch`.

## License

MIT

TDQS

A3.7/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct role: status reports index health, query searches content, fetch reads a single document by path, and refresh rebuilds the index. There is no plausible overlap that would cause an agent to pick the wrong tool.

Naming Consistency4/5

All tools share a uniform 'mycelium_' prefix with a single lowercase operation word, which is very predictable. The only minor deviation is 'status' being a noun while the others are verbs, but the pattern remains easily readable.

Tool Count4/5

Four tools is on the lean side but well-matched to a focused documentation index/search server; each tool covers a distinct lifecycle stage (inspect, search, read, rebuild). Nothing feels redundant or missing at this count, though the surface is small.

Completeness4/5

The core lifecycle is covered: status for index health, query for discovery, fetch for retrieval, and refresh for rebuilding. A dedicated tool to enumerate components or list all indexed paths would round it out, but status partially covers this and agents can work around it via query.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues