Skip to content

Repoint MCP tools and UI project calls to core #1312

Description

@geoffjay

Summary

Update MCP project debug tools and UI project service calls to target the core service instead of orchestrator for project CRUD operations.

Context

Part of Phase 4 of #1305 (Migrate projects entity from orchestrator into core). Child of #1307. Companion to #1311 (Rust client/CLI repointing). These two issues are parallel - no shared file conflicts.

Blocked By

Acceptance Criteria

MCP tools (crates/mcp/src/tools/orchestrator_debug.rs)

  • `run_list_projects` (line ~304): change URL construction from orchestrator base to core base URL
  • `run_get_project` (line ~340): change URL construction from orchestrator base to core base URL
  • Update the `Project` struct (line ~77) to match core's response shape (no `agent_count`/`workflow_count`)
  • Update the `ProjectDetail` struct (line ~86) - either drop count fields or fetch them separately from orchestrator
  • Ensure the MCP server has access to the core service URL (check `AgentdClient` configuration)

UI service (ui/src/services/orchestrator.ts)

  • Move `listProjects` method (line ~323) to use the core service base URL instead of the orchestrator URL
  • Either add a `core.ts` service client or add the core base URL to the existing service configuration
  • Verify the core service URL is available via `/config.json` runtime configuration (check `ui/public/config.json` and the config loading mechanism)

UI types

  • Check `ui/src/types/orchestrator.ts` for project type definitions - update if the response shape changes (no count fields)
  • If types move to a `core.ts` types file, re-export from the original location to avoid breaking imports

UI components (ui/src/components/knowledge/ProjectPicker.tsx)

  • Verify ProjectPicker continues to work with the updated service call
  • The component calls `orchestratorClient.listProjects({ limit: 200 })` - update to use the new client/method

Reference Files

  • MCP tools: `crates/mcp/src/tools/orchestrator_debug.rs:77-86, 304-355`
  • UI service: `ui/src/services/orchestrator.ts:323-328`
  • UI config: `ui/src/services/config.ts` or similar (runtime config loading)
  • UI component: `ui/src/components/knowledge/ProjectPicker.tsx`

Stack Base

Stack on: `feature/projects-to-core`
Parallel with: #1311 (no shared file conflicts)
Blocked by: #1310

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:smallSmall scope: <50 lines, single filerefactorCode improvement without changing behavioruiUser interface and frontend

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions