Skip to content

MCP server namespace not appearing in Connect AI Agent tools page after gateway registration

0

Setup I'm building a voice AI agent using:

Amazon Connect with a custom contact flow Lex V2 bot with Nova Sonic speech-to-speech enabled Q Connect Orchestration AI Agent (Claude Sonnet 4.5) handling self-service 5 AWS Lambda functions I want exposed as tools Bedrock AgentCore Gateway converting the Lambdas to MCP-compatible tools

The basic call flow works end-to-end. Caller dials in, hears greeting, has multi-turn conversation with the orchestration agent, knowledge base retrieval works. I'm now trying to wire the Lambdas as MCP tools so the agent can execute them mid-conversation. What I've done

Created an AgentCore Gateway with authorizerType: CUSTOM_JWT, discoveryUrl set to my Connect instance's .well-known/openid-configuration, allowedAudience set to the Connect instance URL, and allowedClients set to the Connect instance ID. Created 5 Lambda targets on the gateway. All show status READY. Created the AgentCore service-linked role AWSServiceRoleForBedrockAgentCoreGatewayNetwork (it didn't exist in the account until I explicitly created it). Added the gateway as a third-party application integration in the AWS Console → Amazon Connect → Third-party applications → Add integration → MCP server. Selected the gateway from the dropdown, associated it with my Connect instance. Integration shows as active. Opened the orchestration AI agent in the Connect admin console → Amazon Q → AI Agents → Tools section.

The problem In the Tools section of the AI agent, I can see all 9 tools (4 built-in: ESCALATION, CONVERSATION, COMPLETE, QUESTION + 5 Lambda tools. All show "Sufficient" permissions. However, the Namespace column is empty for all tools (showing "-"). They appear to be registered as RETURN_TO_CONTROL type, not MODEL_CONTEXT_PROTOCOL. When I click "Add existing AI tools" to try to add the MCP-namespaced versions of the Lambda tools, the gateway's namespace does not appear in the dropdown. There are no tools to select from the gateway I just registered. What I've already tried

Verified the gateway status is READY in the AgentCore console Verified all 5 Lambda targets are READY Verified the discovery URL returns valid OpenID configuration when curled Verified the gateway's resource policy allows Connect and Wisdom access Confirmed both AWSServiceRoleForBedrockAgentCoreGatewayNetwork and AWSServiceRoleForAmazonConnect SLRs exist Deleted and re-added the third-party application integration Created a fresh gateway with CUSTOM_JWT authorizer (the original was created with NONE and the console required CUSTOM_JWT to associate with the Connect instance) Independently tested all 5 Lambda functions — they execute correctly Verified the orchestration agent's security profile

Per Amazon Q in the console, possible causes are:

Security profile permissions for MCP tool invocation Gateway configuration / discovery URL IAM role permissions on the gateway execution role or Connect SLR Backend service health Tool registration process

I've checked all of these and don't see anything obviously wrong, but the MCP tools namespace still doesn't propagate to the Tools page. Questions

Is there an additional step required to make the MCP namespace discoverable in the AI Agent tools page after registering the gateway as a third-party application? Is there a propagation delay between registering the integration and the namespace appearing in the agent tools dropdown? If so, how long? Is there a specific IAM permission on the Connect service-linked role that needs to be present for MCP tool discovery (vs invocation)? Is there a way to verify from the CLI whether Connect can actually see the gateway tools? aws qconnect list-tools or similar? Has anyone successfully wired AgentCore Gateway MCP tools into a Q Connect Orchestration AI Agent for self-service voice flows? Any docs or blog posts beyond the standard MCP integration page would be appreciated.

For now I'm going to fall back to using the tools as RETURN_TO_CONTROL and routing through the contact flow with Check Contact Attributes blocks, but I'd really like to get the MCP path working for the seamless mid-conversation tool execution. Thanks in advance.

3 Answers
3

The fact that your tools default to RETURN_TO_CONTROL and the namespace dropdown is empty indicates a handshake failure during the discovery phase. Even with the gateway in READY status, Amazon Q Connect must be explicitly allowed to "read" the gateway metadata.

1. The Critical Gateway Resource Policy ("Missing Link")

The most common cause is that the AgentCore Gateway Resource Policy (not the IAM role) lacks permission for the Amazon Q Service Principal. Add this to your gateway:

{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": { "Service": "wisdom.amazonaws.com" },
    "Action": [
      "bedrock:GetAgentCoreGateway", 
      "bedrock:InvokeAgentCoreGateway"
    ],
    "Resource": "arn:aws:bedrock:REGION:ACCOUNT:agent-core-gateway/GATEWAY_ID"
  }]
}

2. Validate via CLI (Bypass Console Caching)

The Connect UI often suffers from aggressive metadata caching. Verify if the association exists at the API level:

aws qconnect list-integration-associations --assistant-id <YOUR_ASSISTANT_ID>

3. JWT Audience Precision

Check your Gateway logs in CloudWatch. If the aud (Audience) claim sent by Connect doesn't exactly match your allowedAudience (e.g., a trailing slash discrepancy), the gateway will reject the discovery request, resulting in an empty namespace.

I would try first: After updating the Resource Policy (Step 1), delete and re-add the third-party integration in the Connect console. This forces a fresh discovery call to the AgentCore Gateway.

EXPERT
answered a month ago
0

Based on the setup you've described, there are a few key points that may help resolve the namespace visibility issue:

Gateway-to-Instance Association Requirement

When integrating an MCP server with Amazon Connect, only one instance can be associated with a given AgentCore Gateway, and that instance must have the gateway's Discovery URL configured in Bedrock AgentCore. Each gateway can only be used with one MCP server integration. The Discovery URL must follow the format [connect instance URL]/.well-known/openid-configuration, which you appear to have configured correctly.

Tool Allowlisting at the Agent Space Level

After registering an MCP server at the account level, you need to explicitly configure which tools from that server are available to specific agent configurations. This involves:

  1. Selecting your AI agent configuration
  2. Navigating to the capabilities or tools section
  3. Adding the registered MCP server
  4. Configuring tool access by either allowing all tools or selecting specific tools to allowlist

Without this explicit allowlisting step, the tools won't appear as available for the agent to use, even if the gateway integration shows as active.

Authentication and Authorization

Since you're using CUSTOM_JWT as the authorizer type, ensure that the authentication credentials are properly configured. If there are issues with authentication, you may need to deregister and re-register the server with updated credentials.

Propagation and Verification

While there isn't specific documentation about propagation delays, integration changes in Amazon Connect can sometimes take a few minutes to fully propagate. Additionally, verify that the security profile assigned to your AI agent has the necessary permissions for MCP tool invocation, not just the general Connect user permissions.

Tool Discovery

The gateway converts your Lambda functions into MCP-compatible tools, and these should be discoverable once the gateway is properly connected to your agent configuration. The fact that you're seeing the tools but without namespace information suggests the integration may be partially complete but missing the explicit tool allowlisting step at the agent level.

I'd recommend focusing on the tool allowlisting configuration within your specific AI agent setup, as this appears to be the missing link between having an active gateway integration and seeing the MCP namespace populated in your tools dropdown.
Sources
Connecting MCP Servers - AWS DevOps Agent
Enable AI agents to retrieve information and complete actions with MCP tools - Amazon Connect
Integrate an MCP server with Amazon Connect - Amazon Connect

answered a month ago
EXPERT
reviewed a month ago
  • Thanks for the detailed breakdown. We've confirmed all the upstream pieces are in place:

    Gateway with CUSTOM_JWT auth and Connect discovery URL Resource policy attached Policy engine with a permit-all Cedar policy MCP protocol versions 2025-03-26 and 2025-06-18 Lambda targets all in READY status App-integrations application associated with the instance AgentCore SLR created

    The issue is specifically at the tool allowlisting step you mentioned. When we go to AI Agent Designer → Tools → Create tool → MCP tool, the namespace dropdown only shows "Amazon Connect" (the built-in namespace). Our gateway namespace never appears, so we can't get to the allowlisting screen. A few questions:

    Is there an additional step to make a custom AgentCore Gateway namespace discoverable in that dropdown? Is there a known propagation delay between registering the integration and the namespace surfacing in the Connect console? Is account-level enablement required for Lambda-based gateway targets to appear?

0

I’m experiencing the same issue, and after extensive troubleshooting, I believe this is a bug.

First, during tool registration, the JWT token provided by Connect appears to be missing key claims. Connect JWTs contain only five claims: sub, iss, exp, iat, and jti.

What’s missing are several standard OAuth/OIDC claims:

aud (audience) — so allowed_audience in the authorizer cannot be matched client_id / azp (authorized party) — so allowed_clients cannot be matched scope — so allowed_scopes cannot be matched

Additionally, the sub claim is set to the Connect instance name. For example, if the Connect URL is: https://my-example-poc.my.connect.aws/.well-known/openid-configuration

then the sub value would be: my-example-poc.

As a workaround, a custom claim rule can be created, such as: sub EQUALS my-example-poc

This allows the exposed tools to appear in the Security Profiles, and they can then be assigned to the AI agent.

However, there is a second issue: when the AI agent attempts to call any of the MCP tools, the sub claim is set to CloverAgentAssistantService. Because this value differs from the one used in the custom rule, access to execute the tool is denied.

answered 25 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.