Skip to content

Commit 0be9481

Browse files
committed
Fix docs.
1 parent 5e96011 commit 0be9481

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

cmd/docker-mcp/commands/root.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ Examples:
3434
`
3535

3636
// Root returns the root command for the init plugin
37-
func Root(ctx context.Context, cwd string, dockerCli command.Cli) *cobra.Command {
37+
func Root(ctx context.Context, cwd string, dockerCli command.Cli, features features.Features) *cobra.Command {
3838
dockerClient := docker.NewClient(dockerCli)
3939

40-
features := features.New(ctx, dockerCli)
41-
4240
cmd := &cobra.Command{
4341
Use: "mcp [OPTIONS]",
4442
Short: "Manage MCP servers and clients",

cmd/docker-mcp/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"github.com/docker/mcp-gateway/cmd/docker-mcp/commands"
1616
"github.com/docker/mcp-gateway/cmd/docker-mcp/version"
17+
"github.com/docker/mcp-gateway/pkg/features"
1718
)
1819

1920
func main() {
@@ -31,7 +32,7 @@ func main() {
3132
}
3233

3334
plugin.Run(func(dockerCli command.Cli) *cobra.Command {
34-
return commands.Root(ctx, cwd, dockerCli)
35+
return commands.Root(ctx, cwd, dockerCli, features.New(ctx, dockerCli))
3536
},
3637
manager.Metadata{
3738
SchemaVersion: "0.1.0",

docs/generator/generate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/spf13/pflag"
1414

1515
"github.com/docker/mcp-gateway/cmd/docker-mcp/commands"
16+
"github.com/docker/mcp-gateway/pkg/features"
1617
)
1718

1819
const defaultSourcePath = "/reference/"
@@ -35,7 +36,7 @@ func gen(opts *options) error {
3536
DisableAutoGenTag: true,
3637
}
3738

38-
cmd.AddCommand(commands.Root(context.TODO(), "", dockerCLI))
39+
cmd.AddCommand(commands.Root(context.TODO(), "", dockerCLI, features.AllDisabled()))
3940

4041
c, err := clidocstool.New(clidocstool.Options{
4142
Root: cmd,

docs/profiles.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Profiles are decoupled from catalogs, meaning the servers in a profile can come
1717

1818
## Enabling Profiles
1919

20-
Profiles are a feature that must be enabled first:
20+
Profiles are a feature that must be enabled first.
21+
22+
In Docker CE or container mode:
2123

2224
```bash
2325
# Enable the profiles feature
@@ -27,6 +29,8 @@ docker mcp feature enable profiles
2729
docker mcp feature list
2830
```
2931

32+
If you're using Docker Desktop, you have to enable the `MCPWorkingSets` feature flag within Docker Desktop instead.
33+
3034
Once enabled, you'll have access to:
3135
- `docker mcp profile` commands for managing profiles
3236
- `--profile` flag for `docker mcp gateway run`
@@ -740,7 +744,7 @@ Error: profile my-set not found
740744
Error: unknown command "profile" for "docker mcp"
741745
```
742746

743-
**Solution**: Enable the feature with `docker mcp feature enable profiles`
747+
**Solution**: In Docker CE or container mode, enable the feature with `docker mcp feature enable profiles`. In Docker Desktop, enable the `MCPWorkingSets` feature flag.
744748

745749
### Invalid Server Reference
746750

pkg/features/features.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ func New(ctx context.Context, dockerCli command.Cli) (result Features) {
3737
return
3838
}
3939

40+
func AllEnabled() Features {
41+
return &featuresImpl{
42+
runningDockerDesktop: true,
43+
profilesEnabled: true,
44+
}
45+
}
46+
47+
func AllDisabled() Features {
48+
return &featuresImpl{
49+
runningDockerDesktop: false,
50+
profilesEnabled: false,
51+
}
52+
}
53+
4054
func (f *featuresImpl) InitError() error {
4155
return f.initErr
4256
}

0 commit comments

Comments
 (0)