fix: explicitly disable MCP servers in btca agent config #107
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.
Summary
btca's internal OpenCode agent was inheriting MCP servers from the user's global
~/.config/opencode/opencode.jsonc, causing it to use external tools (perplexity, serena, etc.) instead of only searching the local cloned repo.Problem
When running
btca ask -r <resource> -q "...", the agent would call MCP tools like:perplexity_searchperplexity_reasonserena_get_current_configThis happened despite
tools: { mcp: false }being set in the agent config, because MCP servers were still loaded from the global config.Solution
Added
mcp: {}at the top level of the OpenCode config to explicitly prevent any MCP servers from loading. Now btca only uses the intended tools:grep,glob,list, andread.Testing
After this fix,
btca askonly searches the local cloned repo without calling external MCP tools.Greptile Overview
Greptile Summary
This PR re-applies a fix that was lost during a refactoring. When the CLI services were reorganized (commit 5c1ea54), the
mcp: {}configuration that prevented external MCP servers from loading was removed. This causedbtca askto inherit MCP servers from the user's global~/.config/opencode/opencode.jsonc, calling external tools likeperplexity_searchandserena_get_current_configinstead of only using local file tools.Changes:
mcp: {}to the OpenCode config inapps/server/src/agent/service.ts:125to explicitly disable all MCP serversapps/cli/bin.jsThe fix ensures btca's internal agent only uses the intended local tools (
grep,glob,list,read) and doesn't make external API calls when searching collections.Confidence Score: 5/5
mcp: {}) that explicitly disables MCP servers, which is the intended behavior. The fix re-applies a previous solution that was accidentally removed during refactoring. The change doesn't affect existing functionality - it only prevents unwanted external tool calls.Important Files Changed
mcp: {}to OpenCode config to prevent loading external MCP servers