diff --git a/src/server.ts b/src/server.ts index f17058f..6fce03a 100644 --- a/src/server.ts +++ b/src/server.ts @@ -852,7 +852,7 @@ function buildGateConnectorYaml(upstreamPort: number, resourceName: string, hasP lines.push( "", "policies:", - " - path: \"gate/policies/mcp_tool_allowlist.rego\"", + " - path: \"policies/mcp_tool_allowlist.rego\"", " stage: \"pre_request\"" ); } @@ -888,7 +888,8 @@ function buildGateReadme(upstreamPort: number, hasPolicy: boolean): string { "", "## Generated Policy", "", - "The generated `gate/policies/mcp_tool_allowlist.rego` file allowlists the OpenAPI-derived tool names from this project." + "The generated `gate/policies/mcp_tool_allowlist.rego` file allowlists the OpenAPI-derived tool names from this project.", + "Its connector reference is config-relative, so `gate-connector -config /gate/connector.yaml` works regardless of your current working directory." ); } return `${lines.join("\n")}\n`; diff --git a/test/cli.test.ts b/test/cli.test.ts index fa8b8d4..e48af12 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -41,6 +41,7 @@ test("generate command creates project files", async () => { assert.match(serverTs, /--spec/); assert.match(gateReadme, /Point your MCP client at Gate/); assert.match(gateConnector, /protocol: "mcp"/); + assert.match(gateConnector, /path: "policies\/mcp_tool_allowlist\.rego"/); assert.match(gatePolicy, /approved_tools/); assert.match(gatePolicy, /getHealth/); assert.match(gatePolicy, /postEcho/);