Skip to content

Serve the agent's workflow tools from a Texera MCP server #9457

Open

Description

@bobbai00

Task Summary

Today the agent's tools run inside the agent service and edit a private copy of the workflow. That copy is loaded once, before the first prompt, so a change the user makes between prompts gets overwritten. #9464 fixes this by moving the agent onto the shared workflow.

This task moves the tools from #9481 onto one Texera MCP server, with the same names and inputs. The agent and outside assistants (#8663) call it, and its tools edit the shared workflow through #9464. This revisits the inline-tools decision in #5610.

  • The server holds no session: every tool takes the workflow id, so any copy of the server can answer, as the current MCP revision (2026-07-28) expects.
  • It is built on the official server SDK (@modelcontextprotocol/server, Apache-2.0), which runs on Bun like the agent service.
  • Each tool says whether it only reads (readOnlyHint), so a client can ask the person before a change.
  • From aicam's prototype in Proposal: Texera MCP, let AI assistants work with Texera #8663, the shared client package and the test harness can be kept. Its workflow editing holds a session in the server's memory (workflow_open to workflow_save), which the shared session replaces.
  • The agent calls the server with the user's token, as its backend calls do today. The MCP specification, though, has a server accept only tokens issued for it, and today's Texera tokens name no audience. So an outside assistant can use a token the person pastes in, while signing in from an assistant needs an authorization server, which Texera does not have yet.

The dataset tools from #9377, which also cover #4588, will come later on the endpoints from #9395. Review mode (#9075) waits on #9464.

A change made between two prompts is lost After: one MCP server and one copy of the workflow

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions