Skip to content
Latest (currently 2026.9.0) has the newest features, bug fixes, and CVE patches of Solo Enterprise for agentregistry.

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Agent to MCP server

Page as Markdown

Use RuntimeAccessPolicy to control which AgentCore agent deployments can invoke MCP server tools.

Before you begin

Set up the AgentCore runtime, including the managed gateway and gatewayRef. Specifically, confirm that both of the following are true before you continue:

  • The gateway is in phase=ready:
    arctl get gateways
  • Your Runtime has spec.config.gatewayRef set. Without this field, the registry does not route agent traffic through the gateway and RuntimeAccessPolicy is not enforced:
    arctl get runtime agentcore -o yaml | grep gatewayRef
    If the field is missing, follow Step 3.4 of the runtime setup guide to add it.

Note

Agent-to-MCP traffic is routed through the managed gateway only at deploy time. If you deployed agents before the gateway was ready or before gatewayRef was set, redeploy them to enable enforcement:

arctl apply -f your-agent.yaml

Restrict tool access for harness agents

By default, a harness agent can invoke all tools on a catalog MCP server. To restrict which tools the agent can call at runtime, create a RuntimeAccessPolicy resource. The policy is enforced by the managed gateway that you configured on your AgentCore runtime.

  1. Deploy a harness agent. The harness agent bundles the Solo.io docs MCP server. In the following steps, you restrict access to only the search tool of that MCP server.

  2. Create a RuntimeAccessPolicy that allows the harness agent to access specific MCP server tools. The following example allows the hello-agent deployment to access the search tool of the solo-docs MCP server. The solo-docs server comes with three tools, search, get_chunks, and get_full_page. Because get_chunks and get_full_page are not listed, access to these tools is denied.

    arctl apply -f- <<EOF
    apiVersion: ar.dev/v1alpha1
    kind: RuntimeAccessPolicy
    metadata:
      name: hello-agent-solo-docs-search
    spec:
      runtimeRef:
        name: agentcore
      rules:
        - from:
            - kind: Deployment
              name: hello-agent
          to:
            - kind: MCPServer
              name: solo-docs
              mcpTools:
                - search
    EOF

    Example output:

    ✓ RuntimeAccessPolicy/hello-agent-solo-docs-search created
    
    FieldDescription
    spec.runtimeRef.nameRequired. The name of the Runtime that this policy applies to. Note that you cannot change the runtime reference after you create the resource. To update the reference, you must delete and re-create the Runtime resource.
    spec.rules[].from[].kindSet to Deployment to identify the calling agent deployment.
    spec.rules[].from[].nameThe name of the agent deployment whose outbound access this rule grants.
    spec.rules[].to[].kindThe target type. Use MCPServer for catalog MCP servers.
    spec.rules[].to[].nameThe name of the target MCP server. Use "*" to match all servers.
    spec.rules[].to[].mcpToolsOptional. A list of specific tool names the agent may call. Omit to allow all tools on the target server.
  3. Open the Instances view in the UI and select your agent.

  4. In the Agent Details card, click Open Chat.

  5. Chat with the agent and ask it what MCP tools it has access to. Then, hit Enter and wait for the agent to reply. Verify that the agent only lists the tools that you explicitly allowed in your policy.