feat(mcp): add admin Plexus management server#565
Conversation
|
| Filename | Overview |
|---|---|
| packages/backend/src/routes/mcp/plexus.ts | New admin-only MCP server wiring all Plexus management tools; per-request server creation correctly addresses the previous singleton concern; in operator used for existence checks admits inherited prototype properties |
| packages/backend/src/routes/mcp/index.ts | Registers plexus MCP routes before the generic /mcp/:name gateway block; ordering is correct — static /mcp/plexus route wins over the dynamic param route |
| packages/backend/src/services/mcp-proxy/mcp-proxy-service.ts | Adds RESERVED_SERVER_NAMES set and gates both getMcpServerConfig and validateServerName on it; straightforward and correct |
| packages/backend/src/routes/management/quota-enforcement.ts | Switches from module-level getConfig() to ConfigService with an explicit flush() before reads; ensures quota status reflects freshly saved keys |
| packages/backend/src/routes/management/config.ts | Delegates server-name validation to the shared validateServerName helper, which now blocks the reserved plexus name; safe mechanical change |
| packages/frontend/src/lib/api.ts | getStats switched from fetching up to 1000 raw records and computing totals client-side to using the pre-computed summary endpoint; cleaner and faster |
| packages/backend/src/routes/mcp/tests/plexus-mcp-routes.test.ts | Good coverage of auth enforcement, tool listing, secret redaction, destructive-op ack, and the reserved-name guard |
| packages/backend/src/routes/management/tests/quota-enforcement.test.ts | Verifies flush-before-read ordering for the quota status endpoint with a targeted integration test |
Reviews (2): Last reviewed commit: "fix(frontend): use usage summary for wee..." | Re-trigger Greptile
## Summary - Update quota enforcement management routes to use ConfigService directly instead of legacy getConfig - Flush ConfigService before quota status and quota clear operations so newly saved keys/quotas are immediately visible - Add a regression test covering immediate quota status lookup after config refresh ## Validation - bun run test src/routes/management/__tests__/quota-enforcement.test.ts - bun run typecheck - bun run format:check - pre-commit hooks passed, including backend changed tests and workspace typecheck
## Summary - Add a plexus-management agent skill for administering Plexus through the management API - Include curl/jq workflows, endpoint reference, safety guidance, and eval prompts - Document admin authentication via PLEXUS_BASE_URL and PLEXUS_ADMIN_KEY ## Validation - pre-commit hooks passed during commit - no dev admin key or password is included in the skill files --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…-management skill
Removed bash script for loading endpoint map and clarified fallback method.
Summary
Verification