MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / is_mcp_enabled

Method is_mcp_enabled

crates/chat-cli/src/api_client/mod.rs:353–366  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

351 }
352
353 pub async fn is_mcp_enabled(&self) -> Result<bool, ApiClientError> {
354 let request = self
355 .client
356 .get_profile()
357 .set_profile_arn(self.profile.as_ref().map(|p| p.arn.clone()));
358
359 let response = request.send().await?;
360 let mcp_enabled = response
361 .profile()
362 .opt_in_features()
363 .and_then(|features| features.mcp_configuration())
364 .is_none_or(|config| matches!(config.toggle(), OptInFeatureToggle::On));
365 Ok(mcp_enabled)
366 }
367
368 pub async fn create_subscription_token(&self) -> Result<CreateSubscriptionTokenOutput, ApiClientError> {
369 if cfg!(test) {

Callers 3

get_mcp_server_configsFunction · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 9

mapMethod · 0.80
set_profile_arnMethod · 0.45
get_profileMethod · 0.45
as_refMethod · 0.45
cloneMethod · 0.45
sendMethod · 0.45
opt_in_featuresMethod · 0.45
profileMethod · 0.45
mcp_configurationMethod · 0.45

Tested by

no test coverage detected