Skip to content

Agent Core - MCP Server in Harness

0

Hello,

In Amazon Bedrock Agent Core I have a Harness and an MCP Server, that I can see at the ManagementConsole->Build->Runtime section. When I edit the Harness, I do not see the MCP Server, and I can't add it as a direct reference. There is a section for Remote MCP servers with Endpoint URL. The MCP Server was built using AgentCore CLI and deployed into Agent Core directly from localhost. Is this MCP Server added by default into a Harness ?

Can't an MCP Server from Agent Core be added in a Harness from Agent Core ?

Thank you,

1 Answer
0
Accepted Answer

When you deploy an MCP server directly to AgentCore Runtime using the AgentCore CLI, it is not automatically added to a harness. The MCP server and the harness are separate resources that need to be explicitly connected.

To use your deployed MCP server with a harness, you have two main options:

  1. Use AgentCore Gateway as an intermediary: Create an AgentCore Gateway and add your MCP server as a target to that gateway. Then, add the gateway to your harness using the agentcore_gateway tool type. This approach provides additional governance features like IAM/JWT authentication, per-tool authorization, and credential brokering.

  2. Connect as a remote MCP server: If your MCP server is already secured and you don't need the Gateway's governance layer, you can connect to it directly using the remote_mcp tool type by specifying its URL endpoint. This is the "Remote MCP servers with Endpoint URL" section you're seeing in the console.

The reason you don't see your deployed MCP server as a direct reference option in the harness configuration is because harnesses work with tools through these defined patterns (gateway reference or remote URL), rather than direct references to Runtime-deployed MCP servers. The separation allows for flexibility in how you expose and govern access to your MCP server's capabilities.

To add your MCP server to a harness using the CLI, you would use a command like: agentcore add tool --harness my-agent --type remote_mcp --name my-mcp --url <your-mcp-server-url>
Sources
Tools - Amazon Bedrock AgentCore
MCP servers targets - Amazon Bedrock AgentCore
Amazon Bedrock AgentCore harness is now generally available: Go from idea to production-grade agent in minutes | Artificial Intelligence

answered 13 days ago

EXPERT

reviewed 13 days ago

  • Thank you for your answer,
    I've chosen the AgentCore Gateway solution, because in the Management Console, the Gateway has the option to directly select the AgentCore Runtime, where the MCP server is listed.

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.