Repository navigation
Conversation
The mcp feature was opt-in, so 'cargo check/clippy/test --workspace' with default features never compiled the mcp paths — and they had rotted: a moved-value borrow error in register_server_tools, an unused PathBuf import, two deprecated rmcp::model::ClientInfo uses (now ClientConfig per rmcp 3.3), and mcp_tests.rs calling risk() without the Tool trait in scope. All fixed; no behavior change.
When the cora binary is on PATH, tole now attaches the local 'cora mcp' server automatically: the full code-intel surface (brain search, callers, impact, affected tests, dead-code, review — 18 tools, registry names mcp_cora_*) registers with no manual flag, matching the ecosystem goal that sibling tools are usable out of the box. - tole-cli default features now include the mcp client (default = ["shell-tools", "mcp"]); embedder profiles are unaffected (tole-core defaults do not change). - --no-auto-mcp global flag skips the presets per run; an explicit --mcp-server cora=... spec replaces the preset for that name (explicit wins over auto in the pure, unit-tested merge_mcp_specs). - cora_search now follows the same startup-probing contract as the uteke tools: a missing cora binary degrades to a one-line warning instead of a phantom tool, and the native single-tool fallback is skipped when the cora MCP surface is attached (no duplicate search tools). - Trust model untouched: MCP tools stay Risk::Write with the approval gate on every call; server metadata is never trusted. Live E2E (release binary): auto-preset registers 18 tools in ~23ms; --no-auto-mcp attaches nothing; explicit --mcp-server cora=... yields exactly one registration (no duplicate).
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When the
corabinary is on PATH, tole attaches the localcora mcpserver automatically: the full code-intel surface (brain search, callers, impact, affected tests, dead-code, review — 18 tools, registry namesmcp_cora_*) registers with zero configuration. Includes themcpfeature becoming a CLI default and fixes for mcp-gated code that default-feature CI never compiled.Stacked on #79 (docs) — GitHub retargets this to develop when that merges.
Why
The ecosystem goal is that sibling tools are usable out of the box. Today
cora_searchgives one search tool; cora's real surface (18 tools) required a manual--mcp-serverflag and an opt-in cargo feature nobody passes. Probing-first registration already exists for uteke — this extends the same contract to cora's MCP server.Changes
auto_mcp_specsprobescoraand returns thecora=cora mcppreset;merge_mcp_specs(pure, unit-tested) merges explicit flags over presets — explicit same-name wins, malformed specs tolerated--no-auto-mcpglobal flag to opt out per runtole-clidefault features now["shell-tools", "mcp"]— embedders unaffected (tole-coredefaults unchanged)cora_searchfollows the startup-probing contract: missing binary → one-line warning; skipped when the cora MCP surface is attached (no duplicate search tools)register_server_tools, unused import, deprecatedClientInfo→ClientConfig, missing trait import inmcp_tests.rs) — all green now under--workspacesince defaults compile the mcp pathRisk::Write, approval gate every callTesting
--no-auto-mcpattaches nothing; explicit--mcp-server cora=...yields exactly one registration