What problem does it solve?
Comprehensive lifecycle for authoring, registering, documenting, and maintaining MCP tools in packages/myco/src/mcp/ — covering schema definition in TOOL_DEFINITIONS arrays, handler implementation with DaemonClient usage, switch-based registration in server.ts, documentation bundling, anti-drift testing patterns, and cloud vs local placement decisions. Essential for maintaining the schema ↔ handler ↔ documentation triad that agents depend on for correct tool invocations, even when the user doesn't explicitly ask for MCP tool development.
Core Features & Use Cases
- Schema and tool-definition management across local MCP surfaces, including tooling constants and cortex/config metadata.
- Handler implementation patterns using DaemonClient, strict parameter consumption, and deterministic I/O.
- Local vs Collective registration and conditional enablement, with tests to verify surface behavior.
- Documentation bundling at build time to ensure agent-visible docs stay in sync with code.
- Anti-drift testing patterns to validate alignment between schema, handlers, and docs.
- Lifecycle discipline for cloud vs local placement decisions to prevent unintended data exposure.
Quick Start
Follow the lifecycle procedures to implement a new MCP tool by editing tool-definitions.ts, creating a handler, registering the tool, and bundling documentation, then run npm run build.