Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkgs/mcpx/internal/conformance/officialclient/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,14 @@ func run(url, scenario string) error {
if version >= modernFloor {
protocol = "force-discover"
}
// writePolicy allow: the daemon's write-policy gate asks a human to confirm every
// write-classified call, and this adapter's empty elicitation answers read as
// refusals at that gate, so no scenario call ever reached the server under test
// (#8922). The gate is covered by the daemon's unit tests; this harness measures
// protocol conformance, so its daemon does not ask.
cfg := map[string]any{"mcpServers": map[string]any{*namespace: map[string]any{
"url": url, "transport": "http", "protocol": protocol,
"mcpx": map[string]any{"sharing": "shared", "scope": "global"},
"mcpx": map[string]any{"sharing": "shared", "scope": "global", "writePolicy": "allow"},
}}}
b, _ := json.MarshalIndent(cfg, "", " ")
cfgPath := filepath.Join(dir, ".mcpx.json")
Expand Down
9 changes: 8 additions & 1 deletion pkgs/mcpx/scripts/conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ start_daemon() { # era port dir [mcp-spec]
[ "$era" = legacy ] && protocol=force-initialize
[ -n "${FIXTURE_PID:-}" ] || start_fixture
mkdir -p "$WORK/$dir"
printf '{"mcpServers":{"demo":{"url":"http://127.0.0.1:%s/mcp","protocol":"%s","mcpx":{"sharing":"shared","scope":"global"}},"tasks":{"command":"%s","mcpx":{"sharing":"shared","scope":"global"}}}}\n' \
# writePolicy allow on both servers: the daemon's write-policy gate (policy.write=ask)
# asks a human to confirm every write-classified call, and a conformance run has no
# human -- in server legs the suite client cannot answer a broker question at all, so
# every tools/call waited out the ask and died as a scenario timeout, and in client
# legs the adapter's empty answers read as refusals (#8922). The gate is product
# behaviour for interactive use and is covered by the daemon's unit tests; this
# harness measures protocol conformance, so its daemons do not ask.
printf '{"mcpServers":{"demo":{"url":"http://127.0.0.1:%s/mcp","protocol":"%s","mcpx":{"sharing":"shared","scope":"global","writePolicy":"allow"}},"tasks":{"command":"%s","mcpx":{"sharing":"shared","scope":"global","writePolicy":"allow"}}}}\n' \
"$FIXTURE_PORT" "$protocol" "$WORK/taskmcp" >"$WORK/$dir/.mcpx.json"
MCPX_CONFIG=$WORK/$dir/.mcpx.json MCPX_STATE_DIR=$WORK/$dir/state MCPX_CACHE_DIR=$WORK/$dir/cache \
MCPX_REGISTRY_URL=http://127.0.0.1:1/ \
Expand Down