Skip to content

Conversation

@betterclever
Copy link
Contributor

Summary

  • MCP Gateway API: Implemented a new /mcp API with GET /tools and POST /tools/call endpoints.
  • Internal Translation: The gateway translates Model Context Protocol (MCP) JSON-RPC requests into internal component registry and credential store calls.
  • Dynamic Tool Listing: Tools are dynamically retrieved from the Tool Registry (ENG-96), filtering for tools registered during a specific workflow run.
  • Tool Execution: Implemented direct component execution within the gateway service (MVP approach) to allow agents to invoke platform tools.

Stacked on: #212 (ENG-97)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a188c2285

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 88 to 90
const result = await component.execute(
{ inputs: mergedInputs as any, params: {} as any },
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Parse tool inputs/params before executing components

The MCP gateway calls component.execute with inputs: mergedInputs and params: {} directly, which bypasses the component’s Zod parsing/defaults and drops any workflow node parameters. That means tool calls will silently ignore required params or coercions (e.g., ports, endpoints, defaults), causing components to misbehave or throw at runtime. Consider fetching the node config for the run and running component.inputs.parse / component.parameters.parse before invoking execute.

Useful? React with 👍 / 👎.

Comment on lines 69 to 73
async execute() {
// The Docker runner handles execution.
// At runtime, the workflow engine will resolve the dynamic endpoint.
return {
endpoint: 'http://localhost:8080', // Placeholder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Actually run docker runner in MCP server component

The new core.mcp.server component’s execute only returns a hardcoded endpoint and never calls runComponentWithRunner. In this codebase, docker components are executed only when the component itself invokes the runner (the activity doesn’t auto-run it), so this component will never start the MCP server container and will always return the placeholder URL.

Useful? React with 👍 / 👎.

@betterclever betterclever force-pushed the eng-98/mcp-gateway branch 2 times, most recently from fc4c1eb to 9ed839a Compare January 19, 2026 13:14
@betterclever betterclever changed the base branch from main to eng-97/workflow-tool-mode January 20, 2026 15:04
@betterclever betterclever force-pushed the eng-98/mcp-gateway branch 2 times, most recently from b32f6c6 to f5e332d Compare January 21, 2026 18:07
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
… MCP proxying

- Replace deprecated SSEClientTransport with StreamableHTTPClientTransport
- Fix lint errors (trailing whitespace in constructor and emitProgress)
- Gateway currently executes components inline (to be refactored to Temporal)

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Add executeToolCallSignal and toolCallCompletedSignal for MCP tool calls
- Add getToolCallResult query for polling tool execution results
- Refactor callComponentTool to signal workflow instead of inline execution
- Add queryWorkflow method to TemporalService
- Tool calls now execute on worker with full Docker/secrets/storage support

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
…ation

- Refactor component tool execution to run on Temporal workers via signals/queries
- Implement validation for workflow run access and organization ownership
- Add comprehensive telemetry: log tool execution (STARTED, COMPLETED, FAILED) to trace repository
- implement robust external MCP proxying with 30s timeouts and exponential backoff retries
- Add support for tool filtering via allowedTools header
- Add E2E test for MCP gateway tool discovery and execution

Signed-off-by: Antigravity <antigravity@google.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
- Extract X-Run-Id and X-Allowed-Tools headers in McpGatewayController
- Pass organizationId and allowedTools to McpGatewayService
- Add basic protocol version validation
- Fix type casting for MCP transport request handling

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
…eway

- Add McpAuthService to manage short-lived, run-bounded session tokens
- Implement McpAuthGuard for RFC 6750 (Bearer) compliance and AuthInfo injection
- Refactor McpGatewayController to use native MCP AuthInfo instead of internal AuthContext
- Add internal endpoint /internal/mcp/generate-token for session token issuance
- Update E2E tests to validate the complete secure handshake and tool execution flow
- Fix type safety issues in MCP transport integration

Signed-off-by: Antigravity <antigravity@google.com>
Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
…script harness

- Ensure component 'parameters' are passed through tool registration and execution signals
- Correctly map agent 'arguments' to component 'inputs' in runComponentActivity
- Fix race condition in logic-script harness by ensuring output directory exists before write
- Update E2E gateway test to reflect correct registration and execution pattern
- Clean up debug logs and resolve linting errors across gateway and worker

Signed-off-by: betterclever <paliwal.pranjal83@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants