Skip to content

Commit bbed4fc

Browse files
committed
Fix agentManaged config calculation in cmd-mcp.ts
The agentManaged flag was correctly calculated at the top of both stdio and http handlers, but then recalculated incorrectly when passing to the MCP server config. This caused the --agent-managed flag to be ignored when combined with -i specs. Changes: - Line 56 (stdio): Use calculated agentManaged variable instead of recalculating - Line 130 (http): Use calculated agentManaged variable instead of recalculating This ensures --agent-managed -i s3://... correctly sets agentManaged: true in the server config. Agent-Id: agent-1fdc5885-eb2c-4a33-9451-323cf14bb29a
1 parent 975991f commit bbed4fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/cmd-mcp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const stdioCommand = new Command("stdio")
5353
store,
5454
indexNames,
5555
searchOnly: options.searchOnly,
56-
agentManaged: !indexSpecs || indexSpecs.length === 0,
56+
agentManaged,
5757
});
5858
} catch (error) {
5959
// Write errors to stderr (stdout is for MCP protocol)
@@ -127,7 +127,7 @@ const httpCommand = new Command("http")
127127
store,
128128
indexNames,
129129
searchOnly: options.searchOnly,
130-
agentManaged: !indexSpecs || indexSpecs.length === 0,
130+
agentManaged,
131131
port: parseInt(options.port, 10),
132132
host: options.host,
133133
cors,

0 commit comments

Comments
 (0)