Zum Inhalt springen

Agenten · in Arbeit

MCP-Server

Identvia stellt einen zustandslosen MCP-Server bereit, damit Assistenten einen Nutzer um Zugriff auf AgentPass-fähige Seiten bitten und ihn nutzen können, während der Nutzer die Kontrolle behält.

Prompt für Ihren KI-Agenten kopieren

Sie nutzen einen Coding-Agenten? Dieser Prompt verweist ihn auf diese Doku und listet die Regeln auf, die er befolgen muss. Prüfen Sie, was er schreibt, wie jeden anderen Code.

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.

Verbinden

Server-URL: https://id.identvia.com/mcp (Streamable HTTP, JSON-Antworten, keine Sitzungen oder SSE). Clients entdecken die Autorisierung über /.well-known/oauth-protected-resource/mcp und nutzen dann OAuth 2.1 mit PKCE und resource=https://id.identvia.com/mcp. Sie können sich mit einem Client ID Metadata Document (HTTPS-client_id) identifizieren oder dynamisch registrieren. Protokollrevisionen 2026-07-28 und 2025-11-25 / 2025-06-18 / 2025-03-26 werden unterstützt.

Scopes

  • profile: wer der Nutzer ist (whoami).
  • grants:read: Agentenzugriff und ausstehende Anfragen auflisten.
  • grants:revoke: Agentenzugriff widerrufen.
  • agent:request: Zugriff anfordern, prüfen und die Seite damit aufrufen.

Tools

  • whoami, list_grants, revoke_grant
  • request_access: sendet eine AgentPass-Anfrage in den Posteingang des Nutzers.
  • check_access: sobald der Nutzer freigibt, löst Identvia den Pass ein und gibt ein credential_handle zurück. Das Token selbst wird dem Client nie zurückgegeben.
  • call_service: eine HTTPS-Anfrage nur an die freigegebene Seite (10 s, 256 KB).

Es gibt kein Freigabe-Tool. Freigabe erfolgt nur in Identvia, durch den angemeldeten Nutzer, mit Passkey oder Authenticator-App.