feat(mcp-server): add listWorkflows tool (PRD-736)#1771
Merged
christophebrun-forest merged 2 commits intoJul 24, 2026
Conversation
Expose MCP-enabled workflows to LLM clients via a new listWorkflows tool, calling the Forest server MS3 endpoint (GET /api/workflow-orchestrator/workflows) over the HTTP contract with the caller's forestServerToken + renderingId. - forestadmin-client: WorkflowsService + ForestHttpApi.listMcpEnabledWorkflows - mcp-server: listWorkflows tool, http-client wiring, shared getAuthContext util Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7 new issues
|
Reconcile with main and fix the listWorkflows integration break. - Migrate the listWorkflows tool to main's new ToolContext signature (declareXxxTool(mcpServer, ctx)) — resolves the server.ts conflict. - Wire WorkflowsService into forestadmin-client: expose forestAdminClient.workflowsService (build-application-services, ForestAdminClientWithCache, ForestAdminClient interface). - Fix agent.ts to pass workflowsService to ForestServerClientImpl before forestServerUrl — the new constructor param was inserted mid-signature, which broke the direct instantiation in the agent (TS2554) and would have bound the URL to workflowsService at runtime. - Update ForestAdminClient mocks/factories accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
christophebrun-forest
changed the base branch from
feature/prd-49-expose-workflow-tools-in-forest-mcp-server
to
main
July 24, 2026 10:19
christophebrun-forest
changed the base branch from
main
to
feature/prd-49-expose-workflow-tools-in-forest-mcp-server
July 24, 2026 12:00
christophebrun-forest
merged commit Jul 24, 2026
6922326
into
feature/prd-49-expose-workflow-tools-in-forest-mcp-server
36 of 37 checks passed
christophebrun-forest
deleted the
feature/prd-736-mcp-ms4-listworkflows-tool
branch
July 24, 2026 12:51
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.

MS4 of PRD-49 —
listWorkflowsMCP toolExposes MCP-enabled workflows to LLM clients through a new
listWorkflowstool in@forestadmin/mcp-server, so a client can discover workflows in its context before triggering one.fixes PRD-736
What it does
listWorkflowswith args{ collectionName?: string }, registered like the existinglist/update/executeActiontools (registerToolWithLogging, read-only).GET /api/workflow-orchestrator/workflowsover the HTTP contract — BearerforestServerToken+forest-rendering-idheader + optionalcollectionNamequery. No private-api import.extra.authInfo.extra(forestServerToken+renderingId).[{ workflowId, name, collectionName }]. Errors (403/404/…) map to MCP tool errors via the typed errors ofServerUtils+registerToolWithLogging.Implementation
forestadmin-client
WorkflowsService+ForestHttpApi.listMcpEnabledWorkflows(transport, viaServerUtils.queryWithBearerToken)McpWorkflow,ListMcpWorkflowsParams,WorkflowsServiceInterfacemcp-server
listWorkflowstool + http-client wiring (WorkflowsService)getAuthContextutil (reused by activity-logs-creator)ToolName,allTools,allToolNames,SAFE_ARGUMENTS_FOR_LOGGINGNotes
descriptionis intentionally not returned — deferred to a separate product ticket (excluded from MS3 on purpose).withActivityLogon this read-only discovery tool.Tests
list-workflowstool tests)🤖 Generated with Claude Code
Note
Add
listWorkflowsMCP tool and in-process agent dispatcher to MCP serverlistWorkflowsMCP tool inlist-workflows.tsthat callsforestServerClient.listMcpWorkflowswith optionalcollectionNamefiltering, returning MCP-enabled workflows as JSON.InProcessDispatcher) that routes MCP tool requests directly to the agent's Koa stack vialight-my-request, bypassing the network while still running JWT auth and permission checks.ToolContextobject (withforestServerClient,logger,collectionNames, and optionalagentDispatcher) and passagentDispatcherthrough tobuildClient/buildClientWithActions.WorkflowsServicetoForestAdminClientand wires it through the MCP server's HTTP client solistMcpWorkflowsis available server-side.getActionFormtool responses to include per-fielddescriptionandallowedValues(normalized to{value, label}) for multiple-choice widgets.agentUrl(or the in-process stack) instead of the publicapi_endpoint.Macroscope summarized 8a9449b.