agent-auth-mcp

작성자: better-auth

Agent Auth MCP 도구를 사용하여 공급자를 검색하고, 에이전트를 연결하며, 기능을 관리하고, MCP 프로토콜을 통해 작업을 실행하세요. 작업 시 사용합니다…

npx skills add https://github.com/better-auth/agent-auth --skill agent-auth-mcp

Agent Auth MCP Tools

You have access to Agent Auth MCP tools for interacting with Agent Auth providers. Always prefer using these MCP tools for any agent authentication operations rather than making raw HTTP requests or writing custom code.

Starting the MCP Server

The MCP server is part of the CLI:

auth-agent mcp

Or with pre-configured providers:

auth-agent mcp --url https://api.example.com

Cursor / Claude Desktop configuration

{
  "mcpServers": {
    "auth-agent": {
      "command": "npx",
      "args": ["@auth/agent-cli", "mcp", "--url", "https://api.example.com"]
    }
  }
}

Available Tools

The MCP server exposes 17 tools. Follow the numbered workflow below.

Step 1: Discovery — Find a Provider

ToolParametersWhen to use
list_providers(none)Call this first. Lists all discovered/configured providers.
search_providersintent (required)Search the directory by name or intent (e.g. "deploy web apps", "vercel").
discover_providerurl (required)Look up a specific provider by URL. Only use if list/search didn't help.

Always start with list_providers. If empty, use search_providers or discover_provider.

Step 2: Capabilities — Understand What's Available

ToolParametersWhen to use
list_capabilitiesprovider (required), query, agent_id, limit, cursorList capabilities for a provider.
describe_capabilityprovider, name (required), agent_idGet full definition including input schema. Always call before executing.

Step 3: Connect — Authenticate an Agent

ToolParametersWhen to use
connect_agentprovider (required), capabilities, mode, name, reason, preferred_method, login_hint, binding_message, force_newConnect an agent to a provider. Returns agent_id.

Key parameters:

  • capabilities — Array of capability names to request.
  • mode"delegated" (acts for a user, default) or "autonomous" (independent).
  • preferred_method"device_authorization" (default, opens browser) or "ciba" (backchannel notification).
  • login_hint — User email for CIBA flow.
  • force_new — Create a new connection even if one exists.

Step 4: Use the Agent

ToolParametersWhen to use
execute_capabilityagent_id, capability (required), argumentsExecute a granted capability.
agent_statusagent_id (required)Check agent status, grants, and constraints.
sign_jwtagent_id (required), capabilities, audienceSign an agent JWT for manual use.
request_capabilityagent_id, capabilities (required), reason, preferred_method, login_hint, binding_messageRequest additional capabilities.
disconnect_agentagent_id (required)Revoke an agent.
reactivate_agentagent_id (required)Reactivate an expired agent.

Host Management

ToolParametersWhen to use
enroll_hostprovider, enrollment_token (required), nameEnroll a host with a one-time token.
rotate_agent_keyagent_id (required)Rotate an agent's keypair.
rotate_host_keyissuer (required)Rotate the host keypair for a provider.

Workflow Example

Here is the standard workflow for connecting to a provider and executing a capability:

1. list_providers
   → See what providers are already known

2. search_providers({ intent: "deploy web apps" })
   → Find a provider if none are known (or discover_provider with a URL)

3. list_capabilities({ provider: "https://api.example.com" })
   → See what the provider offers

4. describe_capability({ name: "deploy_app", provider: "https://api.example.com" })
   → Understand the input schema before executing

5. connect_agent({ provider: "https://api.example.com", capabilities: ["deploy_app"], name: "deploy-bot" })
   → Authenticate and get an agent_id
   → If approval is required, the user will be prompted

6. agent_status({ agent_id: "..." })
   → Confirm the agent is active and capabilities are granted

7. execute_capability({ agent_id: "...", capability: "deploy_app", arguments: { app: "my-app", env: "production" } })
   → Run the capability with the correct arguments

Important Rules

  • Never make raw HTTP requests to Agent Auth endpoints. Always use MCP tools.
  • Always call list_providers first. This tells you what's already configured.
  • Always call describe_capability before execute_capability. You need the input schema.
  • Always call agent_status after connect_agent. The agent may be pending approval.
  • Save the agent_id returned by connect_agent — every subsequent tool needs it.
  • Use constraints when connecting to limit agent permissions — pass them in the capabilities parameter as objects with name and constraints fields.
  • Handle approval flows. When connect_agent returns approval info (device code URL or CIBA), the user must approve before the agent becomes active. Poll agent_status to check.
  • Errors return structured objects like { error: "message", code: "error_code" } — check these and retry or adjust accordingly.

Capability Constraints

When connecting, you can restrict what an agent can do with its capabilities:

{
  "provider": "https://api.example.com",
  "capabilities": [
    "read_data",
    {
      "name": "transfer_money",
      "constraints": {
        "amount": { "max": 1000, "min": 1 },
        "currency": { "in": ["USD", "EUR"] }
      }
    }
  ]
}

Constraint types: eq (exact match), min/max (numeric bounds), in/not_in (allowed/blocked values).

When to Use CLI vs MCP

  • Use MCP tools when operating inside an MCP-enabled environment (Cursor, Claude Code, Claude Desktop) — the tools are already available and integrated.
  • Use the CLI when running from a terminal directly, scripting, or when MCP is not available.
  • Both expose the same operations and share the same storage (~/.agent-auth/).

better-auth의 다른 스킬

agent-auth-cli
better-auth
Agent Auth CLI(auth-agent)를 사용하여 제공자를 검색하고, 에이전트를 연결하며, 기능을 관리하고, 작업을 실행하세요. 사용자가 상호작용을 원할 때 사용합니다…
official
better-icons
better-auth
CLI 및 MCP 서버 통합을 통해 200개 이상의 아이콘 라이브러리에서 SVG를 검색하고 가져옵니다. 주요 컬렉션(Lucide, Material Design Icons, Heroicons, Tabler 등 200개 이상)을 검색할 수 있으며, 접두사 및 결과 제한으로 필터링할 수 있습니다. 아이콘 검색, SVG 파일로 일괄 다운로드, 색상 및 크기 사용자 지정이 가능한 개별 아이콘 검색을 위한 CLI 명령어를 제공합니다. 스마트 추천, 유사성 매칭, 프로젝트 스캔, 일괄 아이콘...을 포함한 AI 에이전트용 MCP 서버 도구를 지원합니다.
official
better-auth-best-practices
better-auth
완전한 Better Auth 서버 및 클라이언트 설정으로, 데이터베이스 어댑터, 세션 관리, 플러그인, 보안 구성을 포함합니다. 설치부터 데이터베이스 마이그레이션, 환경 변수 설정, 여러 프레임워크에서의 라우트 핸들러 생성까지 전체 워크플로우를 다룹니다. 여러 데이터베이스 어댑터(Prisma, Drizzle, MongoDB, 직접 연결)를 지원하며, 모델과 테이블 명명 규칙에 대한 중요한 지침을 제공합니다. 세션 저장소 전략(Redis/KV를 사용한 보조 저장소), 쿠키...
official
create-auth-skill
better-auth
TypeScript/JavaScript 앱에서 Better Auth 프레임워크 감지, 데이터베이스 어댑터 설정, OAuth 통합을 통해 인증을 스캐폴딩하고 구현합니다. 프로젝트 스캐닝을 통해 프레임워크(Next.js, SvelteKit, Nuxt, Astro, Express, Hono), 데이터베이스(Prisma, Drizzle, MongoDB, raw 드라이버), 기존 인증 라이브러리를 감지합니다. 이메일/비밀번호, OAuth(Google, GitHub, Apple, Microsoft, Discord, Twitter), 매직 링크, 패스키, 전화 인증을 지원하며 설정 가능한 이메일 확인 기능을 제공합니다...
official
Email & Password Best Practices
better-auth
이메일 및 비밀번호 모범 사례 — AI 에이전트용 설치 가능한 스킬, better-auth/skills에서 게시함.
official
email-and-password-best-practices
better-auth
이메일 인증, 비밀번호 재설정 흐름, 그리고 Better Auth를 위한 사용자 정의 가능한 비밀번호 정책을 제공합니다. 선택적 강제 적용을 통해 인증될 때까지 로그인을 차단하는 이메일 인증을 지원하며, 구성 가능한 토큰 만료 및 일회용 재설정 토큰을 포함합니다. 내장된 보안 기능을 갖춘 비밀번호 재설정 흐름: 백그라운드 이메일 전송, 타이밍 공격 방지, 유효하지 않은 요청에 대한 더미 작업, 재설정 시 선택적 세션 취소를 제공합니다. 구성 가능한 비밀번호 길이 제한(기본 8~256자) 및 사용자 정의...
official
organization-best-practices
better-auth
멀티 테넌트 조직 설정: 멤버 관리, 역할 기반 접근 제어, Better Auth를 통한 팀 지원. 사용자 정의 가능한 생성 규칙, 멤버십 제한, 소유권 제약 조건으로 조직을 구성하며, 생성자는 자동으로 소유자 역할을 부여받습니다. 이메일 전송, 만료 기간, 공유 가능한 초대 URL을 통해 멤버와 초대를 관리하고, 멤버당 여러 역할을 지원합니다. 동적 접근 제어로 사용자 정의 역할과 권한을 정의하고, 권한을 확인합니다...
official
two-factor-authentication-best-practices
better-auth
Better Auth를 위한 TOTP, OTP, 백업 코드 및 신뢰 기기 관리를 포함한 다중 인증. 세 가지 인증 방식을 지원합니다: 인증 앱(QR 코드를 통한 TOTP), 이메일/SMS 코드(OTP), 일회용 백업 코드. 자동 세션 관리, 임시 2FA 쿠키, 만료 설정이 가능한 신뢰 기기 추적을 포함한 완전한 2FA 로그인 흐름을 처리합니다. 속도 제한(10초당 3회 요청), 저장 시 암호화 등 내장 보안 기능을 제공합니다...
official