Skip to content

Commit b581cd9

Browse files
committed
feat: add stateless configuration
1 parent ff6d5a7 commit b581cd9

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

cmd/cmds.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ package cmd
22

33
import (
44
"fmt"
5-
"github.com/alecthomas/kong"
6-
"github.com/netapp/ontap-mcp/config"
7-
"github.com/netapp/ontap-mcp/server"
85
"log/slog"
96
"os"
107
"path/filepath"
118
"strings"
9+
10+
"github.com/alecthomas/kong"
11+
"github.com/netapp/ontap-mcp/config"
12+
"github.com/netapp/ontap-mcp/server"
1213
)
1314

1415
var logger = setupLogger()
@@ -29,7 +30,7 @@ type StartCmd struct {
2930
Port int `default:"8080" help:"Listening port" env:"ONTAP_MCP_PORT"`
3031
InspectTraffic bool `default:"false" help:"Inspect MCP HTTP traffic"`
3132
ReadOnly bool `default:"false" help:"Run MCP in read-only mode. This disables all tool calls that modify ONTAP state."`
32-
Stateless bool `default:"false" help:"Run in stateless mode (no Mcp-Session-Id tracking). Required when deploying behind proxies or gateways that don't preserve session headers, e.g. Power Platform on-premises data gateway."`
33+
Stateless bool `default:"false" help:"Run in stateless mode (no mcp-session-id header validation). Required when deploying behind proxies or gateways that don't preserve session headers, e.g. on-premises data gateways."`
3334
}
3435

3536
func (a *StartCmd) Run(cli *CLI) error {

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Some commonly used flags:
134134
| Flag | Description |
135135
|---|---|
136136
| `--read-only` | Disable all mutating operations. Only read-only tools are registered. |
137-
| `--stateless` | Disable `Mcp-Session-Id` tracking. Required when deploying behind proxies or gateways that do not preserve session headers. |
137+
| `--stateless` | Disable mcp-session-id header validation. Required when deploying behind proxies or gateways that do not preserve session headers, e.g. on-premises data gateways. |
138138
| `--inspect-traffic` | Log all MCP HTTP request and response bodies for debugging. |
139139

140140
## Next Steps

docs/tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All ONTAP MCP tools are annotated with hint metadata: `readOnlyHint`, `idempoten
88

99
If you want to run the ONTAP MCP server in read-only mode, you can start the server with the `--read-only` flag. In this mode, only tools with the `readOnlyHint` will be available for use, ensuring that no modifications can be made to the ONTAP cluster.
1010

11-
To run without session tracking (e.g. behind proxies that strip headers), use the `--stateless` flag. See the [configuration documentation](install.md#configuration) for more details.
11+
To run without mcp-session-id header validation (e.g. behind proxies that strip session headers), use the `--stateless` flag. See the [configuration documentation](install.md#configuration) for more details.
1212

1313
## API Discovery
1414

server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (a *App) StartServer() {
8080
a.logger.Info("MCP server is running in read-only mode; mutating operations are disabled")
8181
}
8282
if a.options.Stateless {
83-
a.logger.Info("MCP server is running in stateless mode; Mcp-Session-Id tracking is disabled")
83+
a.logger.Info("MCP server is running in stateless mode; mcp-session-id header validation is disabled")
8484
}
8585
server := a.createMCPServer()
8686
a.runHTTPServer(server)

0 commit comments

Comments
 (0)