Skip to content

Commit 91a5470

Browse files
committed
update docs
1 parent e2778ce commit 91a5470

File tree

7 files changed

+60
-12
lines changed

7 files changed

+60
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ flow complements existing CLI tools by adding multi-project organization, built-
4343
- **Flexible execution** - Serial, parallel, conditional, and interactive workflows
4444
- **Workflow generation** - Create projects and workflows from reusable templates
4545
- **Composable workflows** - Reference and chain workflows within and across projects
46+
- **Platform integrations** - GitHub Actions, AI assistants (MCP), and more
4647

4748
<p align="center"><img src="docs/_media/demo.gif" alt="flow" width="1600"/></p>
4849

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and cross-project composition. Go beyond task running to workflow management tha
2626
- **Cross-Project Composition**: Reference and share workflows between different projects
2727
- **Visual Workflow Browser**: Discover and run workflows with powerful filtering and search
2828
- **Flexible Configuration**: YAML-based definitions with arguments, secrets, and conditional logic
29+
- **Platform Integrations**: GitHub Actions, AI assistants (MCP), and more
2930

3031
**Ready to organize your automation?**[Install flow](installation.md)[Quick start guide](quickstart.md)
3132

docs/guide/integrations.md

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,49 @@
11
# Integrations
22

3-
flow integrates with popular CI/CD platforms and containerized environments to bring your automation anywhere.
3+
flow integrates with popular CI/CD platforms, AI assistants, and containerized environments to bring your automation anywhere.
44

5-
## GitHub Actions
5+
6+
## AI Assistant Integration
7+
8+
### Model Context Protocol (MCP) <!-- {docsify-ignore} -->
9+
10+
Connect flow to AI assistants through the local Model Context Protocol server for natural language workflow management.
11+
The flow MCP server enables AI assistants to discover, understand, and execute your flow workflows through conversational interfaces.
12+
13+
#### Basic Usage <!-- {docsify-ignore} -->
14+
15+
Add the MCP server command to your favorite MCP client:
16+
17+
```shell
18+
flow mcp
19+
```
20+
21+
The server uses stdio transport and provides AI assistants with:
22+
23+
**Available Tools:**
24+
- `get_info` - Get flow information, schemas, and current context
25+
- `execute` - Execute flow workflows
26+
- `list_workspaces` - List all registered workspaces
27+
- `get_workspace` - Get details about a specific workspace
28+
- `switch_workspace` - Change the current workspace
29+
- `list_executables` - List and filter executables across workspaces
30+
- `get_executable` - Get detailed information about an executable
31+
- `get_execution_logs` - Retrieve recent execution logs
32+
- `sync_executables` - Sync workspace and executable state
33+
34+
**Available Prompts:**
35+
- `generate_executable` - Generate flow executable configurations
36+
- `generate_project_executables` - Generate complete project automation sets
37+
- `debug_executable` - Debug failing executables
38+
- `migrate_automation` - Convert existing automation to flow
39+
- `explain_flow` - Explain flow concepts and usage
40+
41+
> [!NOTE]
42+
> **Learn more about MCP**: Visit the [Model Context Protocol](https://modelcontextprotocol.io) documentation for client setup and integration details.
43+
44+
## CI/CD & Deployment <!-- {docsify-ignore} -->
45+
46+
### GitHub Actions
647

748
Execute flow workflows directly in your GitHub Actions pipelines with the official action.
849

@@ -22,7 +63,7 @@ jobs:
2263
2364
> **Complete documentation**: Visit the [Flow Execute Action](https://github.com/marketplace/actions/flow-execute) on GitHub Marketplace.
2465
25-
## Docker
66+
### Docker
2667
2768
Run flow in containerized environments for CI/CD pipelines or isolated execution.
2869

internal/mcp/resources/server-instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If the user prompts with any of these concepts, then they are likely referring t
2727
## Best Practices
2828

2929
### Safety
30-
- **Always confirm** before running `execute_flow` with potentially destructive commands
30+
- **Always confirm** before running `execute` with potentially destructive commands
3131
- **Validate YAML** before suggesting users save it to files. The JSON Schemas are provided by the `get_info` tool
3232
- **Check current context** before making workspace assumptions
3333
- **Use appropriate filters** when using tools that may return long lists. For instance, provide the appropriate arguments for the `list_executables` tool if you know the target workspace, a keyword, or verb for the executable that you're looking for.
@@ -66,7 +66,7 @@ When tools return JSON, present it in a user-friendly way:
6666
- **Inspire creativity** - help users see automation opportunities they might not have considered
6767

6868
## Tool Usage Gotchas
69-
- `execute_flow` can be used to run flow executables, not arbitrary shell commands or non-exec flow commands.
70-
- If an executable has `args` defined, you must provide them in the `args` field of the `execute_flow` tool.
71-
- If an executable has `params` defined where the type is `prompt`, you must provide them in the `params` field of the `execute_flow` tool. Do this by providing a mapping of the EnvKey to the value you want to provide.
69+
- `execute` can be used to run flow executables, not arbitrary shell commands or non-exec flow commands.
70+
- If an executable has `args` defined, you must provide them in the `args` field of the `execute` tool.
71+
- If an executable has `params` defined where the type is `prompt`, you must provide them in the `params` field of the `execute` tool. Do this by providing a mapping of the EnvKey to the value you want to provide.
7272
- When running tools, be aware that the current workspace may the output / response. Switch to the workspace that you expect if it's not already set in the context.

internal/mcp/server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ package mcp
22

33
import (
44
_ "embed"
5+
"os"
56

67
"github.com/mark3labs/mcp-go/server"
8+
9+
"github.com/flowexec/flow/internal/io"
710
)
811

912
//go:embed resources/server-instructions.md
@@ -29,6 +32,8 @@ func NewServer(executor CommandExecutor) *Server {
2932
}
3033

3134
func (s *Server) Run() error {
35+
_ = os.Setenv(io.DisableInteractiveEnvKey, "true")
36+
3237
return server.ServeStdio(s.srv)
3338
}
3439

internal/mcp/server_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var _ = Describe("MCP Server", func() {
8484
"switch_workspace",
8585
"get_executable",
8686
"list_executables",
87-
"execute_flow",
87+
"execute",
8888
"get_execution_logs",
8989
"sync_executables",
9090
}
@@ -238,14 +238,14 @@ var _ = Describe("MCP Server", func() {
238238
})
239239
})
240240

241-
Context("execute_flow tool", func() {
241+
Context("execute tool", func() {
242242
It("should call executor with provided arguments", func() {
243243
expectedOutput := "execution result"
244244
mockExecutor.EXPECT().
245245
Execute("test", "test:test-flow", "arg1", "arg2").
246246
Return(expectedOutput, nil)
247247

248-
result, err := mcpClient.CallTool(ctx, newCallToolRequest("execute_flow", map[string]interface{}{
248+
result, err := mcpClient.CallTool(ctx, newCallToolRequest("execute", map[string]interface{}{
249249
"executable_verb": "test",
250250
"executable_id": "test:test-flow",
251251
"args": "arg1 arg2",
@@ -261,7 +261,7 @@ var _ = Describe("MCP Server", func() {
261261
Execute("test", "test:test-flow").
262262
Return(expectedOutput, nil)
263263

264-
result, err := mcpClient.CallTool(ctx, newCallToolRequest("execute_flow", map[string]interface{}{
264+
result, err := mcpClient.CallTool(ctx, newCallToolRequest("execute", map[string]interface{}{
265265
"executable_verb": "test",
266266
"executable_id": "test:test-flow",
267267
}))

internal/mcp/tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func addServerTools(srv *server.MCPServer, executor CommandExecutor) {
116116
}
117117
srv.AddTool(listExecutables, listExecutablesHandler(executor))
118118

119-
executeFlow := mcp.NewTool("execute_flow",
119+
executeFlow := mcp.NewTool("execute",
120120
mcp.WithDescription("Execute a flow executable"),
121121
mcp.WithString("executable_verb", mcp.Required(),
122122
mcp.Enum(executable.SortedValidVerbs()...),

0 commit comments

Comments
 (0)