agentregistry Documentation

repository·main·Indexed 19 days ago

https://github.com/agentregistry-dev/agentregistry

An open-source platform for discovering, managing, and running MCP servers, AI agents, skills, and prompts. It provides a centralized registry and CLI to bridge local development and production deployment, featuring Kubernetes deployment via Helm and support for PostgreSQL databases.

Tokens
84K
Snippets
250
Records
357
Agent score
64%

What's inside agentregistry

  1. Configure authentication and authorization in Agentregistry

    main

    By default, Agentregistry uses a permissive access policy that does not provide an authenticated security boundary. To secure the registry, integrators should implement authentication and authorization using the provided interfaces:

    • Authentication: Supply an authentication provider backed by identity systems such as OIDC.
    • Authorization: Enforce resource-level access control through a dedicated AuthzProvider.

    If you require a security boundary, you must either configure one of these providers or place the Agentregistry service behind a trusted access layer (e.g., a reverse proxy or API gateway).

  2. Understand the AgentRegistry Authorization (AuthZ) Model

    main

    AgentRegistry uses an AuthzProvider to evaluate permissions for various resource types. While the OSS public provider allows all operations, non-public providers use a permission-based model.

    Supported Resource Types:

    • agent
    • server (MCP server)
    • plugin
    • skill
    • prompt
    • provider
    • runtime
    • model

    Note on Deployments: There is no deployment resource type. Deployment endpoints authorize against the underlying MCP server or agent that the deployment references. For example, to manage a deployment, you must have permissions on the target agent or server.

    Note on Models: Models are tagged catalogs that version provider identity and platform connection posture. They use SecretKeyRef names rather than actual secret values, so a Read permission does not expose sensitive key material.

  3. Understand agentregistry ecosystem integrations

    main

    agentregistry integrates with several key technologies to manage the lifecycle of AI agents and MCP servers:

    • kagent: agentregistry utilizes kagent.dev API group CRDs for deploying agents and MCP servers to Kubernetes clusters.
    • agentgateway: Integrates as an optional data plane component to act as a reverse proxy for MCP endpoints.
    • arctl CLI: Can be embedded into CI/CD pipelines to automate artifact publishing workflows.
  4. Identify unsupported use cases for Agentregistry

    main

    When planning your implementation, note that the following are currently out of scope and not supported by Agentregistry:

    • General-purpose OCI artifact or container image registry: It is not a replacement for Harbor or Docker Hub; it is purpose-built for agentic AI artifacts (MCP servers, agents, skills).
    • AI model registry or model storage: It does not store or version machine learning model weights or files; it manages metadata and configuration for tools.
    • Runtime execution environment: It does not execute agents or MCP servers directly. Execution is handled by target environments like Agentgateway.
    • Agent versioning: Immutable, versioned artifact references for agents and skills are currently in progress and not yet fully supported.
  5. Configure database migration sources in the CLI

    main

    When building a CLI with cli.Root, you can specify additional database migration sources via the ExtraMigrationSources field in cli.Config.

    Behavioral rules:

    1. The OSS migration source is always registered first.
    2. ExtraMigrationSources are appended in the order they appear in your configuration.
    3. If your CLI has exactly one migration source (the default OSS source), the db migrate command will not expose the --source flag.
    4. If your CLI has more than one migration source, the db migrate command will expose the --source flag to allow users to select the desired source.
  6. Caveats and Security for MCP Compatibility Mode

    main

    When using the MCP Registry v0.1 compatibility layer, be aware of the following behaviors:

    • RBAC and Scoping: The endpoint reuses the native ListFilter and Authorize hooks. In the OSS build, these are not wired, meaning the catalogue is flat and unfiltered across all namespaces. In builds where crud.PerKindHooks for MCPServer are wired, the same RBAC/tenancy scoping applies.
    • Anonymous Access: Routes under the compatibility shim are registered as public paths. They bypass credential authentication and use an auth.PublicSession. Presented tokens are ignored; every caller sees the same catalogue defined by the ListFilter/Authorize hooks.
    • Version Support: Only the v0.1 spec is supported. The legacy v0 API is not served.
    • Field Mapping: http package transports are surfaced as streamable-http with synthesized URLs (e.g., http://localhost:<port><path>). Server versions are derived from package origins (npm/pypi/OCI) or fall back to 0.0.0.
  7. Configure Model References in Agent Deployments

    main

    Models are admin-owned resources that define provider identity, endpoints, and authentication.

    Harness Deployments: A harness Agent Deployment can explicitly select a Model using modelRef:

    modelRef:
      name: claude-opus-4-8
      tag: approved-v1

    Default Model Behavior:

    • If modelRef is omitted from a harness Agent Deployment, the registry resolves Model/<deployment namespace>/default@latest.
    • Important: Platform administrators should create a Model named default in each namespace to avoid spec.modelRef dangling-reference errors. The registry does not automatically pick the first available model.
    • Non-harness Agent and MCPServer Deployments do not receive an implicit Model.
    spec:
      targetRef:
        kind: Agent
        name: summarizer
      runtimeRef:
        kind: Runtime
        name: agentcore
      harness:
        type: claude-code
      modelRef:
        name: claude-opus-4-8
        tag: approved-v1
  8. Understand AgentRegistry versioning and artifacts

    main

    AgentRegistry follows Semantic Versioning (SemVer):

    • Major (X.0.0): Breaking API or behavior changes.
    • Minor (X.Y.0): Backward-compatible features.
    • Patch (X.Y.Z): Backward-compatible fixes.

    Tagging Conventions:

    • Git tags and container image tags use a leading v (e.g., v0.4.0).
    • Helm chart versions omit the v prefix (e.g., 0.4.0).

    Published Artifacts for version vX.Y.Z:

    • Container Images (Linux amd64 and arm64):
      • ghcr.io/agentregistry-dev/agentregistry/server:vX.Y.Z
      • ghcr.io/agentregistry-dev/agentregistry/arctl-agentgateway:vX.Y.Z
    • CLI Binaries: Available for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64).
    • Helm Chart: Located at oci://ghcr.io/agentregistry-dev/agentregistry/charts/agentregistry (Chart version X.Y.Z, App version vX.Y.Z).
    • GitHub Release: Contains release notes, CLI files, the packaged Helm chart, and a checksum file.
  9. Understand MCP Registry Compatibility Server Names

    main

    The MCP Registry catalogue is flattened across all namespaces. A server's name follows the format "<namespace>/<resourceName>".

    When performing GET requests for specific servers, the {serverName} segment must be URL-encoded (specifically, the forward slash must be encoded as %2F).

    Example URL: To get the latest version of a server named default/weather, use: GET /v0.1/servers/default%2Fweather/versions/latest

    GET /v0.1/servers/default%2Fweather/versions/latest
  10. Understand Agent Registry Chart Architecture

    main

    The Helm chart deploys several Kubernetes resources depending on your configuration:

    ResourceDescription
    DeploymentAgent Registry application
    ServiceExposes HTTP (:12121) and MCP (:31313) ports
    ConfigMapApplication configuration injected as environment variables
    Secret (-postgresql)Bundled PostgreSQL password (only when database.postgres.type=bundled)
    Deployment (-postgresql)Bundled PostgreSQL instance (only when database.postgres.type=bundled)
    Service (-postgresql)Internal service for bundled PostgreSQL (only when database.postgres.type=bundled)
    PersistentVolumeClaim (-postgresql)Storage for bundled PostgreSQL data (only when database.postgres.type=bundled)
    ServiceAccountDedicated service account for the workload
    ClusterRole / ClusterRoleBindingRBAC rules for managing cluster-scoped resources and namespace discovery
    Role / RoleBindingPer-namespace RBAC rules when rbac.watchedNamespaces is set
  11. Register MCP Packages from Public Registries

    main

    The registry supports registering MCP packages from npm, pypi, and oci. The registry validates ownership by comparing the serverName in the manifest against the identity embedded in the upstream artifact.

    Configuration Structure:

    • spec.source.package.origin.type: One of npm, pypi, or oci.
    • spec.source.package.origin.identifier: The canonical address (e.g., image ref for OCI, package name for npm/PyPI).
    • spec.source.package.launch: (Optional) Overrides default launch commands (command, args, env). If omitted, the resolver uses defaults like npx -y <pkg>@<ver> for npm or uvx <pkg>==<ver> for PyPI.

    Handling Naming Mismatches: If the upstream identity (e.g., reverse-DNS namespace/name) cannot be used as the local metadata.name, use a local DNS-1123 subdomain for metadata.name and provide the full upstream identity in spec.source.package.origin.<type>.serverName.

    # Example: Registering an npm package with a custom upstream identity
    apiVersion: ar.dev/v1alpha1
    kind: MCPServer
    metadata:
      name: mcp-fetch                                                # local catalog name
    spec:
      source:
        package:
          origin:
            type: npm
            identifier: "@modelcontextprotocol/server-fetch"
            npm:
              version: 0.1.0
              serverName: io.github.modelcontextprotocol/server-fetch  # upstream identity
          transport:
            type: stdio
  12. How AgentRegistry and agentgateway work together

    main

    AgentRegistry acts as the central catalog for MCP servers, agents, and skills. It pairs with agentgateway to provide a secure, unified entry point for AI clients (like Claude Desktop, Cursor, or VS Code).

    The Workflow:

    1. Curation: Platform teams publish approved artifacts to AgentRegistry.
    2. Deployment: When you run arctl apply -f deployment.yaml, AgentRegistry automatically configures the agentgateway routing.
    3. Consumption: Instead of configuring clients for every individual MCP server, clients connect to a single agentgateway endpoint.
    4. IDE Integration: Use arctl configure cursor (or similar commands for other IDEs) to point your development environment at the gateway endpoint.

    Key benefits of the gateway approach:

    • Single Endpoint: One URL for all tool calls.
    • Security: Centralized JWT validation and access policies.
    • Observability: Unified OTEL logging/tracing for all agent-to-tool traffic.
    • Dynamic Discovery: New servers in the registry are automatically available to connected clients without reconfiguration.