-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(workflow-as-mcp): wrapping workflows in the same workspace as MCP tools to particular MCP servers #2415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds MCP (Model Context Protocol) integration allowing workflows to be exposed as tools to external MCP clients. The implementation wraps existing workflow execution APIs as MCP-compliant JSON-RPC endpoints. Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as MCP Client
participant Serve as MCP Serve Route
participant DB as Database
participant WorkflowAPI as Workflow Execute API
participant Executor as Workflow Executor
Note over Client,Executor: MCP Tool Call Flow
Client->>Serve: POST tools/call request
Serve->>DB: Query workflow_mcp_tool table
DB-->>Serve: Tool metadata
Serve->>DB: Check workflow deployment
DB-->>Serve: isDeployed status
alt Not deployed
Serve-->>Client: Error: Not deployed
end
Serve->>WorkflowAPI: Fetch execute endpoint
WorkflowAPI->>Executor: Run workflow blocks
Executor-->>WorkflowAPI: Result
WorkflowAPI-->>Serve: Execution output
Serve-->>Client: CallToolResult
Note over Client,Executor: Tool Registration
Client->>Serve: POST tools/list request
Serve->>DB: Query tool schemas
DB-->>Serve: Tools with parameters
Serve-->>Client: ListToolsResult
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
29 files reviewed, 4 comments
apps/sim/app/api/workflows/[id]/deployments/[version]/revert/route.ts
Outdated
Show resolved
Hide resolved
apps/sim/app/api/mcp/workflow-servers/[id]/connection-info/route.ts
Outdated
Show resolved
Hide resolved
2f2ec02 to
2259bfc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
41 files reviewed, 4 comments
Summary
We wrap the existing API calls as MCP tool endpoints and use them to trigger workflows from MCP servers.
Type of Change
Testing
Tested manually with @Sg312
Checklist