Skip to main content
Glama
akeyless-agentcore-rta

akeyless-agentcore-rta

Official

Akeyless Agentic Runtime Authority for Amazon Bedrock AgentCore

Python library and Model Context Protocol (MCP) server that gives Amazon Bedrock AgentCore agents access to protected resources through Akeyless Agentic Runtime Authority (ARA). AI agents can query databases, run actions on AWS, Azure, GCP and Kubernetes, and execute commands on Linux (SSH), Windows (WinRM) and LDAP / Active Directory servers, authenticating to the Akeyless Gateway with their AWS IAM role.

AgentCore orchestrates. Akeyless holds the credentials. Secret values never enter the agent or the model context.

Requirements

  • Python 3.10+

  • Akeyless Gateway with ARA enabled (not api.akeyless.io)

  • Auth method your AgentCore role can use (production: AWS IAM cloud identity)

Related MCP server: Gate22

Install (local)

cd bedrock-agentcore-akeyless-rta
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[mcp,dev]"

Quick start — client

from akeyless_agentcore_rta import AkeylessRtaClient

client = AkeylessRtaClient()  # reads AKEYLESS_* env
for s in client.list_secrets():
    print(s.name, s.target_type)  # never prints credentials

rows = client.query_db("SELECT 1", secret_name="/prod/db/readonly")
print(rows.results)

Quick start — MCP on AgentCore

# env (required)
export AKEYLESS_GATEWAY_URL=https://gw.example.com:8000
export AKEYLESS_ACCESS_ID=p-xxxxx
export AKEYLESS_ACCESS_TYPE=aws_iam   # or access_key locally

python examples/mcp-server/server.py
# AgentCore: protocol MCP → examples/mcp-server/server.py

Environment

Variable

Required

Notes

AKEYLESS_GATEWAY_URL

Yes

Customer GW (https://gw:8000 or …/api/v2). Public SaaS rejected.

AKEYLESS_ACCESS_ID

Yes*

Auth method access id

AKEYLESS_ACCESS_TYPE

No

Default aws_iam. Also: access_key, oidc, saml, jwt, …

AKEYLESS_ACCESS_KEY

For access_key

Local/dev only

(OIDC/SAML)

—

Browser login to Gateway; needs Access ID only

AKEYLESS_AGENT_ID

No

Default bedrock-agentcore

AKEYLESS_MCP_ID

No

Default akeyless-agentcore-rta

AKEYLESS_DEFAULT_SECRET_NAME

No

Optional default path for execute tools

* Or AKEYLESS_TOKEN for a pre-issued session token.

Architecture

sequenceDiagram
    participant U as User
    participant C as Claude Desktop
    participant M as akeyless-claude-mcp
    participant A as Akeyless API
    participant G as Akeyless Gateway
    participant L as AI Quorum (LLMs)
    participant R as Database / Cloud

    U->>C: "Query prod postgres for user count"
    C->>M: list-secrets
    M->>A: list-items (authenticated, role-scoped)
    A-->>M: secret paths + target types (no values)
    M-->>C: /prod/db/postgres-ro
    C->>M: query-db (path + SQL)
    M->>G: POST /config/target_query
    Note over G: 1. RBAC: ARA execute permission on path
    Note over G: 2. Input rules (read-only, no multi-statement...)
    alt Input rule violated
        G-->>M: BLOCKED (never reaches target)
    end
    opt AI Quorum enabled
        G->>L: validate action
        L-->>G: verdicts (any deny = block)
        alt Any model denies
            G-->>M: BLOCKED
        end
    end
    Note over G: 3. Fetch JIT/rotated credential (stays in GW)
    G->>R: execute with credential
    R-->>G: raw results
    Note over G: 4. Output rules (PII, secrets...)
    alt Output rule violated
        G-->>M: BLOCKED / redacted
    end
    G-->>M: JSON results (no credentials)
    M-->>C: { count: 42 }
    C-->>U: "There are 42 users"
    Note over G: ARA session recorded for audit

Docs

Guide

Description

Akeyless setup

Auth method, ARA RBAC, chicken-and-egg IAM bind

AgentCore deploy

MCP protocol, envVars, invoke

Security

Checklist

Maintainer guide

Branch protection, approvals, PyPI environment

Publishing to PyPI

Trusted publishing setup

Contributing

Development setup

Repository: github.com/akeyless-community/bedrock-agentcore-akeyless-rta

Development

pip install -e ".[mcp,dev]"
pytest

Run pytest inside this package directory so the workspace root does not collect unrelated tests.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables organizations to govern agent tool access by onboarding remote MCP servers, defining function-level allow lists and credential modes, and exposing permitted tools through a single unified MCP endpoint with search and execute functions.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables teams to govern agent tool access by onboarding remote MCP servers, setting function-level allow lists and credential modes, and exposing permitted tools through a unified MCP endpoint with search and execute functions.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables teams to govern agent tool access with function-level allow-lists, credential modes, and audited execution, while exposing permitted MCP tools through a unified endpoint with search and execute functions.
      MIT