Repository navigation
feat(mcp): let agents manage AndCode settings and MCP servers - #444
Open
yuga-hashimoto wants to merge 1 commit into
Open
yuga-hashimoto wants to merge 1 commit into
yuga-hashimoto wants to merge 1 commit into
Conversation
yuga-hashimoto
force-pushed
the
feat/agent-settings-mcp
branch
from
November 25, 2026 11:35
96c7ec9 to
5d745ea
Compare
Contributor
|
Debug APK built successfully Download APK artifact Commit: |
This branch has not been deployed
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.
Summary
Adds a built-in
and-code-settingsMCP server provisioned by default for all guest agents (OpenCode, Claude Code, Antigravity) so users can ask any agent to inspect/change AndCode app settings or manage MCP servers across agents.What's included
app/src/main/assets/scripts/andcode-settings-mcp.py, stdlib-only Python):settings_list,settings_get,settings_set,settings_set_many,settings_reset,settings_update_listmcp_servers_list,mcp_server_add,mcp_server_removeAgentSettingsCatalog.kt):model,appearance,chat,sessions,runtime,voice, andsecuritycategories with types, options, ranges, defaults, and coercion.autoAcceptPermissions,guestBrowserAgentControlEnabled,analyticsEnabled) andwakeWordEnabled(requires Android mic permission/service flow) are exposed as read-only (writable: false) with an explanatory reason.ttsOpenAiApiKey,ttsElevenLabsApiKey) are write-only and redacted on read (isSetonly).AgentSettingsBridge.kt, wired inAndCodeApplication.kt):/workspace/.and-code/settings-bridgefile-bridge pattern, foreground/runtimeWork polling gate, atomic writes, and 95s request expiry asScheduleBridge.AppPreferencesRepositoryso UI flows update live.settings_set_manyvalidates all entries before applying any.AgentMcpConfig.kt):opencode.json), Claude Code (.claude.json), and Antigravity (mcp_config.json) across all guest rootfs directories with each agent's expected schema.and-code-*servers from replacement/removal, pre-validates target JSON files to avoid partial writes, and never echoes env values or headers.LocalRuntimeInstaller.kt):andcode-settings-mcp.pyinto/usr/local/binand registersand-code-settingsfor fresh and existing installs; deduplicates built-in MCP provisioning helper.AgentSettingsCatalogTest,AgentSettingsBridgeTest, andAgentMcpConfigTest(32 tests).docs/LOCAL_RUNTIME.mdandREADME.md.Pre-PR Review Report
repo-reviewer(researchsubagent)REQUEST_CHANGES(2 blocking findings inAgentMcpConfig:command = []/[""]combined withurl, and missingagentsvalidation inremove).AgentMcpConfig.add, trimmedremoveentries inAgentSettingsBridge.updateList, wrapped line 154 inandcode-settings-mcp.py, and added unit test coverage for all cases.APPROVEVerification
ktlint(1.2.1 with repo.editorconfig): passdetekt(1.23.6 with repodetekt.ymlon all new files): 0 issuesAgentSettingsCatalogTest,AgentSettingsBridgeTest,AgentMcpConfigTest): 32/32 passinitialize,tools/list,tools/callacross settings/MCP/error paths): pass