diff --git a/apps/mcp-server/src/main.rs b/apps/mcp-server/src/main.rs index 6e555bd..a5838bf 100644 --- a/apps/mcp-server/src/main.rs +++ b/apps/mcp-server/src/main.rs @@ -145,6 +145,7 @@ mod tests { use crank_registry::{ CreateAgentRequest, CreateAsyncJobRequest, CreatePlatformApiKeyRequest, ListInvocationLogsQuery, PostgresRegistry, PublishAgentRequest, PublishRequest, + SaveAgentBindingsRequest, }; use crank_runtime::{ RequestRateLimitConfig, RequestRateLimiter, RuntimeExecutor, SecretCrypto, @@ -1182,6 +1183,7 @@ mod tests { .await; let client = reqwest::Client::new(); let mcp_url = agent_mcp_url(&base_url, "sales-refresh"); + publish_agent_with_bindings(®istry, "sales-refresh", vec![]).await; let api_key = create_platform_api_key( ®istry, "sales-refresh", @@ -1220,7 +1222,15 @@ mod tests { }) .await .unwrap(); - publish_agent_for_operation(®istry, &operation, "sales-refresh").await; + registry + .save_agent_bindings(SaveAgentBindingsRequest { + workspace_id: &test_workspace_id(), + agent_id: &test_agent_id("sales-refresh"), + agent_version: 1, + bindings: &[binding_for_operation(&operation)], + }) + .await + .unwrap(); let after_publish = post_jsonrpc( &client, @@ -2482,6 +2492,7 @@ mod tests { .send() .await .unwrap(); + assert_eq!(initialize_response.status(), reqwest::StatusCode::OK); let session_id = initialize_response .headers() .get("MCP-Session-Id")