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
feat(mcp): add OpenAI domain verification endpoint (#8581)
Eric Hayes48cc5522a002
diff --git a/services/agent_harness_service/src/config.rs b/services/agent_harness_service/src/config.rsindex 55774e2808..a8a65e447f 100644--- a/services/agent_harness_service/src/config.rs+++ b/services/agent_harness_service/src/config.rs@@ -100,6 +100,8 @@ pub struct Config {pub google_client_id: GoogleClientId,/// Secret name of the Google OAuth client credential.pub google_client_secret_key: GoogleClientSecretKey,+ /// Token served at `/.well-known/openai-apps-challenge`.+ pub openai_domain_verification_token: OpenaiDomainVerificationToken,/// Browser-reachable FusionAuth origin, when different from the API.pub fusionauth_public_url: FusionauthPublicUrl,/// Additional trusted client callback hosts, overriding the built-in list.@@ -375,6 +377,9 @@ macro_env_var::env_vars! {pub struct GoogleClientId;/// Public MCP OAuth configuration.pub struct GoogleClientSecretKey;+ /// OpenAI domain verification token for the ChatGPT Apps Directory,+ /// served at `/.well-known/openai-apps-challenge`.+ pub struct OpenaiDomainVerificationToken;}macro_env_var::maybe_env_vars! {/// Optional public MCP OAuth configuration.diff --git a/services/agent_harness_service/src/public_mcp.rs b/services/agent_harness_service/src/public_mcp.rsindex ca9c88d864..b03983625f 100644--- a/services/agent_harness_service/src/public_mcp.rs+++ b/services/agent_harness_service/src/public_mcp.rs@@ -132,8 +132,15 @@ pub async fn router(});// OAuth router has its own CORS and bearer middleware; mount outside the// browser API layers, with the same tracing layer as the harness API.+ // Serves the ChatGPT Apps Directory domain verification token.+ let openai_domain_verification_token =+ config.openai_domain_verification_token.as_ref().to_string();Ok(mcp_auth_proxy::inbound::axum_router::mounted_mcp_router(auth_proxy, jwt_args, mcp_service)+ .route(+ "/.well-known/openai-apps-challenge",+ axum::routing::get(move || async move { openai_domain_verification_token }),+ ).layer(macro_tower_layers::MacroRequestIdAndTracingLayer::new(std::time::Duration::from_millis(200),diff --git a/tooling/xtask/crates/xtask_local/src/local/local_env.rs b/tooling/xtask/crates/xtask_local/src/local/local_env.rsindex 2f8367c841..695e854e23 100644--- a/tooling/xtask/crates/xtask_local/src/local/local_env.rs+++ b/tooling/xtask/crates/xtask_local/src/local/local_env.rs@@ -842,6 +842,12 @@ impl BootStubEnv {"SLACK_MCP_CLIENT_SECRET".into(),"local-slack-mcp-secret".into(),);+ // agent_harness_service serves this at `/.well-known/openai-apps-challenge`;+ // only OpenAI's verifier reads it.+ env.insert(+ "OPENAI_DOMAIN_VERIFICATION_TOKEN".into(),+ "local-openai-domain-verification-token".into(),+ );// document_storage_service's GitHub sync + LiveKit + LLM + Cal config.// All boot-required; the integrations they back are inert locally.env.insert("GITHUB_SYNC_APP_URL".into(), "http://localhost:8080".into());diff --git a/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs b/tooling/xtask/crates/xtask_local/src/local/local_env/test.rsindex e1ee9a99b5..0e7416c1e1 100644--- a/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs+++ b/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs@@ -134,6 +134,7 @@ fn emits_required_keys() {"ANTHROPIC_API_KEY","SLACK_MCP_CLIENT_ID","SLACK_MCP_CLIENT_SECRET",+ "OPENAI_DOMAIN_VERIFICATION_TOKEN","GITHUB_SYNC_APP_URL","GITHUB_SYNC_APP_CLIENT_ID","GITHUB_SYNC_APP_CLIENT_SECRET",