Repository navigation
Closed
Description
Context
Some instance settings exist in the Web UI (Settings) but are neither readable nor editable through MCP. The reported example: an agent asked to "add a bot to the whitelist" could not find the whitelisted/exempt bots list anywhere. Related trigger-access settings are also UI/CLI-only today:
github_user_whitelist(settings key, alsoGITHUB_USER_WHITELISTenv; seepackages/cli/src/api/settings.ts),GITHUB_USER_BLACKLIST(env; seedocs/docs/features/pr-commands.md"Who Can Trigger Commands"),- the whitelisted/exempt bots list edited in the Settings UI. Bot accounts are ignored by default (
[bot]suffix or typeBot); perpackages/shared/src/userWhitelist.ts, bots must be listed explicitly (name[bot]) to be allowed.
Existing MCP configuration tools live in packages/api/mcp/toolsConfiguration.ts and packages/api/mcp/toolsManagement.ts (get_execution_settings / update_execution_settings).
Requirements
- Locate the bot list setting before coding: search
propr-ui/src(Settings page components) for "bot" and follow the save call to its backend key inpackages/api/routes/configSettings.ts/configRoutesSettings.ts(extractSettingSaves). Record the exact key in a single constantBOT_ALLOWLIST_SETTINGin the new module. If the UI actually writes it intogithub_user_whitelist(asname[bot]entries), model bots as the[bot]-suffixed subset of that list instead of a separate key — the tool contract below stays the same. - New tools (permission
instance.manage_settings, scopemanage):get_trigger_access_configuration→{ revision, users: { allowlist: string[], blocklist: string[], source: { allowlist: 'settings'|'environment'|'both', blocklist: 'environment' } }, bots: { allowlist: string[], source }, notes }. Environment-sourced values are reported read-only (editable: false) with the env variable name.update_trigger_access_configuration→ mutation withexpectedRevisionand explicit operations:{ addUsers?, removeUsers?, addBots?, removeBots? }(arrays of GitHub logins, validated^[A-Za-z0-9-]{1,39}(\[bot\])?$, bots normalised toname[bot]). Replace-all is deliberately not offered (avoids accidentally locking everyone out). Removing the last allowlisted user when the allowlist is non-empty requiresconfirmOpenAccess: truebecause an empty allowlist means "everyone" (perisGithubUserWhitelisted).- Refuse to edit values that are environment-controlled with
SETTING_ENVIRONMENT_MANAGED(409, precondition) and a message naming the variable.
- Persistence goes through the existing settings route handler (
config.postSettingsviacallWorkflow) so validation, Redis lock, revision checks, events and activity logging are identical to the UI. - Audit: produce the table of instance and repository settings with columns setting, UI location, MCP read, MCP write, CLI, env, status (
covered/added in this issue/intentionally browser-onlywith reason) indocs/mcp-coverage.mdunder a new heading "Settings reachability". Source the list by readingSystemSettingsinpackages/cli/src/api/settings.ts,extractSettingSavesinconfigSettings.ts, repository options inconfigRepoValidation.ts, and the Settings UI sections. Add MCP read/update for any safe setting found missing (non-secret, not credential paths) — at minimum the trigger access settings; list the rest with justification. - The audit data is also encoded in
packages/api/mcp/settingsCatalog.ts(created in the next issue); keep the table and catalog in sync (next issue adds a test).
Implementation Specification
- New
packages/api/mcp/toolsTriggerAccess.ts; register increateToolCatalog(or fromaddConfigurationTools). - Reuse
configRevisionfrompackages/api/routes/configRevision.tsforexpectedRevision. - Edit
docs/mcp-coverage.md(audit table) anddocs/docs/features/pr-commands.md("Who Can Trigger Commands" → mention the MCP tools and the bot list). - Tests
packages/api/test/mcpTriggerAccess.test.ts.
Acceptance Criteria
-
get_trigger_access_configurationshows the bot list exactly as the Settings UI shows it. -
update_trigger_access_configuration({ addBots: ['renovate'] })persistsrenovate[bot], and the UI shows it after reload; the daemon/worker filter then accepts comments fromrenovate[bot]. - A stale
expectedRevisionfails withSTALE_REVISION; a concurrent UI save is not overwritten. - Without
instance.manage_settingsboth tools are hidden fromtools/listand denied on call. - Removing the last allowlisted user without
confirmOpenAccessfails withCONFIRMATION_REQUIRED. - The audit table is present and every row with MCP read = "yes" names an existing tool.
Created by ProPR AI Planner
Activity
propr-dev commentedon Sep 28, 2026
Suggested Implementation:
Implementation Approach
We add a purpose-named tool pair for trigger access instead of adding the keys to the generic
update_execution_settings. Access control lists are security-sensitive; explicit add/remove operations with an open-access confirmation are much safer for an agent than replacing a whole list, and a dedicated name makes the capability discoverable ("add a bot to the whitelist" maps directly toupdate_trigger_access_configuration). Persistence still goes through the existing settings workflow so the UI, CLI and MCP share validation, locking and events.File:
packages/api/mcp/toolsTriggerAccess.ts(new file)Why this file: Keeps the security-sensitive access-list logic isolated and reviewable.
Wire it in
toolsConfiguration.ts(it already receivesconfig):File:
docs/mcp-coverage.mdWhy this file: The authoritative capability matrix; the audit belongs here so operators and the docs tool can answer "where is setting X?".
File:
packages/api/test/mcpTriggerAccess.test.ts(new file)Why this file: Proves revision safety, bot normalisation, permission gating and the open-access guard.
propr-dev commentedon Sep 30, 2026
🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
codexgpt-5.6-sol2607/gpt-5.6-sol-mcp-configuration-coverag-20260930-0107-qha2593-epic-mcp-observability-cf6issue-2607-20260930-0107-gpt-5.6-sol-qha🔍 Track Task Execution
fix(ai): Resolve issue #2607 - MCP configuration coverage: expose tri…
fix(ai): Resolve issue #2607 - MCP configuration coverage: expose tri…