Context plugin for Bun
A Bun module created from the bun-module template
This plugin automatically registers an MCP (Model Context Protocol) server named context-mcp with OpenCode. The server provides metadata-first knowledge discovery for .md files in docs/ and .context/.
Recommended workflow:
- Run
search_knowledgeto get ranked candidate notes. - Compare each result's path, title, description, tags, score, and snippet.
- Open the best match with
read_knowledge. - Use the related-note metadata appended to
read_knowledgeoutput to continue exploring linked notes.
Core knowledge tools:
search_knowledge— returns ranked note summaries so agents can choose what to open next without relying on exact full-text matches.read_knowledge— opens a selected note and appends linked-note metadata for relevant[[wikilink]]references.create_knowledge_note/update_knowledge_note— create and maintain knowledge notes once the relevant context is understood.
This plugin supports OMX (OpenCode Managed eXtension). See docs/omx-setup.md for setup instructions.
mise run build- Build the modulemise run test- Run testsmise run lint- Lint codemise run lint:fix- Fix linting issuesmise run format- Format code with Prettier
See the RELEASE.md file for instructions on how to release a new version of the module.
Contributions are welcome! Please file issues or submit pull requests on the GitHub repository.
See the LICENSE file for details.