Amazon Bedrock AgentCore is in preview release and is subject to change.
Using the MCP Inspector
The MCP Inspector is an interactive developer tool for testing and debugging MCP servers, including Gateway. You can use it to explore the tools provided by a gateway and test tool invocations.
Setting up the MCP Inspector
To install and start the MCP Inspector:
npx @modelcontextprotocol/inspector
This command will:
-
Start the MCP Inspector server on localhost
-
Generate a session token for authentication to the MCP Inspector
-
Display a URL with the MCP Inspector authorization token pre-populated
-
Automatically open your browser to the inspector interface
Example output:
Starting MCP inspector... Proxy server listening on localhost:6277 Session token: c64b9e14995e9846572cb47c52eb198dd659c365e49a2cd8ce907b9ebb68aadd Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth MCP Inspector is up and running at: http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=c64b9e14995e9846572cb47c52eb198dd659c365e49a2cd8ce907b9ebb68aadd Opening browser...
Connecting to your gateway
To connect to your gateway using the MCP Inspector:
-
In the Inspector interface, configure the connection to your gateway:
-
Transport Type: Select Streamable HTTP
-
URL: Enter your gateway's MCP endpoint URL
-
Authentication:
-
Header name: Authorization
-
Bearer token: Your access token for the gateway
-
-
-
Click Connect to establish a connection to your gateway.
When connected, the inspector will establish proxy connections between the client and server:
New StreamableHttp connection request Query parameters: {"url":"https://YourGatewayId.gateway.bedrock-agentcore.us-west-2.amazonaws.com/mcp","transportType":"streamable-http"} Created StreamableHttp server transport Created StreamableHttp client transport Client <-> Proxy sessionId: 1234abcd-12ab-34cd-56ef-1234567890ab Proxy <-> Server sessionId: 12345678-xxxx-xxxx-xxxx-123456789012

Using the MCP Inspector
Once connected, you can use the MCP Inspector to:
-
List tools: View all available tools provided by your gateway
-
Search for tools: If semantic search is enabled, search for tools based on natural language queries
-
View tool schemas: Examine the input and output schemas for each tool
-
Call tools: Invoke tools with parameters and view responses
-
Save and load configurations: Save your connection settings and tool invocation parameters for future use
The MCP Inspector provides a convenient way to test your gateway and understand the tools it provides before integrating it with your agent.
Note
The MCP Inspector is a development tool and should not be used in production environments. Always secure your access tokens and gateway credentials.
Troubleshooting
If you encounter issues when using the MCP Inspector with your gateway, check the following:
-
Connection issues: Ensure that your gateway URL is correct and accessible from your network
-
Authentication issues: Verify that your access token is valid and has not expired
-
Tool invocation errors: Check the error messages in the response and ensure that your input parameters match the tool's schema
-
Proxy errors: If you see errors related to the proxy connection, try restarting the MCP Inspector
For more information about the MCP Inspector and its features, visit the Model Context Protocol
documentation