본문으로 건너뛰기

에이전트 · 진행 중

MCP 서버

Identvia는 상태 없는 MCP 서버를 제공해 어시스턴트가 AgentPass 지원 사이트 액세스를 사용자에게 요청·사용하게 하고, 사용자가 주도권을 유지하게 합니다.

AI 에이전트용 프롬프트 복사

코딩 에이전트를 사용하나요? 이 프롬프트는 에이전트가 이 문서를 참고하도록 하고 반드시 지켜야 할 규칙을 알려 줍니다. 에이전트가 작성한 코드도 다른 코드처럼 검토하세요.

You are helping me add "Sign in with Identvia" to my app (PHP). Identvia is an OpenID Connect provider.

Read these first (they are plain Markdown and are the source of truth; prefer them over anything you remember):
- https://id.identvia.com/developers/docs/quickstart.md
- https://id.identvia.com/developers/docs/oidc.md
- https://id.identvia.com/developers/docs/security.md
- Discovery: https://id.identvia.com/.well-known/openid-configuration

Stack: plain PHP 8.1+ (no framework). Use the official SDK identvia/identvia-php (composer require identvia/identvia-php, or the zip with vendor/ from https://id.identvia.com/developers/docs/php for hosts without Composer). Create identvia.php (config), login.php (redirectToSignIn), callback.php (handleCallback, then session_regenerate_id(true) and store sub) and logout.php. Read secrets from environment variables or a config file outside the web root.

Requirements:
1. Authorization code flow with PKCE (S256 only), a random state and a nonce per sign-in. No implicit flow.
2. Validate the ID token: RS256 signature from the JWKS, iss = https://id.identvia.com, aud contains my client_id, exp/iat, and the nonce.
3. Identify users by sub (it is pairwise: different for every app). Treat email as optional, because the person may choose not to share it.
4. Redirect URIs must match exactly. Keep the client secret and refresh tokens server-side; never log tokens.
5. Ask only for the scopes I need (openid, plus email/profile if used). Handle the user canceling (error=access_denied) gracefully.

Optional, only if I ask for AI-agent access later:
- AgentPass (agents acting for a user with single-use, holder-bound passes): https://id.identvia.com/developers/docs/agentpass.md
- MCP server for agent clients: https://id.identvia.com/developers/docs/mcp.md
- Token exchange, rich authorization requests and CIBA: https://id.identvia.com/developers/docs/delegation.md

Before writing code, tell me which files you will add or change. Don't invent endpoints or options that aren't in the docs; if something is unclear, ask me.

연결

서버 URL: https://id.identvia.com/mcp(Streamable HTTP, JSON 응답, 세션·SSE 없음). 클라이언트는 /.well-known/oauth-protected-resource/mcp로 인가를 발견한 뒤 PKCE가 있는 OAuth 2.1과 resource=https://id.identvia.com/mcp를 씁니다. Client ID Metadata Document(HTTPS client_id)로 식별하거나 동적 등록할 수 있습니다. 프로토콜 개정 2026-07-28과 2025-11-25 / 2025-06-18 / 2025-03-26을 지원합니다.

범위

  • profile: 사용자가 누구인지(whoami).
  • grants:read: 에이전트 액세스와 대기 요청 목록.
  • grants:revoke: 에이전트 액세스 취소.
  • agent:request: 액세스를 요청하고 확인한 뒤 그것으로 사이트를 호출합니다.

도구

  • whoami, list_grants, revoke_grant
  • request_access: 사용자 받은편지함에 AgentPass 요청을 보냅니다.
  • check_access: 사용자가 승인하면 Identvia가 패스를 상환하고 credential_handle을 반환합니다. 토큰 자체는 클라이언트에 돌아가지 않습니다.
  • call_service: 부여된 사이트로만 HTTPS 요청 한 번(10초, 256KB).

승인 도구는 없습니다. 승인은 Identvia 안에서만, 로그인한 사용자가 패스키 또는 인증 앱으로 합니다.