Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(mcp): explain how to reconnect stale client registrations (#7834)
Wolf Mermelstein309d281cb26d
diff --git a/services/mcp_auth_proxy/src/inbound/axum_router.rs b/services/mcp_auth_proxy/src/inbound/axum_router.rsindex 6ba16dc265..8b51ec434e 100644--- a/services/mcp_auth_proxy/src/inbound/axum_router.rs+++ b/services/mcp_auth_proxy/src/inbound/axum_router.rs@@ -107,9 +107,13 @@ async fn authorize<I: InflightAuthStore + 'static>("redirect_uri was not registered for this client",).into_response(),- Err(StartAuthorizationError::UnknownClient) => {- (axum::http::StatusCode::BAD_REQUEST, "unknown client_id").into_response()- }+ Err(StartAuthorizationError::UnknownClient) => (+ axum::http::StatusCode::BAD_REQUEST,+ "Your Macro connection needs to be reconnected. In the app you are connecting from, \+ remove the Macro MCP connection, add it again, and sign in to Macro. \+ Signing in again without removing the connection may reuse the old registration.",+ )+ .into_response(),Err(StartAuthorizationError::ClientRegistrationStore(error)) => {tracing::error!(error=?error, "failed to read client registrations");(diff --git a/services/mcp_auth_proxy/src/inbound/axum_router/test.rs b/services/mcp_auth_proxy/src/inbound/axum_router/test.rsindex 9a183aaa6e..9921ced10e 100644--- a/services/mcp_auth_proxy/src/inbound/axum_router/test.rs+++ b/services/mcp_auth_proxy/src/inbound/axum_router/test.rs@@ -134,7 +134,7 @@ async fn attacker_cannot_have_a_code_delivered_to_their_own_callback() {}#[tokio::test]-async fn authorize_rejects_an_unregistered_client_id() {+async fn authorize_explains_how_to_reconnect_an_unregistered_client() {let harness = Harness::new();let response = send(@@ -148,7 +148,10 @@ async fn authorize_rejects_an_unregistered_client_id() {.await;assert_eq!(response.status, StatusCode::BAD_REQUEST);- assert_eq!(response.body, "unknown client_id");+ assert!(response.body.contains("remove the Macro MCP connection"));+ assert!(response.body.contains("add it again, and sign in to Macro"));+ assert_eq!(response.location, None);+ assert!(!harness.inflight.has_pending());}/// The flow a real MCP client drives, from registration through to a bearer