feat: Configurable MCP Server URL in Admin Settings (#76)#161
feat: Configurable MCP Server URL in Admin Settings (#76)#161AndriiPasternak31 wants to merge 8 commits intoAbilityai:mainfrom
Conversation
The MCP server URL on the API Keys page was hardcoded to
http://{hostname}:8080/mcp, which is wrong for production deployments
proxied through nginx. Admins can now override it via Settings.
- Backend: GET/PUT/DELETE /api/settings/mcp-url (GET: any auth user,
PUT/DELETE: admin-only, URL validation for http(s):// + /mcp suffix)
- Settings.vue: MCP URL config section with custom/auto-detect badge
- ApiKeys.vue: Fetches configured URL on mount, falls back to auto-detect
- Tests: 9 new tests in TestMcpUrlSettings class
Closes Abilityai#76
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…axios - Move urlparse import to module level (PEP 8) - Extract _submitMcpUrl helper to eliminate save/reset duplication - Use dynamic success message (save vs reset) - Parallelize independent API calls in Settings.vue and ApiKeys.vue - Switch fetchMcpUrl to axios for consistency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- platform-settings.md: added MCP URL endpoints, Settings.vue section, user story - api-keys-page.md: updated onMounted flow with fetchMcpUrl + Promise.all - feature-flows.md: added recent update entry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vybe
left a comment
There was a problem hiding this comment.
This PR requires the following changes before merge:
- Add requirement entry to
docs/memory/requirements.md(e.g., under section 5 Platform Settings or section 7 MCP Integration) - Add
GET/PUT/DELETE /api/settings/mcp-urlendpoints todocs/memory/architecture.mdsettings API table
Code and tests look good — just need the documentation updates per Trinity methodology (new feature = changelog + requirements + architecture).
Resolve merge conflicts in changelog.md and feature-flows.md — both our Abilityai#76 MCP URL config entries and upstream entries (Abilityai#74, Abilityai#100, Abilityai#128, Abilityai#19) are preserved in chronological order. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add requirement entry (7.4 MCP-URL-001) and Platform Settings API table per PR review feedback — completing Trinity methodology docs (changelog + requirements + architecture). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolved conflict in docs/memory/feature-flows.md — both Abilityai#76 (MCP URL config) and Abilityai#148 (subscription encryption key fix) added entries to the same Recent Updates table on the same date. Kept both entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolved 4 merge conflicts caused by upstream security fixes (Abilityai#174, Abilityai#175, Abilityai#176, Abilityai#172), agent event subscriptions (Abilityai#169), and Slack transport management (SLACK-002) landing on main while this branch had the MCP URL config feature (Abilityai#76): - changelog.md: Kept both — upstream entries (newer dates) above our Abilityai#76 entry - feature-flows.md: Added both EVT-001 and Abilityai#76 rows in date order - settings.py: Merged imports (added Optional from upstream + urlparse from ours) - Settings.vue: Combined all parallel loads (added loadSlackTransportStatus from upstream to existing Promise.all) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vybe
left a comment
There was a problem hiding this comment.
PR Validation: APPROVED (with rebase required)
Code review passed — the implementation is clean, well-tested, and fully documented. However, the branch has 101 merge conflicts with main due to fork divergence and can't be merged in its current state.
Required before merge
- Rebase onto current
mainto resolve conflicts
How to rebase
git remote add upstream https://github.com/abilityai/trinity.git
git fetch upstream
git rebase upstream/main
# Resolve any conflicts, then:
git push --force-with-leaseThe actual feature changes (settings.py, ApiKeys.vue, Settings.vue, test_settings.py) are small and focused — most conflicts will be in files your branch didn't touch, so accepting the upstream version (git checkout --theirs <file>) should work for those.
Once rebased, this is ready to merge. The code, tests, docs, and security all look good.
Summary
/mcpChanges
src/backend/routers/settings.py— GET/PUT/DELETE/api/settings/mcp-urlendpointssrc/frontend/src/views/Settings.vue— MCP URL config section with badge, save/resetsrc/frontend/src/views/ApiKeys.vue— Fetch configured URL on mounttests/test_settings.py— 9 new tests (TestMcpUrlSettings)docs/memory/changelog.md— Change entrydocs/memory/feature-flows/— Updated platform-settings.md and api-keys-page.mdTest Plan
pytest tests/test_settings.py::TestMcpUrlSettings -vpytest tests/test_settings.py -vCloses #76
Generated with Claude Code